config.go 441 B

1234567891011121314151617181920212223242526272829
  1. package config
  2. import (
  3. "github.com/tal-tech/go-zero/zrpc"
  4. )
  5. type Config struct {
  6. zrpc.RpcServerConf
  7. DataSource *mysqlConfig // 手动代码
  8. Mysql string
  9. Redis *RedisConfig
  10. }
  11. type RedisConfig struct {
  12. Host string
  13. Addr string
  14. Modules string
  15. }
  16. type mysqlConfig struct {
  17. DbName string
  18. Address string
  19. UserName string
  20. PassWord string
  21. MaxOpenConns int
  22. MaxIdleConns int
  23. }
  24. var ConfigJson Config