Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnumActionPanic = "@panic" EnumActionError = "@error" EnumActionIgnore = "@ignore" )
Variables ¶
View Source
var DefaultConfigInterface = ConverterConfig{ OutputFile: "./generated/generated.go", OutputPackageName: "generated", Common: Common{Enum: enum.Config{Enabled: true}}, OutputFormat: FormatStruct, }
View Source
var DefaultConfigVariables = ConverterConfig{ OutputFormat: FormatVariable, Common: Common{Enum: enum.Config{Enabled: true}}, }
Functions ¶
func IsEnumAction ¶ added in v1.4.0
Types ¶
type ConfiguredTransformer ¶ added in v1.4.0
type ConfiguredTransformer struct { Name string Transformer enum.Transformer Config string }
type Converter ¶
type ConverterConfig ¶
type ConverterConfig struct { Common Name string OutputFile string OutputPackagePath string OutputPackageName string OutputFormat Format Extend []*method.Definition Comments []string }
func (*ConverterConfig) PackageID ¶ added in v1.2.0
func (conf *ConverterConfig) PackageID() string
type EnumMapping ¶ added in v1.4.0
type EnumMapping struct { Transformers []ConfiguredTransformer Map map[string]string }
type FieldMapping ¶
type FieldMapping struct { Source string Function *method.Definition Ignore bool }
type Method ¶
type Method struct { *method.Definition Common Constructor *method.Definition AutoMap []string Fields map[string]*FieldMapping EnumMapping *EnumMapping RawFieldSettings []string Location string }
func (*Method) Field ¶
func (m *Method) Field(targetName string) *FieldMapping
type Raw ¶
type Raw struct { Converters []RawConverter Global RawLines WorkDir string BuildTags string OuputBuildConstraint string EnumTransformers map[string]enum.Transformer }
type RawConverter ¶
Click to show internal directories.
Click to hide internal directories.