Documentation
¶
Index ¶
- Variables
- func FmtFieldName(s string) string
- func Generate(columnTypes map[string]map[string]string, tableName string, structName string, ...) ([]byte, error)
- func GenerateOne(columnTypes map[string]map[string]string, tableName string, structName string, ...) ([]byte, error)
- func GetColumnsFromMysqlTable(mariadbUser string, mariadbPassword string, mariadbHost string, ...) (*map[string]map[string]string, error)
- func Lcfirst(str string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = false
Debug level logging
Functions ¶
func FmtFieldName ¶
func Generate ¶
func Generate(columnTypes map[string]map[string]string, tableName string, structName string, pkgName string, jsonAnnotation bool, gormAnnotation bool, gureguTypes bool, createdKey, updatedKey string) ([]byte, error)
写入不同目录的文件中(分层)
func GenerateOne ¶
func GenerateOne(columnTypes map[string]map[string]string, tableName string, structName string, pkgName string, jsonAnnotation bool, gormAnnotation bool, gureguTypes bool, createdKey, updatedKey string) ([]byte, error)
Generate Given a Column map with datatypes and a name structName, attempts to generate a struct definition 写入一个文件
func GetColumnsFromMysqlTable ¶
func GetColumnsFromMysqlTable(mariadbUser string, mariadbPassword string, mariadbHost string, mariadbPort int, mariadbDatabase string, mariadbTable string) (*map[string]map[string]string, error)
GetColumnsFromMysqlTable Select column details from information schema and return map of map
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.