config.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 Version, _ = beego.AppConfig.String("Version")
  15. var NatsServer_Url, _ = beego.AppConfig.String("NatsServer_Url")
  16. var HTTPPort, _ = beego.AppConfig.String("HTTPPort")
  17. var AppName, _ = beego.AppConfig.String("appname")
  18. var Page_size = 10
  19. // Mysql
  20. var Local_AliasName, _ = beego.AppConfig.String("Local_AliasName")
  21. var MysqlServer_UrlPort, _ = beego.AppConfig.String("MysqlServer_UrlPort")
  22. var MysqlServer_Database, _ = beego.AppConfig.String("MysqlServer_Database")
  23. var MysqlServer_Username, _ = beego.AppConfig.String("MysqlServer_Username")
  24. var MysqlServer_Password, _ = beego.AppConfig.String("MysqlServer_Password")
  25. var MysqlServer_MaxIdleConnections, _ = beego.AppConfig.Int("MysqlServer_MaxIdleConnections")
  26. var MysqlServer_MaxOpenConnections, _ = beego.AppConfig.Int("MysqlServer_MaxOpenConnections")
  27. // Redis
  28. var Redis_address, _ = beego.AppConfig.String("Redis_address")
  29. var Redis_password, _ = beego.AppConfig.String("Redis_password")
  30. var Redis_dbNum, _ = beego.AppConfig.String("Redis_dbNum")
  31. // Qiniu
  32. var Qiniu_AccessKey, _ = beego.AppConfig.String("Qiniu_AccessKey")
  33. var Qiniu_SecretKey, _ = beego.AppConfig.String("Qiniu_SecretKey")
  34. var Qiniu_BUCKET, _ = beego.AppConfig.String("Qiniu_BUCKET")
  35. var OssQiniu = "https://bzdcoldverifyoss.baozhida.cn"
  36. var Oss, _ = beego.AppConfig.String("Oss")
  37. var Oss_file, _ = beego.AppConfig.String("Oss_file")