diff --git a/app/cfg/cfg_app.go b/app/cfg/cfg_app.go index cbee93c..cdef809 100644 --- a/app/cfg/cfg_app.go +++ b/app/cfg/cfg_app.go @@ -1,7 +1,6 @@ package cfg import ( - db "code.fnuoos.com/EggPlanet/egg_models.git/src" "time" ) @@ -13,7 +12,7 @@ type Config struct { RedisPassword string `yaml:"redis_password"` DB DBCfg `yaml:"db"` ImDB DBCfg `yaml:"im_db"` - BackUpDb db.BackUpDBCfg `yaml:"back_up_db"` + BackUpDb BackUpDBCfg `yaml:"back_up_db"` MQ MQCfg `yaml:"mq"` Log LogCfg `yaml:"log"` ImBusinessRpc ImBusinessRpcCfg `yaml:"im_business_rpc"` @@ -34,6 +33,16 @@ type DBCfg struct { Path string `yaml:"path"` //日志文件存放路径 } +// 数据库配置结构体 +type BackUpDBCfg struct { + Host string `yaml:"host"` //ip及端口 + Name string `yaml:"name"` //库名 + User string `yaml:"user"` //用户 + Psw string `yaml:"psw"` //密码 + ShowLog bool `yaml:"show_log"` //是否显示SQL语句 + Path string `yaml:"path"` //日志文件存放路径 +} + // 日志配置结构体 type LogCfg struct { AppName string `yaml:"app_name" ` diff --git a/app/cfg/init_cfg.go b/app/cfg/init_cfg.go index b736f87..78e48a2 100644 --- a/app/cfg/init_cfg.go +++ b/app/cfg/init_cfg.go @@ -1,7 +1,6 @@ package cfg import ( - db "code.fnuoos.com/EggPlanet/egg_models.git/src" "flag" "io/ioutil" @@ -16,7 +15,7 @@ var ( RedisAddr string RedisPassword string DB *DBCfg - BackUpDb *db.BackUpDBCfg + BackUpDb *BackUpDBCfg IMDB *DBCfg MQ *MQCfg ES *ESCfg