Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { // DefList map DefList map[string]*ModelDef // PkgFile path for parse PkgFile string // PkgName contains name of parsed package PkgName string // ModelImport name, by default `model` ModelImport string // FieldImport name, by default `field` FieldImport string // contains filtered or unexported fields }
Context for parsing
type FieldDef ¶
type FieldDef struct { // Field instance Field field.Mapper // MethodName in model instance which returns this field MethodName string }
func NewFieldDef ¶
NewFieldDef instance constructo, name should be method name not name from table
type ModelDef ¶
type ModelDef struct { // Model instance Model model.Base // Fields map by their model instance getter methods names Fields map[string]*FieldDef // TypeDefined in parsed file, and no need generate it struct TypeDefined bool }
ModelDef options
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser golang file
func (*Parser) InspectTypes ¶
InspectTypes declarations
func (*Parser) InspectVars ¶
InspectVars declarations
Click to show internal directories.
Click to hide internal directories.