Documentation
¶
Overview ¶
Package code provides functions for preparing data for code generation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldTmpl ¶
type FieldTmpl struct {
Index uint64
FieldName string
FieldType string
IsSlice bool
IsEmbedded bool
}
FieldTmpl has data for template struct field.
type FuncCallTmpl ¶
type FuncCallTmpl struct {
Index uint64
CalleeName string
FieldName string
FieldType string
IsSlice bool
IsSupportedType bool
ParserName string
IsEmbedded bool
IsNamed bool
TargetType string
ImplementsStringParser bool
ImplementsConfigLoader bool
ConfigKey string
HasConfigKey bool
DefaultValue string
HasDefaultValue bool
}
FuncCallTmpl has data for template function call.
type FuncDefTmpl ¶
type FuncDefTmpl struct {
FuncName string
ReturnTypeName string
Calls []FuncCallTmpl
}
FuncDefTmpl has data for template function definition.
type ImportTmpl ¶
ImportTmpl has data for template import.
type PrepareError ¶
PrepareError may occur when preparing data for the template.
type StructDefTmpl ¶
StructDefTmpl has data for template struct definition.
type TmplState ¶
type TmplState struct {
PkgPath string
PkgName string
TypeName string
Entrypoint string
Imports []ImportTmpl
CorePkgName string
StructDefs []StructDefTmpl
FuncDefs []FuncDefTmpl
}
TmplState has data for code template.
func PrepareTemplate ¶
PrepareTemplate prepares data for code template.
Click to show internal directories.
Click to hide internal directories.