aa
This commit is contained in:
22
services/api/api.go
Normal file
22
services/api/api.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/tibiotapi"
|
||||
aliyunsmsclient "github.com/KenmyZhang/aliyun-communicate"
|
||||
)
|
||||
|
||||
var (
|
||||
SMSClient *aliyunsmsclient.SmsClient
|
||||
|
||||
TibiotAPI *tibiotapi.API
|
||||
)
|
||||
|
||||
func init() {
|
||||
Init() // 这里必须要调用
|
||||
}
|
||||
|
||||
// 这样写的原因是在测试时,可以重新读取配置文件
|
||||
func Init() {
|
||||
TibiotAPI = tibiotapi.New("ruoxikeji", "Ruoxi@369")
|
||||
SMSClient = aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/")
|
||||
}
|
||||
Reference in New Issue
Block a user