Documentation ¶ Index ¶ func NewMysqlDb(msl Mysql) *gorm.DB type Mysql Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewMysqlDb ¶ func NewMysqlDb(msl Mysql) *gorm.DB NewMysqlDb 初始化数据库 Types ¶ type Mysql ¶ type Mysql struct { Host string `yaml:"Host"` Port int `yaml:"Port"` Username string `yaml:"Username"` Password string `yaml:"Password"` Database string `yaml:"Database"` } Source Files ¶ View all Source files mysql.go Click to show internal directories. Click to hide internal directories.