Giter Site home page Giter Site logo

iq-scm / protodep Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stormcat24/protodep

0.0 0.0 0.0 466 KB

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

License: Apache License 2.0

Shell 2.96% Go 90.92% Makefile 6.12%

protodep's Introduction

protodep

logo

GitHub Actions Language issues License: Apache License 2.0 GoDoc go.mod

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 install

$ go install -v github.com/stormcat24/[email protected]

from binary

Support as follows:

  • protodep_darwin_amd64.tar.gz
  • protodep_darwin_arm64.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.1.4/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"

# blacklist by "ignores" attribute
[[dependencies]]
  target = "github.com/kubernetes/helm/_proto/hapi"
  branch = "master"
  path = "helm/hapi"
  ignores = ["./release", "./rudder", "./services", "./version"]
  
# whitelist by "includes" attribute
[[dependencies]]
  target = "github.com/protodep/catalog/hierarchy"
  branch = "main"
  includes = [
    "/protodep/hierarchy/service.proto",
    "**/fuga/**",
  ]
  protocol = "https"

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 dependenies.

$ protodep up -f

[Attention] 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 up

Getting via HTTPS

If you want to get it via HTTPS, do as follows.

$ protodep up --use-https

And 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-password

License

Apache License 2.0, see LICENSE.

protodep's People

Contributors

abemedia avatar ackintosh avatar dsaouda avatar ewhauser avatar h3poteto avatar k-matsuzawa avatar kostyay avatar rcgoodfellow avatar ricoleabricot avatar stormcat24 avatar suzujun avatar takumakanari avatar vigoo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.