Skip to content

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

License

Notifications You must be signed in to change notification settings

askurydzin/atlas-gentool

 
 

Repository files navigation

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, validate, swagger, etc.)
  • plugin_args variable defines arguments 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_args} ${project}/{schema}.proto

Plugins

  • protoc-gen-go
  • protoc-gen-combo
  • protoc-gen-gofast
  • protoc-gen-gogo
  • protoc-gen-gogofast
  • protoc-gen-gogofaster
  • protoc-gen-gogoslick
  • protoc-gen-gogotypes
  • protoc-gen-gostring
  • protoc-gen-swagger (atlas-patch)
  • protoc-gen-grpc-gateway
  • protoc-gen-validate
  • protoc-gen-govalidators
  • protoc-gen-doc
  • protoc-gen-gorm (Infoblox Open)

protoc-gen-swagger patch

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 78.8%
  • Makefile 21.2%