config.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package config
  2. import (
  3. "jyBXBase/entity"
  4. "github.com/zeromicro/go-zero/zrpc"
  5. )
  6. type Config struct {
  7. zrpc.RpcServerConf
  8. Webrpcport int64
  9. BidSearchOldUserLimit int64
  10. FileSignBool bool
  11. UnitAppend string //数值单位后面的加号 写死的目前
  12. UserCenterKey string
  13. PowerCheckCenterKey string
  14. EntManageApplication string
  15. NewsLimitNum int64 // 移动端首页最新标讯数量限制
  16. NewsTimeOut int64 //更新数据时间
  17. NewsCache struct { // 最新标讯缓存配置
  18. NoLogin CacheConfig // 未登录用户缓存key
  19. LoginUser CacheConfig // 登录用户有推送数据使用的key
  20. Login CacheConfig // 登录用户没有推送数据最新标讯使用的key
  21. Count CacheConfig // 查询用户有没有推送数据使用的key
  22. }
  23. }
  24. type CacheConfig struct {
  25. Key string `json:"Key,optional"` // 缓存key
  26. Timeout int `json:"Timeout,optional"` // 缓存时间
  27. CacheUpdateKey string `json:"CacheUpdateKey,optional"` //
  28. CacheUpdateTimeout int `json:"CacheUpdateTimeout,optional"` //
  29. }
  30. type Db struct {
  31. Mysql entity.Mysql `json:"mysql"`
  32. Redis entity.RedisStuct `json:"redis"`
  33. Es entity.EsStruct `json:"es"`
  34. Mongo entity.Mongo `json:"mongo"`
  35. }