config.go 1.4 KB

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