Documentation ¶
Index ¶
- func Constructor(file *protogen.File, g *protogen.GeneratedFile, ...) string
- func CqlKind(d protoreflect.FieldDescriptor) string
- func DescName(file *protogen.File, g *protogen.GeneratedFile, ...) string
- func DescParts(file *protogen.File, g *protogen.GeneratedFile, ...) (string, string)
- func GoKind(file *protogen.File, g *protogen.GeneratedFile, d protoreflect.FieldDescriptor) string
- func Name(file *protogen.File, g *protogen.GeneratedFile, ...) string
- func PackageName(file *protogen.File, g *protogen.GeneratedFile, ...) string
- func ZeroValue(f protoreflect.FieldDescriptor) string
- type DBArg
- type FieldArg
- type MessageArg
- type MethodArg
- type ModelArg
- type ModelFieldArg
- type RestArg
- type ServiceArg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Constructor ¶
func Constructor(file *protogen.File, g *protogen.GeneratedFile, desc protoreflect.MessageDescriptor) string
func CqlKind ¶ added in v0.3.2
func CqlKind(d protoreflect.FieldDescriptor) string
func DescName ¶
func DescName(file *protogen.File, g *protogen.GeneratedFile, desc protoreflect.MessageDescriptor) string
DescName return the fullname of the descriptor. i.e. package.identifier
func DescParts ¶ added in v0.10.3
func DescParts(file *protogen.File, g *protogen.GeneratedFile, desc protoreflect.MessageDescriptor) (string, string)
DescParts returns the package and identifier name
func GoKind ¶ added in v0.3.2
func GoKind(file *protogen.File, g *protogen.GeneratedFile, d protoreflect.FieldDescriptor) string
func Name ¶
func Name(file *protogen.File, g *protogen.GeneratedFile, desc protoreflect.MessageDescriptor) string
func PackageName ¶
func PackageName(file *protogen.File, g *protogen.GeneratedFile, desc protoreflect.MessageDescriptor) string
func ZeroValue ¶
func ZeroValue(f protoreflect.FieldDescriptor) string
ZeroValue returns the equal zero value based on the input type
Types ¶
type DBArg ¶ added in v0.11.0
type DBArg struct { Name string Keys []string DBKey func(prefix string) string FuncArgs func(prefix string) string FuncArgsPKs func(prefix string) string FuncArgsCKs func(prefix string) string String func(prefix string, sep string, lowerCamel bool) string StringPKs func(prefix string, sep string, lowerCamel bool) string StringCKs func(prefix string, sep string, lowerCamel bool) string }
type FieldArg ¶ added in v0.11.0
type FieldArg struct { Name string // Name of the field NameCC string // LowerCamelCase(Name) Pkg string Type string ZeroValue string Kind string GoKind string Cardinality string // contains filtered or unexported fields }
func GetFieldArg ¶ added in v0.11.0
type MessageArg ¶ added in v0.11.0
type MessageArg struct { Fullname string Name string NameCC string // LowerCamelCase(Name) CName string // ConstructorName([Pkg.]C_Name) Pkg string C uint32 Fields []FieldArg }
func GetMessageArg ¶ added in v0.11.0
func GetMessageArg(file *protogen.File, gFile *protogen.GeneratedFile, m *protogen.Message) MessageArg
type MethodArg ¶ added in v0.11.0
type MethodArg struct { Name string NameCC string // LowerCamelCase(Name) NameKC string // KebabCase(Name) Input MessageArg Output MessageArg RestEnabled bool TunnelOnly bool Rest RestArg }
func GetMethodArg ¶ added in v0.11.0
type ModelArg ¶ added in v0.11.0
type ModelArg struct { Message MessageArg HasIndex bool Table DBArg Views []DBArg Fields []FieldArg }
type ModelFieldArg ¶ added in v0.11.0
type ServiceArg ¶ added in v0.11.0
type ServiceArg struct { Name string NameCC string // LowerCamelCase(Name) NameKC string // KebabCase(Name) C uint32 Methods []MethodArg }
func GetServiceArg ¶ added in v0.11.0
func GetServiceArg(file *protogen.File, gFile *protogen.GeneratedFile, s *protogen.Service) ServiceArg
Click to show internal directories.
Click to hide internal directories.