35 lines
1003 B
Go
35 lines
1003 B
Go
|
// Package config.sql ...
|
||
|
//
|
||
|
// Author : go_developer@163.com<白茶清欢>
|
||
|
//
|
||
|
// Date : 6:55 下午 2021/8/7
|
||
|
package config
|
||
|
|
||
|
import (
|
||
|
"git.zhangdeman.cn/zhangdeman/gopkg/logger"
|
||
|
"git.zhangdeman.cn/zhangdeman/gopkg/middleware/mysql"
|
||
|
)
|
||
|
|
||
|
// Database 数据库配置
|
||
|
//
|
||
|
// Author : go_developer@163.com<白茶清欢>
|
||
|
//
|
||
|
// Date : 6:55 下午 2021/8/7
|
||
|
type Database struct {
|
||
|
DB *mysql.DBConfig `json:"db" yaml:"db"`
|
||
|
Log *DBLog `json:"log" yaml:"log"`
|
||
|
}
|
||
|
|
||
|
// DBLog 数据库日志配置
|
||
|
//
|
||
|
// Author : go_developer@163.com<白茶清欢>
|
||
|
//
|
||
|
// Date : 7:04 下午 2021/8/7
|
||
|
type DBLog struct {
|
||
|
Level int `json:"level" yaml:"level"`
|
||
|
Console bool `json:"console" yaml:"console"`
|
||
|
TraceFieldName string `json:"trace_field_name" yaml:"trace_field_name"`
|
||
|
ExtractFieldList []string `json:"extract_field_list" yaml:"extract_field_list"`
|
||
|
Split *logger.RotateLogConfig `json:"split" yaml:"split"`
|
||
|
}
|