Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EnumBase = []CodeTemplate{
{Name: "Invalid", Raw: typeError},
{Name: "NameToValue", Raw: nameToValueRaw},
{Name: "ValueToName", Raw: valueToNameRaw},
{Name: "String", Raw: stringRaw},
{Name: "Validate", Raw: validateRaw},
{Name: "MarshalJSON", Raw: marshalJSONRaw},
{Name: "UnmarshalJSON", Raw: unmarshalJSONRaw},
{Name: "Value", Raw: rowValueRaw},
{Name: "Scan", Raw: rowScanRaw},
}
View Source
var FileBase = CodeTemplate{Name: "base", Raw: baseRaw}
View Source
var Spare = map[string]CodeTemplate{
"NameToValue": {Name: "NameToValue", Raw: nameToValueSpareRaw},
"ValueToName": {Name: "ValueToName", Raw: valueToNameSpareRaw},
}
Functions ¶
Types ¶
type TransformRule ¶
type TransformRule string
var ( TransformRuleSnake TransformRule = "snake" TransformRuleKebab TransformRule = "kebab" TransformRuleSpace TransformRule = "space" TransformRuleNone TransformRule = "none" )
func (TransformRule) Transform ¶
func (rule TransformRule) Transform(src string) string
func (TransformRule) TransformValues ¶
func (rule TransformRule) TransformValues(typeName string, values []string, keepTPrefix bool) []TypeValue
Click to show internal directories.
Click to hide internal directories.