Documentation ¶
Index ¶
Constants ¶
View Source
const PREFIX string = "vgen"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArrayField ¶ added in v0.0.6
type ArrayField struct {
Type FieldType
}
func (ArrayField) String ¶ added in v0.0.6
func (t ArrayField) String() string
type CustomField ¶ added in v0.0.6
type CustomField struct {
Value string
}
func (CustomField) String ¶ added in v0.0.6
func (t CustomField) String() string
type Data ¶
func (Data) CreateTemplate ¶
CreateTemplate uses Data class to generate a go file
type FieldType ¶
type FieldType interface { String() string // contains filtered or unexported methods }
FieldType holds methods needed for template generation
type ImportedField ¶ added in v0.0.6
type ImportedField struct { Import string Type CustomField }
func (ImportedField) String ¶ added in v0.0.6
func (t ImportedField) String() string
type PrimitiveField ¶ added in v0.0.6
type PrimitiveField struct {
Value string
}
Data types
func (PrimitiveField) String ¶ added in v0.0.6
func (t PrimitiveField) String() string
String functions
type Struct ¶ added in v0.0.6
type Struct struct { Name string Fields []StructField }
Struct is used to generate template
type StructField ¶ added in v0.0.6
StructField is used to generate template
func (StructField) BaseType ¶ added in v0.0.6
func (f StructField) BaseType() FieldType
Used to generate template
func (StructField) Convert ¶ added in v0.0.6
func (f StructField) Convert() string
Convert is used to generate template
func (StructField) LowercaseName ¶ added in v0.0.6
func (f StructField) LowercaseName() string
LowercaseName is used to generate template
func (StructField) Rule ¶ added in v0.0.6
func (f StructField) Rule() string
Rule is used to generate template
func (StructField) String ¶ added in v0.0.6
func (f StructField) String() string
String is used to generate template
Click to show internal directories.
Click to hide internal directories.