Documentation
¶
Index ¶
- func ApplyEnums(w io.Writer, opts Opts, enums []*EnumDescription) error
- func ApplyEnumsTemplate(f *protogen.GeneratedFile, opts Opts, enums []*EnumDescription) error
- func ApplyMessages(w io.Writer, opts Opts, msgs []*MessageDescription) error
- func ApplyMessagesTemplate(f *protogen.GeneratedFile, opts Opts, msgs []*MessageDescription) error
- func ApplyTSEnums(w io.Writer, opts TSOpts, enums []*EnumDescription) error
- func ApplyTemplateTS(f *protogen.GeneratedFile, opts TSOpts, fileEnumInfos []FileEnumInfo) error
- func ExternalPackageName(fullname, pack string) string
- func TrimLocalPackageName(val, pack string) string
- type EnumDescription
- type FieldMeta
- type FileEnumInfo
- type MessageDescription
- type Opts
- type TSOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyEnums ¶
func ApplyEnums(w io.Writer, opts Opts, enums []*EnumDescription) error
func ApplyEnumsTemplate ¶ added in v0.17.78
func ApplyEnumsTemplate(f *protogen.GeneratedFile, opts Opts, enums []*EnumDescription) error
This function is called with a param which contains the entire definition of a method.
func ApplyMessages ¶
func ApplyMessages(w io.Writer, opts Opts, msgs []*MessageDescription) error
func ApplyMessagesTemplate ¶ added in v0.17.78
func ApplyMessagesTemplate(f *protogen.GeneratedFile, opts Opts, msgs []*MessageDescription) error
This function is called with a param which contains the entire definition of a method.
func ApplyTSEnums ¶ added in v0.16.75
func ApplyTSEnums(w io.Writer, opts TSOpts, enums []*EnumDescription) error
func ApplyTemplateTS ¶ added in v0.16.75
func ApplyTemplateTS(f *protogen.GeneratedFile, opts TSOpts, fileEnumInfos []FileEnumInfo) error
This function is called with a param which contains the entire definition of a method.
func ExternalPackageName ¶ added in v0.18.86
func TrimLocalPackageName ¶ added in v0.18.86
Types ¶
type EnumDescription ¶ added in v0.18.86
type EnumDescription struct { Name string Enums []*api.EnumMeta Documentation string IsBitmask bool FullName string ProtogenEnum *protogen.Enum Package string FileName string }
func CreateEnumDescription ¶
func CreateEnumDescription(en *protogen.Enum) *EnumDescription
CreateEnumDescription convert enum descriptor to EnumMeta message
func GetEnumsDescriptions ¶ added in v0.18.86
func GetEnumsDescriptions(gp *protogen.Plugin, opts Opts) []*EnumDescription
type FieldMeta ¶ added in v0.18.86
type FieldMeta struct { Name string FullName string Display string Documentation string Type string SearchType string SearchOptions api.SearchOption_Enum Required bool RequiredOr []string StructName string Fields []*FieldMeta EnumDescription *EnumDescription Min int32 Max int32 MinCount int32 MaxCount int32 // field is the original field descriptor ProtogenField *protogen.Field EnumDescriptionName string FieldsDescriptionName string }
type FileEnumInfo ¶ added in v0.16.75
type FileEnumInfo struct { FileName string Enums []*EnumDescription }
type MessageDescription ¶ added in v0.18.86
type MessageDescription struct { Name string Display string Fields []*FieldMeta Documentation string FullName string TableSource string TableHeader []string // message is the original message descriptor ProtogenMessage *protogen.Message Package string }
func CreateMessageDescription ¶
func CreateMessageDescription(msg *protogen.Message, args Opts, queueToDiscover map[string]*protogen.Message) *MessageDescription
CreateMessageDescription convert enum descriptor to EnumMeta message
func GetMessagesDescriptions ¶ added in v0.18.86
func GetMessagesDescriptions(gp *protogen.Plugin, opts Opts) []*MessageDescription
Click to show internal directories.
Click to hide internal directories.