Code Monkey home page Code Monkey logo

godin-protobuf's Introduction

godin-protobuf Build Status

Central repo to hold all protobuf definitions

Styleguide

This repository uses the Uber Protobuf Styleguide v2.
It's enforced by using uber's prototool which also takes care of creating and generating the protobuf stubs.

Git hooks

To setup the git-hooks, run ./scripts/install-githooks.sh from the repository root.
You can remove them by running ./scripts/uninstall-githooks.sh.

Quickstart

You need to have prototool installed and set-up.

prototool lint will run the uber2 linter
prototool generate will generate all protobufs into ./gen/
prototool create godin/<package>/<subpackage>/<version>/<subpackage>.proto to create a new protobuf file

I highly suggest that you read through the uber styleguide. Even if you do not want to use them, they provide some nice insights and tips which you might find helpful

Repos

Currently only Golang is configured, so there is only one automatic repo: lukasjarosch/godin-api-go

General workflow

To illustrate a general workflow I will use a simple example. Imagine you want to create a mail service.

  1. Create godin/mail/v1beta1/ folders. Always start out with a beta package first until the API stabilizes.
  2. Generate a protobuf which holds general datastructures like enums (your domain models) using prototool create godin/mail/v1beta1/mail.proto
  3. For each service, generate a new proto file. We only want to expos the api using one service, so: prototool create godin/mail/v1beta1/mail_api.proto
  4. Define your API, work on the service implementing it, refine the api, ... rinse and repeat
  5. During that process you might hit on a major breaking change. Maybe that would be a good time to create a v1beta2 package
  6. goto: 4
  7. Once your API has stabilized, create a release package v1 and remove all dependencies to beta packages (the linter will nag at you if you don't)
  8. Your API should now be stable and can be deployed to production

godin-protobuf's People

Contributors

lukasjarosch avatar

Stargazers

 avatar

Watchers

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