修改 aliyun,短信,oss,验证码

This commit is contained in:
chy
2025-06-24 16:22:18 +08:00
parent b02ad91118
commit 8342c92247
21 changed files with 219 additions and 128 deletions

View File

@ -0,0 +1,22 @@
package captcha
import (
"context"
afs "github.com/alibabacloud-go/afs-20180112/client"
"server/internal/model"
)
type CaptchaClient interface {
Vertify(ctx context.Context, client *afs.Client, in *model.CaptchaIn) (out string, err error)
}
var clients = make(map[string]CaptchaClient)
func Register(name string, client CaptchaClient) {
clients[name] = client
}
func GetClient(name string) (CaptchaClient, bool) {
client, ok := clients[name]
return client, ok
}