Skip to content

Collect necessary .proto files (Protocol Buffers IDL) and manage dependencies

License

Notifications You must be signed in to change notification settings

dbeneker/protodep

 
 

Repository files navigation

protodep

Build Status Language issues License: MIT GoDoc

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/mittwald/protodep

from binary

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

Usage

protodep.toml

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"]

protodep up

In same directory, execute this command.

$ protodep up

If succeeded, protodep.lock is generated.

protodep up -f (force update)

Even if protodep.lock exists, you can force update dependencies.

$ protodep up -f

License

See LICENSE.

Copyright © stromcat24. All Rights Reserved.

About

Collect necessary .proto files (Protocol Buffers IDL) and manage dependencies

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.0%
  • Makefile 2.0%