Documentation
¶
Index ¶
- func GoFmt(resp *pluginpb.CodeGeneratorResponse)
- type DefinedTypes
- type FileGenerator
- type Generator
- type GoEnumType
- type GoEnumTypeValue
- type GoFile
- type GoFullType
- type GoImport
- type GoImportAlias
- type GoImportPath
- type GoImportPathToAlias
- type GoType
- type GoTypeField
- type ImportAliases
- type KeyValueTypes
- type MapTypes
- type MessageName
- type ProtoFile
- type ProtoFileToGoImport
- type ProtoFullType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefinedTypes ¶
type DefinedTypes map[ProtoFullType]GoFullType
type FileGenerator ¶
type FileGenerator struct {
*Generator
// contains filtered or unexported fields
}
FileGenerator of protobuf bindings for single file
func NewFileGenerator ¶
func NewFileGenerator(g *Generator, protoFile *descriptorpb.FileDescriptorProto) *FileGenerator
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator of protobuf bindings
func NewGenerator ¶
func NewGenerator(request *pluginpb.CodeGeneratorRequest) *Generator
NewGenerator creates new generator
func (*Generator) Generate ¶
func (g *Generator) Generate() *pluginpb.CodeGeneratorResponse
Generate generates bindings
type GoEnumType ¶
type GoEnumType struct {
Name string
Comments string
ValuesPrefix string
Values []GoEnumTypeValue
}
type GoEnumTypeValue ¶
type GoFile ¶
type GoFile struct {
Package string
Source string
Imports []GoImport
Types []GoType
EnumTypes []GoEnumType
}
type GoFullType ¶
type GoFullType = string // Go package + type name
type GoImportAlias ¶
type GoImportAlias = string
type GoImportPath ¶
type GoImportPath = string
type GoImportPathToAlias ¶
type GoImportPathToAlias map[GoImportPath]GoImportAlias
type GoType ¶
type GoType struct {
Name string
Comments string
Fields []GoTypeField
}
type GoTypeField ¶
type ImportAliases ¶
type ImportAliases map[GoImportPath]GoImportAlias
type KeyValueTypes ¶
type KeyValueTypes = [2]string
type MapTypes ¶
type MapTypes map[MessageName]KeyValueTypes
type MessageName ¶
type MessageName = string
type ProtoFileToGoImport ¶
type ProtoFullType ¶
type ProtoFullType = string // Proto package + type name
Click to show internal directories.
Click to hide internal directories.