- package cfg
-
- import (
- "time"
- )
-
- type Config struct {
- Debug bool `yaml:"debug"`
- Prd bool `yaml:"prd"`
- CurlDebug bool `yaml:"curldebug"`
- SrvAddr string `yaml:"srv_addr"`
- RedisAddr string `yaml:"redis_addr"`
- RedisPassword string `yaml:"redis_password"`
- DB DBCfg `yaml:"db"`
- ImDB DBCfg `yaml:"im_db"`
- Log LogCfg `yaml:"log"`
- ImBusinessRpc ImBusinessRpcCfg `yaml:"im_business_rpc"`
- ImLogicRpc ImLogicRpcCfg `yaml:"im_logic_rpc"`
- Local bool
- MQ MQCfg `yaml:"mq"`
- ES ESCfg
- }
-
- type ImBusinessRpcCfg struct {
- URL string `yaml:"url"`
- PORT string `yaml:"port"`
- }
-
- type ImLogicRpcCfg struct {
- URL string `yaml:"url"`
- PORT string `yaml:"port"`
- }
-
- type AppCommCfg struct {
- OuterURL string `yaml:"outer_url"`
- }
-
- type ArkIDCfg struct {
- Admin string `yaml:"admin"`
- AdminPassword string `yaml:"admin_password"`
- Url string `yaml:"url"`
- }
-
-
- type DBCfg struct {
- Host string `yaml:"host"`
- Name string `yaml:"name"`
- User string `yaml:"user"`
- Psw string `yaml:"psw"`
- ShowLog bool `yaml:"show_log"`
- MaxLifetime time.Duration `yaml:"max_lifetime"`
- MaxOpenConns int `yaml:"max_open_conns"`
- MaxIdleConns int `yaml:"max_idle_conns"`
- Path string `yaml:"path"`
- }
-
-
- type LogCfg struct {
- AppName string `yaml:"app_name" `
- Level string `yaml:"level"`
- IsStdOut bool `yaml:"is_stdout"`
- TimeFormat string `yaml:"time_format"`
- Encoding string `yaml:"encoding"`
-
- IsFileOut bool `yaml:"is_file_out"`
- FileDir string `yaml:"file_dir"`
- FileName string `yaml:"file_name"`
- FileMaxSize int `yaml:"file_max_size"`
- FileMaxAge int `yaml:"file_max_age"`
- }
-
- type MQCfg struct {
- Host string `yaml:"host"`
- Port string `yaml:"port"`
- User string `yaml:"user"`
- Pwd string `yaml:"pwd"`
- }
-
- type ESCfg struct {
- Url string `yaml:"url"`
- User string `yaml:"user"`
- Pwd string `yaml:"pwd"`
- }
|