config.go 339 B

12345678910111213141516171819202122
  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. }
  10. type mysqlConfig struct {
  11. DbName string
  12. Address string
  13. UserName string
  14. PassWord string
  15. MaxOpenConns int
  16. MaxIdleConns int
  17. }
  18. var ConfigJson Config