config.go 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. <<<<<<< HEAD
  25. TidbEng string `json:"Tidb"`
  26. ClassSearchList []int64 `json:"ClassSearchList"` // 需要按照messageclass 查询的groupId
  27. Clickhouse *CHouseConfig
  28. GlobMsgLoadTime string `json:"GlobMsgLoadTime"`
  29. }
  30. type CHouseConfig struct {
  31. Addr string
  32. UserName string
  33. Password string
  34. DbName string
  35. MaxIdleConns int
  36. MaxOpenConns int
  37. =======
  38. TidbEng string `json:"Tidb"`
  39. ClassSearchList []int64 `json:"ClassSearchList"` // 需要按照messageclass 查询的groupId
  40. EquityInfoMsgType int64 `json:"EquityInfoMsgType"` // 营销权益消息需要特殊处理的消息类型
  41. >>>>>>> master
  42. }
  43. type mysqlConfig struct {
  44. DbName string
  45. Address string
  46. UserName string
  47. PassWord string
  48. MaxOpenConns int
  49. MaxIdleConns int
  50. }
  51. type mgoConf struct {
  52. Address string
  53. Size int
  54. DbName string
  55. ReplSet string
  56. UserName string
  57. Password string
  58. Collection string
  59. Collection_back string
  60. }
  61. var ConfigJson Config
  62. type WxTmplMsg struct {
  63. RpcAddr string `json:"rpcAddr"`
  64. CloseNotice string `json:"closeNotice"`
  65. Limit struct {
  66. Total int64 `json:"total"`
  67. OneDayLimit int64 `json:"oneDayLimit"`
  68. DuringMine int `json:"duringMine"`
  69. Alert struct {
  70. Nums []int64 `json:"nums"`
  71. ToMail []string `json:"toMail"`
  72. CcMail []string `json:"ccMail"`
  73. } `json:"alert"`
  74. } `json:"limit"`
  75. }