flow
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/tibiotapi"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/cache"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/cache/redis"
|
||||
aliyunsmsclient "github.com/KenmyZhang/aliyun-communicate"
|
||||
@@ -11,6 +12,8 @@ import (
|
||||
var (
|
||||
SMSClient *aliyunsmsclient.SmsClient
|
||||
Cacher cache.ICacher
|
||||
|
||||
TibiotAPI *tibiotapi.API
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -19,6 +22,7 @@ func init() {
|
||||
|
||||
// 这样写的原因是在测试时,可以重新读取配置文件
|
||||
func Init() {
|
||||
TibiotAPI = tibiotapi.New(web.AppConfig.DefaultString("tibiotUserName", ""), web.AppConfig.DefaultString("tibiotPassword", ""))
|
||||
SMSClient = aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/")
|
||||
Cacher = redis.New(web.AppConfig.DefaultString("redisHost", "localhost"), beego.AppConfig.DefaultInt("redisPort", 0), beego.AppConfig.DefaultString("redisPassword", ""))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user