config.go 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package config
  2. import (
  3. "github.com/zeromicro/go-zero/zrpc"
  4. "jyBXCore/entity"
  5. )
  6. type Config struct {
  7. zrpc.RpcServerConf
  8. WebRpcPort int64
  9. BidSearchOldUserLimit int64 //老用户 使用付费功能
  10. LabelUrl struct {
  11. Area string
  12. SType string
  13. Industry string
  14. }
  15. DefaultSearchCacheTime int //清除搜索列表内存缓存 间隔时间
  16. DefaultSearchCacheNoLoginTime int //清除搜索列表内存缓存 未登录用户 间隔时间
  17. LimitSearchText struct {
  18. Flag bool
  19. Count int
  20. NoLogin int
  21. TimeOut int
  22. Percentage int
  23. UserIds []string
  24. Msg string
  25. LimitKey string
  26. }
  27. SearchTypeSwitch bool //标题和正文 同时查询,关键词>1;是否优化查询只查正文(正文包含标题)
  28. FileSignBool bool //IC.C.FileSignBool列表是否显示附件标识开关
  29. PaySearchLimit struct {
  30. Switch bool
  31. Year int
  32. Month int
  33. WordSize int
  34. PageNum int64
  35. PageSize int64
  36. } //优化付费用户搜索速度
  37. KeywordsLimit int //关键词长度限制
  38. DefaultBidInfo struct {
  39. PageNum int
  40. Count int
  41. PayCount int
  42. } //招标信息初始化
  43. DefaultTopTypes []string //信息类型初始值
  44. JYKeyMark string //关键词分组标识
  45. ContextOldVipLimit int64 //老版超级订阅 超前项目权限
  46. Middleground struct { //中台
  47. Etcd struct {
  48. Hosts []string
  49. }
  50. PowerCheckCenterKey string
  51. UserCenterKey string
  52. ResourceCenterKey string
  53. }
  54. ResourceCode string
  55. SearchConcurrency int64
  56. NoLoginSearch struct {
  57. Switch bool
  58. ExecutionNum int
  59. Wait int
  60. }
  61. }
  62. type Db struct {
  63. Mysql entity.Mysql `json:"mysql"`
  64. Redis entity.RedisStuct `json:"redis"`
  65. Es entity.EsStruct `json:"es"`
  66. Mongo entity.Mongo `json:"mongo"`
  67. EsNoLogin entity.EsStruct `json:"esNoLogin"`
  68. }