Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PgSql ¶
type PgSql struct {
Username string
Password string
Path string
Port int `json:",default=5432"`
SslMode string `json:",default=disable,options=disable|enable"`
TimeZone string `json:",default=Asia/Shanghai"`
Dbname string
MaxIdleConns int `json:",default=10"` // 空闲中的最大连接数
MaxOpenConns int `json:",default=10"` // 打开到数据库的最大连接数
LogMode string `json:",default=dev,options=dev|test|prod|silent"` // 是否开启Gorm全局日志
LogColorful bool `json:",default=false"` // 是否开启日志高亮
SlowThreshold int64 `json:",default=1000"`
}
func (*PgSql) GetColorful ¶
func (*PgSql) GetGormLogMode ¶
func (*PgSql) GetSlowThreshold ¶
Click to show internal directories.
Click to hide internal directories.