Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct { Request *plugin.CodeGeneratorRequest // The input. Response *plugin.CodeGeneratorResponse // The output. Param map[string]string // Command-line parameters. // contains filtered or unexported fields }
Generator is the type whose methods generate the output, stored in the associated response structure.
func New ¶
func New() *Generator
New creates a new generator and allocates the request and response protobufs.
func (*Generator) CommandLineParameters ¶
CommandLineParameters breaks the comma-separated list of key=value pairs in the parameter (a member of the request protobuf) into a key/value map. It then sets file name mappings defined by those entries.
func (*Generator) GenerateAllFiles ¶
GenerateAllFiles generates the output for all the files we're outputting.
func (*Generator) WriteInput ¶
type Method ¶
type Method struct { InputType string OutputType string Name string JavaName string MethodType MethodType GrpcMethodType string Id int IdName string FieldName string }
func (*Method) CallParams ¶
func (*Method) FullInputType ¶
func (*Method) FullOutputType ¶
func (*Method) UnimplementedCall ¶
type MethodType ¶
type MethodType int32
const ( Unary MethodType = 0 ServerStreaming MethodType = 1 ClientStreaming MethodType = 2 BidiStreaming MethodType = 3 )
type ServiceGenerator ¶
func (*ServiceGenerator) Generate ¶
func (g *ServiceGenerator) Generate() error
Fill the response protocol buffer with the generated output for all the files we're supposed to generate.
func (*ServiceGenerator) GetFileName ¶
func (g *ServiceGenerator) GetFileName() string
Click to show internal directories.
Click to hide internal directories.