修改用户列表查询,接入阿里云短信服务

This commit is contained in:
chy
2025-06-13 17:45:32 +08:00
parent 6c69eceeb1
commit 86ee1dfe49
10 changed files with 363 additions and 3 deletions

View File

@ -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