Giter VIP home page Giter VIP logo

protogen's Introduction

GoDoc Build Status

protogen

Command line tool and workflow for organising code generation of Google's protocol buffers across multiple projects.

Purpose

Using Google's protocol buffers bring great potential for substantial performance gains and type safety over the wire. But it also comes with the constraint that you need to share proto files among all your service providers and consumers.

Protogen works under the assumption, and with the approach that proto files should be centralised in one repository, divided into packages, version tagged and made available through Git. What the protogen tool provides is a workflow for organising and versioning your protobuf contracts by abstracting protoc and git, acting like a package manager for protoc generated code.

Our motive is to help you focus on collaborating with your colleuages, design powerful APIs and build great projects.

What is protogen?

The protogen project consists of three things, the command line tool, the workflow and the .protogen file written with the protogen configuration language. These are all the things you need to manage your proto files.

The command line tool

The command line tool is used to both manage your central protobuf repository and to automate code generation in service and consumer projects.

Installing

The easiest way of obtaining the protogen command line tool for any platform is by installing it through Go package installer. Run the command and immediately have access to the tool.

$ go get -u github.com/zeeraw/protogen

The workflow

The protogen workflow is how you should manage your central protobuf repository. This includes how to structure your packages and how to tag your releases. Visit our example repository where we showcase how to structure our proto files. You can also read more about the protogen workflow on the wiki.

The .protogen file

The .protogen file is a definition of what protobuf code should be generated inside a given project. To write the file you use the protogen configuration language.

source github.com/zeeraw/protogen-protos
output ./vendor/protos
language go {
    plugin grpc
}

generate services/games v1.0.1
generate services/foobar v3.0.0

Editor support

We provide protogen file syntax highlighting and snippets for a few different editors.

protogen's People

Contributors

zeevallin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

protogen's Issues

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.