Documentation ¶
Index ¶
- func T2GO(dns, tableName string) (content string, err error)
- type T2tConfig
- type Table2Struct
- func (t *Table2Struct) Config(c *T2tConfig) *Table2Struct
- func (t *Table2Struct) DB(d *sql.DB) *Table2Struct
- func (t *Table2Struct) DateToTime(d bool) *Table2Struct
- func (t *Table2Struct) Dsn(d string) *Table2Struct
- func (t *Table2Struct) EnableJsonTag(p bool) *Table2Struct
- func (t *Table2Struct) PackageName(r string) *Table2Struct
- func (t *Table2Struct) Prefix(p string) *Table2Struct
- func (t *Table2Struct) RealNameMethod(r string) *Table2Struct
- func (t *Table2Struct) Run() (content string, err error)
- func (t *Table2Struct) RunToFile() error
- func (t *Table2Struct) SavePath(p string) *Table2Struct
- func (t *Table2Struct) Table(tab string) *Table2Struct
- func (t *Table2Struct) TagKey(r string) *Table2Struct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type T2tConfig ¶
type T2tConfig struct { StructNameToHump bool // 结构体名称是否转为驼峰式,默认为false RmTagIfUcFirsted bool // 如果字段首字母本来就是大写, 就不添加tag, 默认false添加, true不添加 TagToLower bool // tag的字段名字是否转换为小写, 如果本身有大写字母的话, 默认false不转 JsonTagToHump bool // json tag是否转为驼峰,默认为false,不转换 UcFirstOnly bool // 字段首字母大写的同时, 是否要把其他字母转换为小写,默认false不转换 SeperatFile bool // 每个struct放入单独的文件,默认false,放入同一个文件 }
type Table2Struct ¶
type Table2Struct struct {
// contains filtered or unexported fields
}
func NewTable2Struct ¶
func NewTable2Struct() *Table2Struct
func (*Table2Struct) Config ¶
func (t *Table2Struct) Config(c *T2tConfig) *Table2Struct
func (*Table2Struct) DB ¶
func (t *Table2Struct) DB(d *sql.DB) *Table2Struct
func (*Table2Struct) DateToTime ¶
func (t *Table2Struct) DateToTime(d bool) *Table2Struct
func (*Table2Struct) Dsn ¶
func (t *Table2Struct) Dsn(d string) *Table2Struct
func (*Table2Struct) EnableJsonTag ¶
func (t *Table2Struct) EnableJsonTag(p bool) *Table2Struct
func (*Table2Struct) PackageName ¶
func (t *Table2Struct) PackageName(r string) *Table2Struct
func (*Table2Struct) Prefix ¶
func (t *Table2Struct) Prefix(p string) *Table2Struct
func (*Table2Struct) RealNameMethod ¶
func (t *Table2Struct) RealNameMethod(r string) *Table2Struct
func (*Table2Struct) SavePath ¶
func (t *Table2Struct) SavePath(p string) *Table2Struct
func (*Table2Struct) Table ¶
func (t *Table2Struct) Table(tab string) *Table2Struct
func (*Table2Struct) TagKey ¶
func (t *Table2Struct) TagKey(r string) *Table2Struct
Click to show internal directories.
Click to hide internal directories.