Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetGormConfig ¶
Types ¶
type Migration ¶
type Migration struct {
// contains filtered or unexported fields
}
Migration 定义数据库迁移对象
type MigrationVersion ¶
type MigrationVersion struct { Version string `gorm:"primaryKey"` ApplyTime time.Time `gorm:"autoCreateTime"` }
MigrationVersion 数据前一版本表 nolint
func (MigrationVersion) TableName ¶
func (MigrationVersion) TableName() string
type MysqlConfig ¶
type MysqlConfig struct { Host string `json:"host"` // ip:port Username string `json:"username"` Passwd string `json:"passwd"` DB string `json:"db"` Timeout time.Duration `json:"timeout"` // 设置了连接可复用的最大时间 MaxIdle int `json:"maxIdle"` // 设置空闲连接池中连接的最大数量 MaxOpen int `json:"MaxOpen"` // 设置打开数据库连接的最大数量 IsDebug bool `json:"isDebug"` }
MysqlConfig 定义数据库连接配置
Click to show internal directories.
Click to hide internal directories.