config.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 // 缓存key
  26. Timeout int // 缓存时间
  27. }
  28. type Db struct {
  29. Mysql entity.Mysql `json:"mysql"`
  30. Redis entity.RedisStuct `json:"redis"`
  31. Es entity.EsStruct `json:"es"`
  32. Mongo entity.Mongo `json:"mongo"`
  33. }