搬迁mysql相关操作
This commit is contained in:
44
define.go
Normal file
44
define.go
Normal file
@ -0,0 +1,44 @@
|
||||
// Package mysql...
|
||||
//
|
||||
// Description : 数据定义
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2021-03-01 9:27 下午
|
||||
package mysql
|
||||
|
||||
import (
|
||||
"git.zhangdeman.cn/zhangdeman/logger"
|
||||
"go.uber.org/zap/zapcore"
|
||||
)
|
||||
|
||||
// DBConfig 数据库连接的配置
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 9:32 下午 2021/3/1
|
||||
type DBConfig struct {
|
||||
Host string `json:"host" yaml:"host"` // 主机
|
||||
Port uint `json:"port" yaml:"port"` // 端口
|
||||
Database string `json:"database" yaml:"database"` // 数据库
|
||||
Username string `json:"username" yaml:"username"` // 账号
|
||||
Password string `json:"password" yaml:"password"` // 密码
|
||||
Charset string `json:"charset" yaml:"charset"` // 编码
|
||||
MaxOpenConnection uint `json:"max_open_connection" yaml:"max_open_connection"` // 打开的最大连接数
|
||||
MaxIdleConnection uint `json:"max_idle_connection" yaml:"max_idle_connection"` // 最大空闲连接数
|
||||
}
|
||||
|
||||
// LogConfig 日志配置
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 10:51 下午 2021/3/1
|
||||
type LogConfig struct {
|
||||
Level zapcore.Level
|
||||
ConsoleOutput bool
|
||||
Encoder zapcore.Encoder
|
||||
SplitConfig *logger.RotateLogConfig
|
||||
ExtractFieldList []string
|
||||
TraceFieldName string
|
||||
Skip int
|
||||
}
|
Reference in New Issue
Block a user