Dependency tool for Protocol Buffers IDL file (.proto) vendoring tool.
In building Microservices architecture, gRPC with Protocol Buffers is effective. When using gRPC, your application will depend on many remote services.
If you manage proto files in a git repository, what will you do? Most remote services are managed by git and they will be versioned. We need to control which dependency service version that application uses.
$ go get github.com/mittwald/protodep
Support as follows:
- protodep_0.1.2_Linux_x86_64.tar.gz
- protodep_0.1.2_Darwin_x86_64.tar.gz
$ curl --silent -SL "https://github.com/mittwald/protodep/releases/download/v0.1.2/protodep_0.1.2_$(uname)_x86_64.tar.gz" | tar -xvzf - -C /usr/local/bin/ protodep
Proto dependency management is defined in protodep.toml
.
proto_outdir = "./proto"
[[dependencies]]
target = "github.com/mittwald/protodep/protobuf"
branch = "master"
[[dependencies]]
target = "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb"
revision = "v1.2.2"
path = "grpc-gateway/examplepb"
[[dependencies]]
target = "github.com/kubernetes/helm/_proto/hapi"
branch = "master"
path = "helm/hapi"
ignores = ["./release", "./rudder", "./services", "./version"]
In same directory, execute this command.
$ protodep up
If succeeded, protodep.lock
is generated.
Even if protodep.lock exists, you can force update dependencies.
$ protodep up -f
See LICENSE.
Copyright © stromcat24. All Rights Reserved.