entity.go 2.3 KB

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