修改配置

This commit is contained in:
Yun
2024-11-15 19:01:25 +08:00
parent 9ad229dbb7
commit 99b14767c9
10 changed files with 70 additions and 70 deletions
+5 -5
View File
@@ -10,18 +10,18 @@ import (
"code.yun.ink/pkg/smsx/tencent"
)
var platform map[entity.Platform3rdType]interfaces.Smsx
var platform map[consts.Platform3rdType]interfaces.Smsx
// 注册
func init() {
platform = make(map[entity.Platform3rdType]interfaces.Smsx)
platform = make(map[consts.Platform3rdType]interfaces.Smsx)
// 阿里
platform[entity.Platform3rdTypeAliyun] = &aliyun.Aliyun{}
platform[consts.Platform3rdTypeAliyun] = &aliyun.Aliyun{}
// 腾讯
platform[entity.Platform3rdTypeTencent] = &tencent.Tencent{}
platform[consts.Platform3rdTypeTencent] = &tencent.Tencent{}
}
func GetPlatform(ctx context.Context, plat entity.Platform3rdType) (interfaces.Smsx, error) {
func GetPlatform(ctx context.Context, plat consts.Platform3rdType) (interfaces.Smsx, error) {
iplat, ok := platform[plat]
if ok {
return iplat, nil