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 ApplyModels(w io.Writer, opts Opts, msgs []*MessageDescription) error
- func ApplyModelsTemplate(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, pkg string) string
- func GenerateGoModels(w io.Writer, opts Opts, msgs []*MessageDescription) error
- func TrimLocalPackageName(name, pkg 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 ApplyModels ¶ added in v0.23.106
func ApplyModels(w io.Writer, opts Opts, msgs []*MessageDescription) error
func ApplyModelsTemplate ¶ added in v0.23.106
func ApplyModelsTemplate(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.17.84
func GenerateGoModels ¶ added in v0.23.106
func GenerateGoModels(w io.Writer, opts Opts, msgs []*MessageDescription) error
func TrimLocalPackageName ¶ added in v0.17.84
Types ¶
type EnumDescription ¶ added in v0.18.85
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.85
func GetEnumsDescriptions(gp *protogen.Plugin, opts Opts) []*EnumDescription
type FieldMeta ¶ added in v0.17.84
type FieldMeta struct {
Name string
FullName string
Display string
Documentation string
Type string
SearchType string
SearchOptions api.SearchOption_Enum
Required bool
RequiredOr []string
GoName string
StructName string
Fields []*FieldMeta
EnumDescription *EnumDescription
Min int32
Max int32
MinCount int32
MaxCount int32
Deprecated bool
Alias string
// field is the original field descriptor
ProtogenField *protogen.Field
Package string
EnumDescriptionName string
FieldsDescriptionName string
}
type FileEnumInfo ¶ added in v0.16.75
type FileEnumInfo struct {
FileName string
Enums []*EnumDescription
}
type MessageDescription ¶ added in v0.17.84
type MessageDescription struct {
Name string
Display string
Fields []*FieldMeta
Documentation string
FullName string
Deprecated bool
RefreshInterval uint32
// IsInput is true if the message is an input message
IsInput bool
// IsOutput is true if the message is an output message
IsOutput bool
GenerateModel bool
// message is the original message descriptor
ProtogenMessage *protogen.Message
Package string
}
func CreateMessageDescription ¶
func CreateMessageDescription(msg *protogen.Message, isInput, isOutput bool, args Opts, queueToDiscover map[string]*protogen.Message) *MessageDescription
CreateMessageDescription convert enum descriptor to EnumMeta message
func GetMessagesDescriptions ¶ added in v0.18.85
func GetMessagesDescriptions(gp *protogen.Plugin, opts Opts) []*MessageDescription
Click to show internal directories.
Click to hide internal directories.