Documentation
¶
Index ¶
- func GetMapDirectory(tmpl string) (dir string)
- func Match(pattern, content string) (string, error)
- func RegisterInterface(name, content, interfaceTemplate, registerTemplate, importPath string) (data string, err error)
- type Field
- type Options
- func (o *Options) GenerateAttributes(directory string, path string) *Options
- func (o *Options) GenerateCode(tmpl, path string) error
- func (o *Options) GetFieldsFromDB() error
- func (o *Options) ReSetDirectory() *Options
- func (o *Options) ReadCodeTemplates() *Options
- func (o *Options) ReadMetaFields() error
- func (o *Options) Register(registry config.Registry, ...) error
- func (o *Options) SetName(name string) *Options
- type Tmpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMapDirectory ¶
func RegisterInterface ¶
Types ¶
type Field ¶ added in v1.3.0
type Field struct { Name string Type string ColumnName string ColumnComment string MultilineComment bool Tag genField.Tag GORMTag genField.GormTag CustomGenType string Relation *genField.Relation }
Field user input structures
type Options ¶
type Options struct { // Code template Name string Description string FilePath string Directory string CodeTemplate string InterfaceTemplate string RegisterTemplate string // Code attributes - variable PackageName string StructName string StructNamePlural string VariableName string VariableNameSnake string VariableNamePlural string TableName string ModelName string // Code attributes - import path RootPackage string BizPath string StorePath string RequestPath string ModelPath string RelativePath string // Generate by gorm.gen Table string FieldTemplate string Fields string MainFields string UpdatableFields string MetaFields []*Field // Migration TimeStr string }
func (*Options) GenerateAttributes ¶
func (*Options) GenerateCode ¶
func (*Options) GetFieldsFromDB ¶
func (*Options) ReSetDirectory ¶
func (*Options) ReadCodeTemplates ¶
func (*Options) ReadMetaFields ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.