Documentation ¶
Index ¶
- type Client
- type ConfigDefinition
- type Logger
- func (l *Logger) Error(ctx context.Context, s string, i ...interface{})
- func (l *Logger) Info(ctx context.Context, s string, i ...interface{})
- func (l *Logger) LogMode(level logger.LogLevel) logger.Interface
- func (l *Logger) Trace(ctx context.Context, begin time.Time, ...)
- func (l *Logger) Warn(ctx context.Context, s string, i ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client gorm client
func NewClient ¶
func NewClient(config *ConfigDefinition) (client *Client, err error)
NewClient new redis client
type ConfigDefinition ¶
type ConfigDefinition struct { // 用户名称 UserName string // 密码 Password string // 数据库名 Database string // 地址 Url string // 相关参数 Param string // 超时时间,要小于数据库的超时时间,单位(秒) ConnMaxLifetime time.Duration // 数据库的最大打开连接数 MaxOpenConnNumber int // 空闲的最大连接数 MaxIdleConnNumber int }
ConfigDefinition gorm配置信息
Click to show internal directories.
Click to hide internal directories.