config.go 1017 B

12345678910111213141516171819202122232425262728293031323334
  1. package conf
  2. import (
  3. beego "github.com/beego/beego/v2/server/web"
  4. "runtime"
  5. )
  6. func init() {
  7. if runtime.GOOS == "windows" {
  8. Server_test = true
  9. } else {
  10. Server_test = false
  11. }
  12. }
  13. var Server_test = false
  14. var HTTPPort, _ = beego.AppConfig.String("HTTPPort")
  15. var AppName, _ = beego.AppConfig.String("appname")
  16. var RunMode, _ = beego.AppConfig.String("RunMode")
  17. var Version, _ = beego.AppConfig.String("Version")
  18. var Page_size = 10
  19. // Mysql
  20. var MysqlServer_UrlPort, _ = beego.AppConfig.String("MysqlServer_UrlPort")
  21. var MysqlServer_Database, _ = beego.AppConfig.String("MysqlServer_Database")
  22. var MysqlServer_Username, _ = beego.AppConfig.String("MysqlServer_Username")
  23. var MysqlServer_Password, _ = beego.AppConfig.String("MysqlServer_Password")
  24. var MysqlServer_MaxIdleConnections, _ = beego.AppConfig.Int("MysqlServer_MaxIdleConnections")
  25. var MysqlServer_MaxOpenConnections, _ = beego.AppConfig.Int("MysqlServer_MaxOpenConnections")
  26. // Nats
  27. var NatsServer_Url, _ = beego.AppConfig.String("NatsServer_Url")