修改用户列表查询,接入阿里云短信服务
This commit is contained in:
@ -6,8 +6,7 @@ import (
|
||||
)
|
||||
|
||||
type SMSClient interface {
|
||||
UploadFile(ctx context.Context, in *model.OssUploadFileInput) (out *model.OssOutput, err error)
|
||||
GetFileURL(ctx context.Context, in *model.OssGetFileInput) (out *model.OssOutput, err error)
|
||||
SendCode(ctx context.Context, in *model.SMSCodeIn) (out *model.SMSCodeOut, err error)
|
||||
}
|
||||
|
||||
var clients = make(map[string]SMSClient)
|
||||
@ -15,6 +14,7 @@ var clients = make(map[string]SMSClient)
|
||||
func Register(name string, client SMSClient) {
|
||||
clients[name] = client
|
||||
}
|
||||
|
||||
func GetClient(name string) (SMSClient, bool) {
|
||||
client, ok := clients[name]
|
||||
return client, ok
|
||||
|
||||
Reference in New Issue
Block a user