config.go 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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. NewsCache struct { // 最新标讯缓存配置
  17. NoLogin cacheConfig // 未登录用户缓存key
  18. LoginUser cacheConfig // 登录用户有推送数据使用的key
  19. Login cacheConfig // 登录用户没有推送数据最新标讯使用的key
  20. Count cacheConfig // 查询用户有没有推送数据使用的key
  21. }
  22. }
  23. type cacheConfig struct {
  24. Key string // 缓存key
  25. Timeout int // 缓存时间
  26. }
  27. type Db struct {
  28. Mysql entity.Mysql `json:"mysql"`
  29. Redis entity.RedisStuct `json:"redis"`
  30. Es entity.EsStruct `json:"es"`
  31. Mongo entity.Mongo `json:"mongo"`
  32. }