Documentation ¶
Overview ¶
Code generated by go generate; DO NOT EDIT. This file was generated by robots at 2021-07-16 14:25:54.896204 +0430 +0430 m=+0.033408441
Index ¶
- Constants
- Variables
- 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 FieldArg
- type Language
- type MessageArg
- type MethodArg
- type ModelKey
- func (m *ModelKey) Alias() string
- func (m *ModelKey) CKs() []Prop
- func (m *ModelKey) ClusteringKeys() []Prop
- func (m *ModelKey) HasProp(name string) bool
- func (m *ModelKey) Index() int
- func (m *ModelKey) IsSubset(n *ModelKey) bool
- func (m *ModelKey) Keys() []Prop
- func (m *ModelKey) Name() string
- func (m *ModelKey) NameTypes(filter PropFilter, namePrefix string, nameCase TextCase, lang Language) string
- func (m *ModelKey) Names(filter PropFilter, prefix, postfix string, sep string, nameCase TextCase) string
- func (m *ModelKey) PKs() []Prop
- func (m *ModelKey) PartitionKeys() []Prop
- type Order
- type Prop
- type PropFilter
- type RestArg
- type ServiceArg
- type TextCase
Constants ¶
const ( PropFilterALL = "ALL" PropFilterPKs = "PKs" PropFilterCKs = "CKs" )
Variables ¶
var ( Commit = "bde2f2f89d8b0a4a7702ef7b3a26bdf886918e75" Version = "v0.12.5" )
var (
CrcTab = crc64.MakeTable(crc64.ISO)
)
Functions ¶
func Constructor ¶
func Constructor(file *protogen.File, g *protogen.GeneratedFile, desc protoreflect.MessageDescriptor) string
func CqlKind ¶
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 ¶
func DescParts(file *protogen.File, g *protogen.GeneratedFile, desc protoreflect.MessageDescriptor) (string, string)
DescParts returns the package and identifier name
func GoKind ¶
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 FieldArg ¶
type FieldArg struct { Name string // Name of the field Pkg string Type string ZeroValue string Kind string GoKind string CqlKind string Cardinality string HasIndex bool // contains filtered or unexported fields }
FieldArg holds the data needed by the template engine to generate code based on the protogen.Field
func GetFieldArg ¶
type MessageArg ¶
type MessageArg struct { Fullname string Name string CName string // [Pkg.]C_Name Pkg string C uint32 Fields []FieldArg // If message is representing a model then following parameters are filled IsAggregate bool IsSingleton bool RemoteRepo string LocalRepo string Table *ModelKey TableExtra []Prop Views []*ModelKey // contains filtered or unexported fields }
MessageArg holds the data needed by the template engine to generate code based on the protogen.Message
func GetMessageArg ¶
func GetMessageArg(file *protogen.File, gFile *protogen.GeneratedFile, m *protogen.Message) MessageArg
func (MessageArg) NameCC ¶
func (ma MessageArg) NameCC() string
func (MessageArg) NameKC ¶ added in v0.12.0
func (ma MessageArg) NameKC() string
func (MessageArg) NameSC ¶ added in v0.12.0
func (ma MessageArg) NameSC() string
func (MessageArg) ViewsByPK ¶ added in v0.12.0
func (ma MessageArg) ViewsByPK() map[string][]*ModelKey
type MethodArg ¶
type MethodArg struct { Name string Input MessageArg Output MessageArg RestEnabled bool TunnelOnly bool Rest RestArg // contains filtered or unexported fields }
MethodArg holds the data needed by the template engine to generate code based on the protogen.Method
func GetMethodArg ¶
type ModelKey ¶
type ModelKey struct { Arg *MessageArg // contains filtered or unexported fields }
func (*ModelKey) ClusteringKeys ¶
func (*ModelKey) NameTypes ¶
func (m *ModelKey) NameTypes(filter PropFilter, namePrefix string, nameCase TextCase, lang Language) string
NameTypes is kind of strings.Join function which returns a custom format of combination of model properties. This is a helper function used in code generator templates.
func (*ModelKey) Names ¶
func (m *ModelKey) Names(filter PropFilter, prefix, postfix string, sep string, nameCase TextCase) string
Names is kind of strings.Join function which returns a custom format of property names. This is a helper function used in code generator templates.
func (*ModelKey) PartitionKeys ¶
type PropFilter ¶
type PropFilter string
type ServiceArg ¶
type ServiceArg struct { Name string NameCC string // LowerCamelCase(Name) NameKC string // KebabCase(Name) C uint32 Methods []MethodArg // contains filtered or unexported fields }
ServiceArg holds the data needed by the template engine to generate code based on the protogen.Service
func GetServiceArg ¶
func GetServiceArg(file *protogen.File, gFile *protogen.GeneratedFile, s *protogen.Service) ServiceArg