[feat]: config for TLS connection in init MySQL (#1388)

This commit is contained in:
conbanwa
2023-03-25 20:02:59 +08:00
committed by GitHub
parent 64608f6b05
commit a3ab0b3243
3 changed files with 12 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ type GeneralDB struct {
MaxOpenConns int `mapstructure:"max-open-conns" json:"max-open-conns" yaml:"max-open-conns"` // 打开到数据库的最大连接数
LogMode string `mapstructure:"log-mode" json:"log-mode" yaml:"log-mode"` // 是否开启Gorm全局日志
LogZap bool `mapstructure:"log-zap" json:"log-zap" yaml:"log-zap"` // 是否通过zap写入日志文件
InitTls bool `mapstructure:"init-tls" json:"init-tls" yaml:"init-tls"` // 初始化时是否开启TLS
}
type SpecializedDB struct {