Documentation ¶
Index ¶
Constants ¶
const VERSION = "1.0.0"
VERSION is the version of protoc-gen-workato being used.
Variables ¶
var SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
SupportedFeatures describes a flag setting for supported features.
Functions ¶
Types ¶
type Plugin ¶
type Plugin struct{}
Plugin describes a protoc code generate plugin. It's an implementation of Plugin from github.com/pseudomuto/protokit
func (*Plugin) Generate ¶
func (p *Plugin) Generate(r *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)
Generate compiles the documentation and generates the CodeGeneratorResponse to send back to protoc. It does this by rendering a template based on the options parsed from the CodeGeneratorRequest.
type PluginOptions ¶
type PluginOptions struct {
ConfigFile string
}
PluginOptions encapsulates options for the plugin. The type of renderer, template file, and the name of the output file are included.
func ParseOptions ¶
func ParseOptions(req *pluginpb.CodeGeneratorRequest) (*PluginOptions, error)
ParseOptions parses plugin options from a CodeGeneratorRequest. It does this by splitting the `Parameter` field from the request object and parsing out the type of renderer to use and the name of the file to be generated.
The parameter (`--workato_opt`) must be of the format <config_file_path>. The file will be written to the directory specified with the `--workato_out` argument to protoc.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
protoc-gen-workato
protoc-gen-workato is used to generate supporting files for https://github.com/envoyproxy/workato.
|
protoc-gen-workato is used to generate supporting files for https://github.com/envoyproxy/workato. |
extensions
|
|
s12
|
|