mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-12 04:53:47 +08:00
发布v2.8.4版本,更新内容请查看:https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN/addon-version-upgrade.md
This commit is contained in:
@@ -4,15 +4,12 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/library/sms/aliyun"
|
||||
"hotgo/internal/library/sms/tencent"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/model/input/sysin"
|
||||
)
|
||||
|
||||
// Drive 短信驱动
|
||||
type Drive interface {
|
||||
SendCode(ctx context.Context, in sysin.SendCodeInp, config *model.SmsConfig) (err error)
|
||||
SendCode(ctx context.Context, in *sysin.SendCodeInp) (err error)
|
||||
}
|
||||
|
||||
func New(name ...string) Drive {
|
||||
@@ -27,9 +24,9 @@ func New(name ...string) Drive {
|
||||
|
||||
switch instanceName {
|
||||
case consts.SmsDriveAliYun:
|
||||
drive = &aliyun.Handle
|
||||
drive = &AliYunDrive{}
|
||||
case consts.SmsDriveTencent:
|
||||
drive = &tencent.Handle
|
||||
drive = &TencentDrive{}
|
||||
default:
|
||||
panic(fmt.Sprintf("暂不支持短信驱动:%v", instanceName))
|
||||
}
|
||||
|
Reference in New Issue
Block a user