config.go 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. package config
  2. import (
  3. "github.com/zeromicro/go-zero/zrpc"
  4. )
  5. type Config struct {
  6. zrpc.RpcServerConf
  7. DataSource *mysqlConfig // 手动代码
  8. BaseSource *mysqlConfig // 手动代码
  9. WebRpcPort int
  10. //Mysql string
  11. RedisAddr string `json:"RedisAddr"`
  12. Mongodb *mgoConf
  13. SurvivalTime int
  14. SaveConcurrency int // 消息保存并发数
  15. WxWebdomain string `json:"WxWebdomain"`
  16. WxTmplConfig WxTmplMsg `json:"WxTmplConfig"`
  17. PushGrpcServer string `json:"PushGrpcServer"`
  18. Mail []struct {
  19. Addr string `json:"addr"`
  20. Port int `json:"port"`
  21. Pwd string `json:"pwd"`
  22. User string `json:"user"`
  23. } `json:"mail"`
  24. TidbEng string `json:"Tidb"`
  25. <<<<<<< HEAD
  26. ClassSearchList []int64 `json:"ClassSearchList"` // 需要按照messageclass 查询的groupId
  27. EquityInfoMsgType int64 `json:"EquityInfoMsgType"` // 营销权益消息需要特殊处理的消息类型
  28. Registedate int64
  29. =======
  30. ClassSearchList []int64 `json:"ClassSearchList"` // 需要按照messageclass 查询的groupId
  31. Clickhouse *CHouseConfig
  32. GlobMsgLoadTime string `json:"GlobMsgLoadTime"`
  33. EquityInfoMsgType int64 `json:"EquityInfoMsgType"` // 营销权益消息需要特殊处理的消息类型
  34. NewUserMsgTitle string `json:"NewUserMsgTitle"`
  35. }
  36. type CHouseConfig struct {
  37. Addr string
  38. UserName string
  39. Password string
  40. DbName string
  41. MaxIdleConns int
  42. MaxOpenConns int
  43. >>>>>>> master
  44. }
  45. type mysqlConfig struct {
  46. DbName string
  47. Address string
  48. UserName string
  49. PassWord string
  50. MaxOpenConns int
  51. MaxIdleConns int
  52. }
  53. type mgoConf struct {
  54. Address string
  55. Size int
  56. DbName string
  57. ReplSet string
  58. UserName string
  59. Password string
  60. Collection string
  61. Collection_back string
  62. }
  63. var ConfigJson Config
  64. type WxTmplMsg struct {
  65. RpcAddr string `json:"rpcAddr"`
  66. CloseNotice string `json:"closeNotice"`
  67. Limit struct {
  68. Total int64 `json:"total"`
  69. OneDayLimit int64 `json:"oneDayLimit"`
  70. DuringMine int `json:"duringMine"`
  71. Alert struct {
  72. Nums []int64 `json:"nums"`
  73. ToMail []string `json:"toMail"`
  74. CcMail []string `json:"ccMail"`
  75. } `json:"alert"`
  76. } `json:"limit"`
  77. }