Coder Social home page Coder Social logo

abalaven / atlas-gentool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from infobloxopen/atlas-gentool

0.0 0.0 0.0 403 KB

Docker image to generate the Go source code from Protocol Buffer schemes

License: Apache License 2.0

Go 17.91% Makefile 29.51% Dockerfile 52.58%

atlas-gentool's Introduction

Docker image to generate Go source code from Protocol Buffer schemes

This repository provides the Docker image used to generate the Go source code from Protocol Buffer schemes.

Build

Build of the Docker image requires docker engine and make utility as pre-requisites. As the requirements are satisfied, use the following command to compile the latest version of the Docker image:

make latest

Usage

To generate the Go source code using the provided tool, you could start with the following command, where

  • project variable defines the Go project
  • plugin variable defines protoc plugin (go, grpc-gateway, protoc-gen-openapiv2, validate, etc.)
  • plugin_opt variable defines options to be passed to the specified plugin
  • {schema} variable defines your Protocol Buffer schema

NOTE It is supposed that your proto schema has proper option go_package set. E.g: option go_package = "github.com/{your_repo}/{your_app}"

docker run --rm -v $(pwd):/go/src/${project} \
    infoblox/atlas-gentool:latest --{plugin}_out={plugin_opt} ${project}/{schema}.proto

Plugins

  • protoc-gen-go
  • protoc-gen-go-grpc
  • protoc-gen-openapiv2 (Infoblox Open with atlas-patch)
  • protoc-gen-grpc-gateway (Infoblox Open)
  • protoc-gen-doc
  • protoc-gen-validate
  • protoc-gen-govalidators
  • protoc-gen-gorm (Infoblox Open)
  • protoc-gen-atlas-query-validate (Infoblox Open)
  • protoc-gen-atlas-validate (Infoblox Open)
  • protoc-gen-preprocess (Infoblox Open)
  • protoc-gen-jsonschema

protoc-gen-openapiv2 patch

atlas-patch is build on top of original protoc-gen-openapiv2 and is intended to conform atlas-app-toolkit REST API Sepcification. A full list of modifications can be found here.

Note that infobloxopen/grpc-gateway has restrictions in using it as a self-standing go module. It inherits go module path from the original grpc-ecosystem/grpc-gateway repository. Use either git tools or NOT module-aware (GOPATH based) go mode to fetch it as a dependency.

atlas-gentool's People

Contributors

evgeniy-l avatar calebjh avatar anpiakhota-infoblox avatar dependabot[bot] avatar drewwells avatar razamidev avatar dmacthedestroyer avatar kd7lxl avatar zacheddy avatar khous avatar atorgayev avatar askurydzin avatar addudko avatar brocwoodworthiblx avatar kumaya 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.