Documentation ¶
Index ¶
- func GetDBTag() string
- func GetIsDev() bool
- func GetIsForeignKey() bool
- func GetIsGUI() bool
- func GetIsNullToPoint() bool
- func GetIsOutFunc() bool
- func GetIsOutSQL() bool
- func GetIsTableName() bool
- func GetIsWEBTag() bool
- func GetIsWebTagPkHidden() bool
- func GetLG() string
- func GetMysqlConStr() string
- func GetOutDir() string
- func GetSimple() bool
- func GetSingularTable() bool
- func GetURLTag() string
- func InitFile(filename string) error
- func IsRunTesting() bool
- func SaveToFile() error
- func SetDBTag(s string)
- func SetForeignKey(b bool)
- func SetIsDev(b bool)
- func SetIsGUI(b bool)
- func SetIsNullToPoint(b bool)
- func SetIsOutFunc(b bool)
- func SetIsOutSQL(b bool)
- func SetIsTableName(b bool)
- func SetLG(s string)
- func SetMysqlDbInfo(info *DBInfo)
- func SetOutDir(outDir string)
- func SetSimple(b bool)
- func SetSingularTable(b bool)
- func SetURLTag(s string)
- type CfgBase
- type Config
- type DBInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIsNullToPoint ¶
func GetIsNullToPoint() bool
GetIsNullToPoint get if with null to porint in sturct
func GetMysqlConStr ¶
func GetMysqlConStr() string
GetMysqlConStr Get MySQL connection string.获取mysql 连接字符串
func GetSingularTable ¶
func GetSingularTable() bool
GetSingularTable Get Disabled Table Name Plurals.获取禁用表名复数
func IsRunTesting ¶
func IsRunTesting() bool
IsRunTesting Determine whether to use it in a test environment.判断是否在测试环境下使用
func SetIsNullToPoint ¶
func SetIsNullToPoint(b bool)
SetIsNullToPoint if with null to porint in struct
func SetMysqlDbInfo ¶
func SetMysqlDbInfo(info *DBInfo)
SetMysqlDbInfo Update MySQL configuration information
func SetSingularTable ¶
func SetSingularTable(b bool)
SetSingularTable Set Disabled Table Name Plurals.设置禁用表名复数
Types ¶
type CfgBase ¶
type CfgBase struct { // SerialNumber string `json:"serial_number" yaml:"serial_number"` // version.版本号 // ServiceName string `json:"service_name" yaml:"service_name"` // service name .service名字 // ServiceDisplayname string `json:"service_displayname" yaml:"service_displayname"` // display name .显示名 // SerciceDesc string `json:"sercice_desc" yaml:"sercice_desc"` // sercice desc .service描述 IsDev bool `json:"is_dev" yaml:"is_dev"` // Is it a development version?是否是开发版本 }
CfgBase base config struct
type Config ¶
type Config struct { CfgBase `yaml:"base"` DBInfo DBInfo `yaml:"db_info"` OutDir string `yaml:"out_dir"` URLTag string `yaml:"url_tag"` // url tag Language string `yaml:"language"` // language DbTag string `yaml:"db_tag"` // 数据库标签(gormt,db) Simple bool `yaml:"simple"` IsWEBTag bool `yaml:"is_web_tag"` IsWebTagPkHidden bool `yaml:"is_web_tag_pk_hidden"` // web标记是否隐藏主键 SingularTable bool `yaml:"singular_table"` IsForeignKey bool `yaml:"is_foreign_key"` IsOutSQL bool `yaml:"is_out_sql"` IsOutFunc bool `yaml:"is_out_func"` IsGUI bool `yaml:"is_gui"` // IsTableName bool `yaml:"is_table_name"` IsNullToPoint bool `yaml:"is_null_to_point"` // null to porint }
Config custom config struct
Click to show internal directories.
Click to hide internal directories.