entity.go 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. }
  39. type MongoStruct struct {
  40. Address string `json:"address"`
  41. Size int `json:"size"`
  42. DbName string `json:"dbName"`
  43. UserName string `json:"userName,optional"`
  44. Password string `json:"password,optional"`
  45. Collection string `json:"collection,optional"`
  46. CollectionBack string `json:"collectionBack,optional"`
  47. MaxOpenConns int `json:"maxOpenConns,optional"`
  48. MaxIdleConns int `json:"maxIdleConns,optional"`
  49. }
  50. type MongoDb struct {
  51. DbName string `json:"dbName"`
  52. Size int `json:"size"`
  53. Address string `json:"address"`
  54. }
  55. type mysqlDb struct {
  56. DbName string `json:"dbName"`
  57. Address string `json:"address"`
  58. UserName string `json:"userName"`
  59. PassWord string `json:"passWord"`
  60. MaxOpenConns int `json:"maxOpenConns"`
  61. MaxIdleConns int `json:"maxIdleConns"`
  62. }
  63. var (
  64. ConfigJson RpcConfig
  65. PopupIdMap = map[int]bool{}
  66. )