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

Calebjh/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
  • protoc-gen-grpc-gateway
  • protoc-gen-validate
  • protoc-gen-govalidators
  • protoc-gen-doc
  • protoc-gen-gorm (Infoblox Open)

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 76.9%
  • Makefile 23.1%