Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DbLoggerConfig *oklogger.LoggerConfig = &oklogger.LoggerConfig{ LogFileFolder: "/var/log", LogFileName: "db.log", LogLevel: logrus.InfoLevel, LogFileMaxSizeMb: 500, LogFileMaxBackups: 5, LogFileMaxAge: 30, LogFileCompress: false, EnableConsole: true, EnableFile: true, } )
Functions ¶
func AddConnConfig ¶
func GetDBConnFromConfig ¶
GetDBConnFromConfig :
func NewDbLogger ¶
func NewDbLogger() *dblogger
Types ¶
type DbConfig ¶
type DbConfig struct { Host string `json:"host" yaml:"host"` Port int `json:"port" yaml:"port"` DbName string `json:"dbName" yaml:"dbName"` User string `json:"user" yaml:"user"` Password string `json:"password" yaml:"password"` MaxIdleConns int `json:"maxIdleConns" yaml:"maxIdleConns"` MaxOpenConns int `json:"maxOpenConns" yaml:"maxOpenConns"` Dsn string `json:"dsn" yaml:"dsn"` }
Click to show internal directories.
Click to hide internal directories.