entity.go 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. package entity
  2. import (
  3. "github.com/zeromicro/go-zero/core/logx"
  4. "github.com/zeromicro/go-zero/zrpc"
  5. )
  6. type RpcConfig struct {
  7. zrpc.RpcServerConf
  8. FileSystemConf zrpc.RpcClientConf
  9. CalleeId string // 服务名字
  10. ResourceEtcdConf zrpc.RpcClientConf //资源中台
  11. PowersEtcdConf zrpc.RpcClientConf //权益中台
  12. Node int // 节点
  13. Mysql mysqlDb
  14. BaseMysql mysqlDb
  15. Logx logx.LogConf
  16. IsRun bool //定时任务是否开启
  17. CheckEntIsExpire string //
  18. DoMain string
  19. RedisAddrees []string
  20. RedisOutTime int
  21. InternalTime int
  22. Mongo struct {
  23. Main *MongoStruct
  24. Log *MongoStruct
  25. }
  26. BigMemberOff bool
  27. CommonlySize int64 //常用功能设置数量
  28. CommonlyIds string //初始化常用功能内容
  29. NotLoginCommonlyIds string //未登录初始化常用功能内容
  30. UserRolePower []string //用户角色权限集合
  31. MedicalFieldTimespan int64 //医疗领域化 超级订阅 大会员到期时间> 90天
  32. DefaultPopup map[string]Additional //菜单默认弹窗
  33. WorkTableOut string //外网菜单表名
  34. WorkTableInside string //内网菜单表名
  35. RpcPort string //
  36. MenuCacheKey string //多套环境 配置不同key,同一个用户对应不用菜单缓存
  37. PopupIds []int //弹出提示 特殊处理id集合
  38. NsqTopic string
  39. Nsq string
  40. }
  41. type MongoStruct struct {
  42. Address string `json:"address"`
  43. Size int `json:"size"`
  44. DbName string `json:"dbName"`
  45. UserName string `json:"userName,optional"`
  46. Password string `json:"password,optional"`
  47. Collection string `json:"collection,optional"`
  48. CollectionBack string `json:"collectionBack,optional"`
  49. MaxOpenConns int `json:"maxOpenConns,optional"`
  50. MaxIdleConns int `json:"maxIdleConns,optional"`
  51. }
  52. type MongoDb struct {
  53. DbName string `json:"dbName"`
  54. Size int `json:"size"`
  55. Address string `json:"address"`
  56. }
  57. type mysqlDb struct {
  58. DbName string `json:"dbName"`
  59. Address string `json:"address"`
  60. UserName string `json:"userName"`
  61. PassWord string `json:"passWord"`
  62. MaxOpenConns int `json:"maxOpenConns"`
  63. MaxIdleConns int `json:"maxIdleConns"`
  64. }
  65. var (
  66. ConfigJson RpcConfig
  67. PopupIdMap = map[int]bool{}
  68. )