Git Product home page Git Product logo

proton's Introduction

Proton

This repository is home for the protocol buffer files which are used throughout ODPF ecosystem.

Why a single protos repository?

Following are the considerations for going with single repository:

  • This repository contains protocol buffers that have common patterns and APIs that services can reuse instead of spending effort in writing these protobufs. Each subdirectory contains details of the respective protos.
  • Validation, generation, and other proto-related operations can be placed in one place. Thus, avoid duplication.
  • We also see good possibility to reuse proto schema. Have it in one place make it easy to import proto.

Usage

Proton does not provide compiled language specific proto files or the descriptor sets for the respective protos. It is upto the users to pull these protos and use protoc for language specific compiled files and have dependencies/imports in their code.

Structure

Proton has flat structure where proto files are put under /odpf/proton/<application>/. Each application's sub directory read me provides details on how to use the respective proto.

Guide

Generating go code using buf

This guide is last tried on buf version 1.0.0-rc4.

Add this buf.gen.yaml at the root folder.

version: v1beta1
plugins:
  - name: go
    out: dst
    opt: paths=source_relative

Run below command to generate your proto to /dst folder.

buf generate

Use below command if you just want to target specific package/folder

buf generate --path odpf/assets

Contribute

Prerequisite: You need to have buf installed

You can add proto files when you need to introduce proto for ODPF projects. If you need to modify proto files, you need to ensure backward compatibility. To ensure the backward compatibility of your changes, you can run

buf breaking --against '.git#branch=master'

License

Proton is Apache 2.0 licensed.

proton's People

Contributors

kushsharma avatar nncrawler avatar rsbh avatar rootcss avatar krtkvrm avatar rohilsurana avatar arinda-arif avatar rahmatrhd avatar stewartjingga avatar ravisuhag avatar h4rikris avatar mabdh avatar mauliksoneji avatar scortier avatar akarshsatija avatar irainia avatar chakravarthyvp avatar pyadav avatar ramey avatar aok1j1 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.