Documentation ¶
Index ¶
- func FindEnum(gen *protogen.Plugin, ed protoreflect.EnumDescriptor) *protogen.Enum
- func FindEnumByDescriptor(enums []*protogen.Enum, ed protoreflect.EnumDescriptor) *protogen.Enum
- func FindEnumFromMessageByDescriptor(messages []*protogen.Message, ed protoreflect.EnumDescriptor) *protogen.Enum
- func FindEnumGoIdent(gen *protogen.Plugin, ed protoreflect.EnumDescriptor) protogen.GoIdent
- func FindMessage(gen *protogen.Plugin, md protoreflect.MessageDescriptor) *protogen.Message
- func FindMessageByDescriptor(messages []*protogen.Message, md protoreflect.MessageDescriptor) *protogen.Message
- func FindMessageGoIdent(gen *protogen.Plugin, md protoreflect.MessageDescriptor) protogen.GoIdent
- func GenGetArguments(keys []MapKey) string
- func GenGetParams(keys []MapKey) string
- func GetTypeEmptyValue(fd protoreflect.FieldDescriptor) string
- func ParseGoType(gen *protogen.Plugin, fd protoreflect.FieldDescriptor) any
- func ParseIndexFieldName(gen *protogen.Plugin, fd protoreflect.FieldDescriptor) string
- func ParseIndexFieldNameAsFuncParam(gen *protogen.Plugin, fd protoreflect.FieldDescriptor) string
- func ParseIndexFieldNameAsKeyStructFieldName(gen *protogen.Plugin, fd protoreflect.FieldDescriptor) string
- type MapKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindEnum ¶
func FindEnum(gen *protogen.Plugin, ed protoreflect.EnumDescriptor) *protogen.Enum
func FindEnumByDescriptor ¶
func FindEnumByDescriptor(enums []*protogen.Enum, ed protoreflect.EnumDescriptor) *protogen.Enum
func FindEnumFromMessageByDescriptor ¶
func FindEnumFromMessageByDescriptor(messages []*protogen.Message, ed protoreflect.EnumDescriptor) *protogen.Enum
func FindEnumGoIdent ¶
func FindEnumGoIdent(gen *protogen.Plugin, ed protoreflect.EnumDescriptor) protogen.GoIdent
func FindMessage ¶
func FindMessage(gen *protogen.Plugin, md protoreflect.MessageDescriptor) *protogen.Message
func FindMessageByDescriptor ¶
func FindMessageByDescriptor(messages []*protogen.Message, md protoreflect.MessageDescriptor) *protogen.Message
func FindMessageGoIdent ¶
func FindMessageGoIdent(gen *protogen.Plugin, md protoreflect.MessageDescriptor) protogen.GoIdent
func GenGetArguments ¶
GenGetArguments generates function arguments, which are the real values passed to the function.
func GenGetParams ¶
GenGetParams generates function parameters, which are the names listed in the function's definition.
func GetTypeEmptyValue ¶
func GetTypeEmptyValue(fd protoreflect.FieldDescriptor) string
func ParseGoType ¶
func ParseGoType(gen *protogen.Plugin, fd protoreflect.FieldDescriptor) any
ParseGoType converts a FieldDescriptor to its Go type. returns string if fd is scalar type, and protogen.GoIdent if fd is enum or message type.
func ParseIndexFieldName ¶
func ParseIndexFieldName(gen *protogen.Plugin, fd protoreflect.FieldDescriptor) string
func ParseIndexFieldNameAsFuncParam ¶
func ParseIndexFieldNameAsFuncParam(gen *protogen.Plugin, fd protoreflect.FieldDescriptor) string
func ParseIndexFieldNameAsKeyStructFieldName ¶
func ParseIndexFieldNameAsKeyStructFieldName(gen *protogen.Plugin, fd protoreflect.FieldDescriptor) string
Types ¶
Click to show internal directories.
Click to hide internal directories.