Documentation ¶
Index ¶
- Variables
- func AskForConfirmation() bool
- func ContainsString(slice []string, element string) bool
- func DirExist(path string) bool
- func FileHandler(methods string, tpl *core.StubTemplate)
- func FileModel(driver string, conn string, selectedTables string, tpl *core.StubTemplate)
- func FileReader(file string) (f *os.File, err error)
- func FileRequest(name string, tpl *core.StubTemplate)
- func GetFileName(tbName string) (filename string)
- func StubReplaces(content string, tpl *core.StubTemplate) string
- func WriteFile(file *os.File, content string, tpl *core.StubTemplate)
- type Column
- type DbTransformer
- type ForeignKey
- type MysqlDB
- type OrmTag
- type Table
Constants ¶
This section is empty.
Variables ¶
View Source
var DBDriver = map[string]DbTransformer{ "mysql": &MysqlDB{}, }
Functions ¶
func AskForConfirmation ¶
func AskForConfirmation() bool
func ContainsString ¶
func FileHandler ¶
func FileHandler(methods string, tpl *core.StubTemplate)
func FileModel ¶
func FileModel(driver string, conn string, selectedTables string, tpl *core.StubTemplate)
func FileRequest ¶
func FileRequest(name string, tpl *core.StubTemplate)
func GetFileName ¶
func StubReplaces ¶
func StubReplaces(content string, tpl *core.StubTemplate) string
Types ¶
type DbTransformer ¶
type ForeignKey ¶
type MysqlDB ¶
type MysqlDB struct{}
func (*MysqlDB) GetColumns ¶
func (*MysqlDB) GetConstraints ¶
func (*MysqlDB) GetGoDataType ¶
type OrmTag ¶
type Table ¶
type Table struct { Name string Pk string Uk []string Fk map[string]*ForeignKey Columns []*Column ImportTimePkg bool }
func GetTableObjects ¶
func GetTableObjects(tableNames []string, db *sql.DB, dbTransformer DbTransformer) (tables []*Table)
func (*Table) MarshalColumn ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.