package conf import ( beego "github.com/beego/beego/v2/server/web" ) func init() { //configFilePath, err := filepath.Abs("app.conf") //if err != nil { // logs.Println("configFilePathError", err) //} //logs.Println("configFilePath:",configFilePath) //err = beego.LoadAppConfig("ini", configFilePath) //if err != nil { // logs.Println("loadConfigFileError", err) //} } var HTTPPort, _ = beego.AppConfig.Int("HTTPPort") var AppName, _ = beego.AppConfig.String("appname") // Redis var Redis_address, _ = beego.AppConfig.String("Redis_address") var Redis_password, _ = beego.AppConfig.String("Redis_password") var Redis_dbNum, _ = beego.AppConfig.String("Redis_dbNum") // Mysql var MysqlServer_UrlPort, _ = beego.AppConfig.String("MysqlServer_UrlPort") var MysqlServer_Database, _ = beego.AppConfig.String("MysqlServer_Database") var MysqlServer_Username, _ = beego.AppConfig.String("MysqlServer_Username") var MysqlServer_Password, _ = beego.AppConfig.String("MysqlServer_Password") var MysqlServer_MaxIdleConnections, _ = beego.AppConfig.Int("MysqlServer_MaxIdleConnections") var MysqlServer_MaxOpenConnections, _ = beego.AppConfig.Int("MysqlServer_MaxOpenConnections") // Mqtt var MqttServer_Open, _ = beego.AppConfig.Int("MqttServer_Open") var MqttServer_Url, _ = beego.AppConfig.String("MqttServer_Url") var MqttServer_Username, _ = beego.AppConfig.String("MqttServer_Username") var MqttServer_Password, _ = beego.AppConfig.String("MqttServer_Password") var MqttServer_ClientID, _ = beego.AppConfig.String("MqttServer_ClientID") // Mqtt var TCPServer_Open, _ = beego.AppConfig.Int("TCPServer_Open") var TCPServer_Port, _ = beego.AppConfig.Int("TCPServer_Port") // HTTPServer_Open var HTTPServer_Open, _ = beego.AppConfig.Int("HTTPServer_Open") var HTTPServer_Port, _ = beego.AppConfig.Int("HTTPServer_Port") // Mongodb var Mongodb_Url, _ = beego.AppConfig.String("Mongodb_Url") var Mongodb_DB, _ = beego.AppConfig.String("Mongodb_DB") var Mongodb_Username, _ = beego.AppConfig.String("Mongodb_Username") var Mongodb_Password, _ = beego.AppConfig.String("Mongodb_Password") // 数据解析加载目录 var Analysis_Dir, _ = beego.AppConfig.String("Analysis_Dir") // Nats var NatsServer_Url, _ = beego.AppConfig.String("NatsServer_Url") // Qiniu var Qiniu_AccessKey, _ = beego.AppConfig.String("Qiniu_AccessKey") var Qiniu_SecretKey, _ = beego.AppConfig.String("Qiniu_SecretKey") var Qiniu_BUCKET, _ = beego.AppConfig.String("Qiniu_BUCKET") var Qiniu_Dir, _ = beego.AppConfig.String("Qiniu_Dir") var Qiniu_Url, _ = beego.AppConfig.String("Qiniu_Url")