Versions in this module Expand all Collapse all v0 v0.0.1 Jun 19, 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 RegisterUniquePackageName(pkg string, f *FileDescriptor) string + type Descriptor struct + func (c *Descriptor) File() *descriptor.FileDescriptorProto + func (c *Descriptor) PackageName() string + func (d *Descriptor) IsGroup() bool + func (d *Descriptor) Path() string + func (d *Descriptor) TypeName() []string + type EnumDescriptor struct + func (c *EnumDescriptor) File() *descriptor.FileDescriptorProto + func (c *EnumDescriptor) PackageName() string + func (e *EnumDescriptor) TypeName() (s []string) + type ExtensionDescriptor struct + func (c *ExtensionDescriptor) File() *descriptor.FileDescriptorProto + func (c *ExtensionDescriptor) PackageName() string + func (e *ExtensionDescriptor) DescName() string + func (e *ExtensionDescriptor) TypeName() (s []string) + type FileDescriptor struct + func (d *FileDescriptor) Enums() []*EnumDescriptor + func (d *FileDescriptor) Messages() []*Descriptor + func (d *FileDescriptor) PackageName() string + 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 + Suffix string + 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) FileOf(fd *descriptor.FileDescriptorProto) *FileDescriptor + 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) 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, pkg string) + func (g *Generator) RecordTypeUse(t string) + func (g *Generator) SetFile(file *descriptor.FileDescriptorProto) + func (g *Generator) SetPackageNames() + func (g *Generator) TypeName(obj Object) string + func (g *Generator) TypeNameByObject(typeName string) Object + func (g *Generator) TypeNameWithPackage(obj Object) string + func (g *Generator) WrapTypes() + type GoMapDescriptor struct + GoType string + KeyAliasField *descriptor.FieldDescriptorProto + KeyField *descriptor.FieldDescriptorProto + KeyTag string + ValueAliasField *descriptor.FieldDescriptorProto + ValueField *descriptor.FieldDescriptorProto + ValueTag string + type ImportedDescriptor struct + func (c *ImportedDescriptor) File() *descriptor.FileDescriptorProto + func (c *ImportedDescriptor) PackageName() string + func (id *ImportedDescriptor) TypeName() []string + type Object interface + File func() *descriptor.FileDescriptorProto + PackageName func() string + 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