Documentation
¶
Index ¶
- Constants
- func FillDNS(userName string, password string, host string, port int, dbName string, ...) string
- type Config
- type DaoMeta
- func (this *DaoMeta) GetModelName() string
- func (this *DaoMeta) GetModelPackage() string
- func (this *DaoMeta) GetModelPathName() string
- func (this *DaoMeta) GetNewStructFunc() string
- func (this *DaoMeta) GetStructName() string
- func (this *DaoMeta) Run(temp *template.Template) ([]byte, error)
- func (this *DaoMeta) Validate() error
- type DbMeta
- type DbType
- type DtoMeta
- type DtoMetas
- type FieldMeta
- type ModelMeta
- type Template
Constants ¶
View Source
const (
CreateTable = "Create Table"
)
View Source
const (
Mysql = DbType("mysql")
)
type
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// db
DbType DbType
DbName string
DbPort int
DbHost string
DbUserName string
DbPassword string
DbCharset string
// save
SaveFile string
// table
TableNames []string
// template
GeneratorModel bool
GeneratorDao bool
GeneratorDto bool
DaoPackageName string
ModelPackageName string
DtoPackageName string
Tags []string
// contains filtered or unexported fields
}
type DaoMeta ¶
func (*DaoMeta) GetModelName ¶
func (*DaoMeta) GetModelPackage ¶
func (*DaoMeta) GetModelPathName ¶
type DtoMetas ¶
func NewDtoMeta ¶
type FieldMeta ¶
type FieldMeta struct {
Name string
FieldType string
IsNullable string //OK YES
ColumnComment string // 字段描述信息
Tags []string
}
func (*FieldMeta) GetGoDaoType ¶
func (*FieldMeta) GetGoField ¶
type ModelMeta ¶
type ModelMeta struct {
DbName string
TableName string
PackageName string
Fields []FieldMeta
Db *xorm.Engine
Tags []string
// contains filtered or unexported fields
}
func NewModelMeta ¶
func (*ModelMeta) GetCreateSql ¶
func (*ModelMeta) HasTimeFiled ¶
Click to show internal directories.
Click to hide internal directories.