entity.go 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. Node int // 节点
  12. Mysql mysqlDb
  13. BaseMysql mysqlDb
  14. Logx logx.LogConf
  15. IsRun bool //定时任务是否开启
  16. CheckEntIsExpire string //
  17. DoMain string
  18. RedisAddrees []string
  19. RedisOutTime int
  20. InternalTime int
  21. Mongo struct {
  22. Main *MongoStruct
  23. }
  24. BigMemberOff bool
  25. CommonlySize int64 //常用功能设置数量
  26. CommonlyIds string //初始化常用功能内容
  27. UserRolePower []string //用户角色权限集合
  28. MedicalFieldTimespan int64 //医疗领域化 超级订阅 大会员到期时间> 90天
  29. DefaultPopup map[string]Additional //菜单默认弹窗
  30. }
  31. //
  32. type MongoStruct struct {
  33. Address string `json:"address"`
  34. Size int `json:"size"`
  35. DbName string `json:"dbName"`
  36. UserName string `json:"userName,optional"`
  37. Password string `json:"password,optional"`
  38. Collection string `json:"collection,optional"`
  39. CollectionBack string `json:"collectionBack,optional"`
  40. MaxOpenConns int `json:"maxOpenConns,optional"`
  41. MaxIdleConns int `json:"maxIdleConns,optional"`
  42. }
  43. type MongoDb struct {
  44. DbName string `json:"dbName"`
  45. Size int `json:"size"`
  46. Address string `json:"address"`
  47. }
  48. type mysqlDb struct {
  49. DbName string `json:"dbName"`
  50. Address string `json:"address"`
  51. UserName string `json:"userName"`
  52. PassWord string `json:"passWord"`
  53. MaxOpenConns int `json:"maxOpenConns"`
  54. MaxIdleConns int `json:"maxIdleConns"`
  55. }
  56. var (
  57. ConfigJson RpcConfig
  58. )