protodep-npm v1.0.1
protodep
Dependency tool for Protocol Buffers IDL file (.proto) vendoring tool.
Motivation
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.
Install
go get
$ go get github.com/stormcat24/protodepfrom binary
Support as follows:
- protodep_darwin_amd64.tar.gz
- protodep_linux_386.tar.gz
- protodep_linux_amd64.tar.gz
- protodep_linux_arm.tar.gz
- protodep_linux_arm64.tar.gz
$ wget https://github.com/stormcat24/protodep/releases/download/0.0.8/protodep_darwin_amd64.tar.gz
$ tar -xf protodep_darwin_amd64.tar.gz
$ mv protodep /usr/local/bin/Usage
protodep.toml
Proto dependency management is defined in protodep.toml.
proto_outdir = "./proto"
[[dependencies]]
target = "github.com/stormcat24/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"]protodep up
In same directory, execute this command.
$ protodep upIf succeeded, protodep.lock is generated.
protodep up -f (force update)
Even if protodep.lock exists, you can force update dependenies.
$ protodep up -fAttention Changes from 0.1.0
From protodep 0.1.0 supports ssh-agent, and this is the default. In other words, in order to operate protodep without options as before, it is necessary to set with ssh-add.
As the follows:
$ ssh-add ~/.ssh/id_rsa
$ protodep upGetting via HTTPS
If you want to get it via HTTPS, do as follows.
$ protodep up --use-httpsAnd also, if Basic authentication is required, do as follows. If you have 2FA enabled, specify the Personal Access Token as the password.
$ protodep up --use-https \
--basic-auth-username=your-github-username \
--basic-auth-password=your-github-passwordLicense
See LICENSE.
Copyright © stromcat24. All Rights Reserved.
