Documentation ¶
Index ¶
- func CopyDir(src string, dst string) (err error)
- func CopyFile(src, dst string) (err error)
- type ParseEngine
- func (p *ParseEngine) BareDatabaseSchema() error
- func (p *ParseEngine) Close()
- func (p *ParseEngine) GenerateGormModel()
- func (p *ParseEngine) GenerateProjectCode()
- func (p *ParseEngine) GoFmt()
- func (p *ParseEngine) ParseDatabaseSchema() error
- func (p *ParseEngine) SaveFlagsToUserConfigFile() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.
func CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.
Types ¶
type ParseEngine ¶
type ParseEngine struct { OutPath string OutPackage string MysqlAddr string MysqlUser string MysqlPassword string MysqlDatabase string MysqlCharset string AppSecret string AppListen string Tables []*schema AuthTable string AuthPassword string // contains filtered or unexported fields }
ParseEngine parser engine
func NewGuiParseEngine ¶
func NewGuiParseEngine(mysqlUser, mysqlPassword, mysqlAddr, mysqlDatabase, mysqlCharset, outDir, appListen, authTable, authColumn string) (*ParseEngine, error)
NewParseEngine create a parser engine
func NewParseEngine ¶
func NewParseEngine(mysqlUser, mysqlPassword, mysqlAddr, mysqlDatabase, mysqlCharset, outDir, appListen, authTable, authColumn string) *ParseEngine
func (*ParseEngine) BareDatabaseSchema ¶
func (p *ParseEngine) BareDatabaseSchema() error
BareDatabaseSchema create a bare project
func (*ParseEngine) GenerateGormModel ¶
func (p *ParseEngine) GenerateGormModel()
GenerateGormModel just generate GORM model file
func (*ParseEngine) GenerateProjectCode ¶
func (p *ParseEngine) GenerateProjectCode()
GenerateProjectCode generate go models and handlers file
func (*ParseEngine) ParseDatabaseSchema ¶
func (p *ParseEngine) ParseDatabaseSchema() error
ParseDatabaseSchema get MySQL database schema
func (*ParseEngine) SaveFlagsToUserConfigFile ¶
func (p *ParseEngine) SaveFlagsToUserConfigFile() error
SaveFlagsToUserConfigFile write flags value to viper config file