config.go 497 B

123456789101112131415161718192021222324252627282930
  1. package config
  2. import (
  3. "github.com/zeromicro/go-zero/core/stores/cache"
  4. "github.com/zeromicro/go-zero/rest"
  5. "github.com/zeromicro/go-zero/zrpc"
  6. )
  7. type CacheRedisConf struct {
  8. Nodes cache.CacheConf
  9. KeyPrefix string `json:",optional"`
  10. }
  11. type Config struct {
  12. rest.RestConf
  13. RpcServerConf zrpc.RpcServerConf
  14. MySQL struct {
  15. DataSource string
  16. }
  17. CacheRedis CacheRedisConf
  18. Auth struct {
  19. AccessSecret string
  20. AccessExpire int64
  21. RefreshSecret string
  22. RefreshExpire int64
  23. }
  24. }