Documentation
¶
Overview ¶
This is auto-generated code; DO NOT EDIT.
Index ¶
- Constants
- Variables
- func CqlKind(d protoreflect.FieldDescriptor) string
- func CrcHash(data []byte) uint64
- func GoKind(d protoreflect.FieldDescriptor) string
- func ZeroValue(f protoreflect.FieldDescriptor) string
- type FieldArg
- type Language
- type MessageArg
- func (ma MessageArg) CName() string
- func (ma MessageArg) Fullname() string
- func (ma MessageArg) Name() string
- func (ma MessageArg) NameCC() string
- func (ma MessageArg) NameKC() string
- func (ma MessageArg) NameSC() string
- func (ma MessageArg) Pkg() string
- func (ma MessageArg) ViewsByPK() map[string][]*ModelKey
- func (ma MessageArg) With(f *protogen.File) 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 ModuleArg
- type Order
- type PluginOptions
- type Prop
- type PropFilter
- type RestArg
- type ServiceArg
- type TextCase
Constants ¶
const ( PropFilterALL = "ALL" PropFilterPKs = "PKs" PropFilterCKs = "CKs" )
Variables ¶
var ( CrcBits = 64 CrcTab = crc64.MakeTable(crc64.ISO) )
var ( Commit = "f499514c35dd52ffe6a60d37ae7d115a6854972e" Version = "v0.12.53" )
Functions ¶
func CqlKind ¶
func CqlKind(d protoreflect.FieldDescriptor) string
func GoKind ¶
func GoKind(d protoreflect.FieldDescriptor) 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 {
ImportPath protogen.GoImportPath
ZeroValue string
Kind string
GoKind string
CqlKind string
Cardinality string
HasIndex bool
HelpText string
DefaultValue string
// 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 {
Fields []FieldArg
C uint64
ImportPath protogen.GoImportPath
// If message is representing a model then following parameters are filled
IsAggregate bool
IsSingleton bool
GlobalRepo 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(m *protogen.Message) MessageArg
func (MessageArg) CName ¶
func (ma MessageArg) CName() string
func (MessageArg) Fullname ¶
func (ma MessageArg) Fullname() string
func (MessageArg) Name ¶
func (ma MessageArg) Name() string
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) Pkg ¶
func (ma MessageArg) Pkg() string
func (MessageArg) ViewsByPK ¶ added in v0.12.0
func (ma MessageArg) ViewsByPK() map[string][]*ModelKey
func (MessageArg) With ¶ added in v0.12.30
func (ma MessageArg) With(f *protogen.File) MessageArg
type MethodArg ¶
type MethodArg struct {
C uint64
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
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 ModuleArg ¶ added in v0.12.30
type ModuleArg struct {
ImportPath protogen.GoImportPath
PackageName protogen.GoPackageName
Service ServiceArg
LocalRepos []string
GlobalRepos []string
Aggregates []MessageArg
Singletons []MessageArg
}
func GetModuleArg ¶ added in v0.12.30
type PluginOptions ¶ added in v0.12.30
func (*PluginOptions) ParamFunc ¶ added in v0.12.30
func (op *PluginOptions) ParamFunc(key, value string) error
type PropFilter ¶
type PropFilter string
type ServiceArg ¶
type ServiceArg struct {
C uint64
Methods []MethodArg
HasRestProxy bool
// 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(s *protogen.Service) ServiceArg
func (ServiceArg) Name ¶
func (sa ServiceArg) Name() string
func (ServiceArg) NameCC ¶
func (sa ServiceArg) NameCC() string
func (ServiceArg) NameKC ¶
func (sa ServiceArg) NameKC() string
func (ServiceArg) NameSC ¶ added in v0.12.30
func (sa ServiceArg) NameSC() string
func (ServiceArg) With ¶ added in v0.12.30
func (sa ServiceArg) With(f *protogen.File) ServiceArg