Documentation
¶
Index ¶
Constants ¶
View Source
const (
DBInitErr = "DBInitErr"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PostgresConfig ¶
type PostgresConfig struct { DSN string `json:"DSN"` // 最大活跃链接数 MaxOpenConns int `json:"MaxOpenConns"` // 最大空闲链接数 MaxIdleConns int `json:"MaxIdleConns"` // 最大生命时间(秒) MaxLifetime int `json:"MaxLifetime"` // 最大空闲时间(秒) MaxIdleTime int `json:"MaxIdleTime"` // 日志级别 LogLevel db.LogLevel `json:"LogLevel"` // 慢sql 定义(单位秒) SlowThreshold int `json:"SlowThreshold"` }
func (*PostgresConfig) LoadDSN ¶
func (c *PostgresConfig) LoadDSN(dbName string)
Click to show internal directories.
Click to hide internal directories.