@@ -4,16 +4,16 @@ type DB struct {
4
4
Disable bool `mapstructure:"disable" json:"disable" yaml:"disable"`
5
5
Type string `mapstructure:"type" json:"type" yaml:"type"`
6
6
AliasName string `mapstructure:"alias-name" json:"alias-name" yaml:"alias-name"`
7
- Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址:端口
8
- Port string `mapstructure:"port" json:"port" yaml:"port"` //:端口
9
- Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
10
- Dbname string `mapstructure:"db-name" json:"dbname " yaml:"db-name"` // 数据库名
11
- Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
12
- Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
13
- MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns " yaml:"max-idle-conns"` // 空闲中的最大连接数
14
- MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns " yaml:"max-open-conns"` // 打开到数据库的最大连接数
15
- LogMode string `mapstructure:"log-mode" json:"logMode " yaml:"log-mode"` // 是否开启Gorm全局日志
16
- LogZap bool `mapstructure:"log-zap" json:"logZap " yaml:"log-zap"`
7
+ Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址:端口
8
+ Port string `mapstructure:"port" json:"port" yaml:"port"` //:端口
9
+ Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
10
+ Dbname string `mapstructure:"db-name" json:"db-name " yaml:"db-name"` // 数据库名
11
+ Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
12
+ Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
13
+ MaxIdleConns int `mapstructure:"max-idle-conns" json:"max-idle-conns " yaml:"max-idle-conns"` // 空闲中的最大连接数
14
+ MaxOpenConns int `mapstructure:"max-open-conns" json:"max-open-conns " yaml:"max-open-conns"` // 打开到数据库的最大连接数
15
+ LogMode string `mapstructure:"log-mode" json:"log-mode " yaml:"log-mode"` // 是否开启Gorm全局日志
16
+ LogZap bool `mapstructure:"log-zap" json:"log-zap " yaml:"log-zap"`
17
17
}
18
18
19
19
func (m * DB ) Dsn () string {
0 commit comments