Files
arenax-server/utility/sms/sms.go

22 lines
495 B
Go

package sms
import (
"context"
"server/internal/model"
)
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)
}
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
}