Browse Source

update

master
dengbiao 3 weeks ago
parent
commit
0c6a425dd8
4 changed files with 14 additions and 1 deletions
  1. +2
    -0
      app/cfg/cfg_app.go
  2. +3
    -0
      app/cfg/init_cfg.go
  3. +8
    -0
      etc/cfg.yml
  4. +1
    -1
      go.mod

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

@@ -1,6 +1,7 @@
package cfg package cfg


import ( import (
db "code.fnuoos.com/EggPlanet/egg_models.git/src"
"time" "time"
) )


@@ -12,6 +13,7 @@ type Config struct {
RedisPassword string `yaml:"redis_password"` RedisPassword string `yaml:"redis_password"`
DB DBCfg `yaml:"db"` DB DBCfg `yaml:"db"`
ImDB DBCfg `yaml:"im_db"` ImDB DBCfg `yaml:"im_db"`
BackUpDb db.BackUpDBCfg `yaml:"back_up_db"`
MQ MQCfg `yaml:"mq"` MQ MQCfg `yaml:"mq"`
Log LogCfg `yaml:"log"` Log LogCfg `yaml:"log"`
ImBusinessRpc ImBusinessRpcCfg `yaml:"im_business_rpc"` ImBusinessRpc ImBusinessRpcCfg `yaml:"im_business_rpc"`


+ 3
- 0
app/cfg/init_cfg.go View File

@@ -1,6 +1,7 @@
package cfg package cfg


import ( import (
db "code.fnuoos.com/EggPlanet/egg_models.git/src"
"flag" "flag"
"io/ioutil" "io/ioutil"


@@ -15,6 +16,7 @@ var (
RedisAddr string RedisAddr string
RedisPassword string RedisPassword string
DB *DBCfg DB *DBCfg
BackUpDb *db.BackUpDBCfg
IMDB *DBCfg IMDB *DBCfg
MQ *MQCfg MQ *MQCfg
ES *ESCfg ES *ESCfg
@@ -48,6 +50,7 @@ func InitCfg() {
CurlDebug = conf.CurlDebug CurlDebug = conf.CurlDebug
DB = &conf.DB DB = &conf.DB
IMDB = &conf.ImDB IMDB = &conf.ImDB
BackUpDb = &conf.BackUpDb
Log = &conf.Log Log = &conf.Log
RedisAddr = conf.RedisAddr RedisAddr = conf.RedisAddr
MQ = &conf.MQ MQ = &conf.MQ


+ 8
- 0
etc/cfg.yml View File

@@ -19,6 +19,14 @@ db:
max_idle_conns: 100 max_idle_conns: 100
path: 'tmp/%s.log' path: 'tmp/%s.log'


db_back:
host: '119.23.182.117:3306'
name: 'egg-data-back-up'
user: 'root'
psw: 'Fnuo123com@'
show_log: true
path: 'tmp/%s.log'

im_db: im_db:
host: '119.23.182.117:3306' host: '119.23.182.117:3306'
name: 'egg-im' name: 'egg-im'


+ 1
- 1
go.mod View File

@@ -7,7 +7,7 @@ go 1.19
// replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules // replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules


require ( require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241209061118-ae1be0db6a70
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241209100518-05d64c6d9224
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241209075057-7fac1ca863a7 code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241209075057-7fac1ca863a7
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5


Loading…
Cancel
Save