Documentation ¶
Index ¶
- Constants
- 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) FieldAsPtr(c 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() error
- func (t *Table2Struct) SavePath(p string) *Table2Struct
- func (t *Table2Struct) StructPre(s string) *Table2Struct
- func (t *Table2Struct) StructSuf(s string) *Table2Struct
- func (t *Table2Struct) Table(tab string) *Table2Struct
- func (t *Table2Struct) TagKey(r string) *Table2Struct
Constants ¶
View Source
const LIB_IMG = ``
View Source
const VERSION = "0.0.3"
View Source
const VERSION_TEXT = "convert of mysql schema to golang struct"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 ¶ added in v0.0.4
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) FieldAsPtr ¶ added in v0.0.6
func (t *Table2Struct) FieldAsPtr(c 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) Run ¶
func (t *Table2Struct) Run() error
func (*Table2Struct) SavePath ¶
func (t *Table2Struct) SavePath(p string) *Table2Struct
func (*Table2Struct) StructPre ¶ added in v0.0.7
func (t *Table2Struct) StructPre(s string) *Table2Struct
func (*Table2Struct) StructSuf ¶ added in v0.0.7
func (t *Table2Struct) StructSuf(s 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.