Versions in this module Expand all Collapse all v1 v1.1.1 Jul 17, 2018 Changes in this version + func CamelCase(s string) string + func CamelCaseSlice(elem []string) string + func EmbedFieldName(goTyp string) string + func FileName(file *FileDescriptor) string + func GetCustomType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) + func GoMapValueTypes(mapField, valueField *descriptor.FieldDescriptorProto, ...) (nullable bool, outGoType string, outGoAliasType string) + func GoTypeToName(goTyp string) string + func IsScalar(field *descriptor.FieldDescriptorProto) bool + func NewPluginImports(generator *Generator) *pluginImports + func RegisterPlugin(p Plugin) + func RegisterUniquePackageName(pkg string, f *FileDescriptor) string + type AnnotatedAtoms struct + func Annotate(file *FileDescriptor, path string, atoms ...interface{}) *AnnotatedAtoms + type Descriptor struct + func (c *Descriptor) File() *FileDescriptor + func (c *Descriptor) GoImportPath() GoImportPath + func (d *Descriptor) IsGroup() bool + func (d *Descriptor) Path() string + func (d *Descriptor) TypeName() []string + type EnumDescriptor struct + func (c *EnumDescriptor) File() *FileDescriptor + func (c *EnumDescriptor) GoImportPath() GoImportPath + func (e *EnumDescriptor) TypeName() (s []string) + type ExtensionDescriptor struct + func (c *ExtensionDescriptor) File() *FileDescriptor + func (c *ExtensionDescriptor) GoImportPath() GoImportPath + func (e *ExtensionDescriptor) DescName() string + func (e *ExtensionDescriptor) TypeName() (s []string) + type FileDescriptor struct + func (d *FileDescriptor) Enums() []*EnumDescriptor + func (d *FileDescriptor) GoPackageName() string + func (d *FileDescriptor) Messages() []*Descriptor + func (d *FileDescriptor) VarName() string + type Generator struct + ImportMap map[string]string + ImportPrefix string + PackageImportPath string + Param map[string]string + Pkg map[string]string + Request *plugin.CodeGeneratorRequest + Response *plugin.CodeGeneratorResponse + func New() *Generator + func (g *Generator) AllFiles() *descriptor.FileDescriptorSet + func (g *Generator) BuildTypeNameMap() + func (g *Generator) CommandLineParameters(parameter string) + func (g *Generator) Comments(path string) string + func (g *Generator) DefaultPackageName(obj Object) string + func (g *Generator) Error(err error, msgs ...string) + func (g *Generator) Fail(msgs ...string) + func (g *Generator) GenerateAllFiles() + func (g *Generator) GeneratePlugin(p Plugin) + func (g *Generator) GetFieldName(message *Descriptor, field *descriptor.FieldDescriptorProto) string + func (g *Generator) GetMapKeyField(field, keyField *descriptor.FieldDescriptorProto) *descriptor.FieldDescriptorProto + func (g *Generator) GetMapValueField(field, valField *descriptor.FieldDescriptorProto) *descriptor.FieldDescriptorProto + func (g *Generator) GetOneOfFieldName(message *Descriptor, field *descriptor.FieldDescriptorProto) string + func (g *Generator) GoMapType(d *Descriptor, field *descriptor.FieldDescriptorProto) *GoMapDescriptor + func (g *Generator) GoPackageName(importPath GoImportPath) GoPackageName + func (g *Generator) GoType(message *Descriptor, field *descriptor.FieldDescriptorProto) (typ string, wire string) + func (g *Generator) In() + func (g *Generator) IsGroup(field *descriptor.FieldDescriptorProto) bool + func (g *Generator) IsMap(field *descriptor.FieldDescriptorProto) bool + func (g *Generator) ObjectNamed(typeName string) Object + func (g *Generator) OneOfTypeName(message *Descriptor, field *descriptor.FieldDescriptorProto) string + func (g *Generator) Out() + func (g *Generator) P(str ...interface{}) + func (g *Generator) PrintComments(path string) bool + func (g *Generator) PrintImport(alias GoPackageName, pkg GoImportPath) + func (g *Generator) RecordTypeUse(t string) + func (g *Generator) SetPackageNames() + func (g *Generator) TypeName(obj Object) string + func (g *Generator) TypeNameByObject(typeName string) Object + func (g *Generator) WrapTypes() + type GoImportPath string + func (p GoImportPath) String() string + type GoMapDescriptor struct + GoType string + KeyAliasField *descriptor.FieldDescriptorProto + KeyField *descriptor.FieldDescriptorProto + KeyTag string + ValueAliasField *descriptor.FieldDescriptorProto + ValueField *descriptor.FieldDescriptorProto + ValueTag string + type GoPackageName string + type ImportedDescriptor struct + func (c *ImportedDescriptor) File() *FileDescriptor + func (c *ImportedDescriptor) GoImportPath() GoImportPath + func (id *ImportedDescriptor) TypeName() []string + type Object interface + File func() *FileDescriptor + GoImportPath func() GoImportPath + TypeName func() []string + type Plugin interface + Generate func(file *FileDescriptor) + GenerateImports func(file *FileDescriptor) + Init func(g *Generator) + Name func() string + type PluginImports interface + GenerateImports func(file *FileDescriptor) + NewImport func(pkg string) Single + type Single interface + IsUsed func() bool + Location func() string + Name func() string + Use func() string