Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // 驱动 Drive string // 连接字符串 DNS string // 是否开启debug Debug bool // 最大空闲连接数 MaxIdleConns int // 最大活动连接数 MaxOpenConns int // 连接的最大存活时间 ConnMaxLifetime time.Duration // 日志库 Logger CeresLogger.Logger // 驱动适配器 Dialector Dialector // 日志配置 LogConfig // gorm的配置 GormConfig }
定义配置信息
func (*Config) WithDriver ¶
WithDriver 设置驱动实例
func (*Config) WithLogger ¶
WithLogger 设置日志输出库
type DriverFunc ¶
Click to show internal directories.
Click to hide internal directories.