entity.go 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. }
  25. BigMemberOff bool
  26. CommonlySize int64 //常用功能设置数量
  27. CommonlyIds string //初始化常用功能内容
  28. UserRolePower []string //用户角色权限集合
  29. MedicalFieldTimespan int64 //医疗领域化 超级订阅 大会员到期时间> 90天
  30. DefaultPopup map[string]Additional //菜单默认弹窗
  31. WorkTableOut string //外网菜单表名
  32. WorkTableInside string //内网菜单表名
  33. RpcPort string //
  34. MenuCacheKey string //多套环境 配置不同key,同一个用户对应不用菜单缓存
  35. }
  36. //
  37. type MongoStruct struct {
  38. Address string `json:"address"`
  39. Size int `json:"size"`
  40. DbName string `json:"dbName"`
  41. UserName string `json:"userName,optional"`
  42. Password string `json:"password,optional"`
  43. Collection string `json:"collection,optional"`
  44. CollectionBack string `json:"collectionBack,optional"`
  45. MaxOpenConns int `json:"maxOpenConns,optional"`
  46. MaxIdleConns int `json:"maxIdleConns,optional"`
  47. }
  48. type MongoDb struct {
  49. DbName string `json:"dbName"`
  50. Size int `json:"size"`
  51. Address string `json:"address"`
  52. }
  53. type mysqlDb struct {
  54. DbName string `json:"dbName"`
  55. Address string `json:"address"`
  56. UserName string `json:"userName"`
  57. PassWord string `json:"passWord"`
  58. MaxOpenConns int `json:"maxOpenConns"`
  59. MaxIdleConns int `json:"maxIdleConns"`
  60. }
  61. var (
  62. ConfigJson RpcConfig
  63. )