Browse Source

update

master
dengbiao 1 week ago
parent
commit
9ef4161254
2 changed files with 12 additions and 4 deletions
  1. +11
    -2
      app/cfg/cfg_app.go
  2. +1
    -2
      app/cfg/init_cfg.go

+ 11
- 2
app/cfg/cfg_app.go View File

@@ -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" `


+ 1
- 2
app/cfg/init_cfg.go View File

@@ -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


Loading…
Cancel
Save