alicloud

package
v0.5.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAliCloudAdapter

func NewAliCloudAdapter(opts ...AliOption) sms.SMS

Types

type Adapter

type Adapter struct {
	Client *client.Client
	// contains filtered or unexported fields
}

func (*Adapter) Provide

func (ali *Adapter) Provide(ctx context.Context) any

func (*Adapter) Send

func (ali *Adapter) Send(params *sms.Config) error

Send 发送验证码参数 https://next.api.aliyun.com/api/Dysmsapi/2017-05-25/SendSms?lang=GO&params={}

func (*Adapter) Verify

func (ali *Adapter) Verify(phone, code string) error

Verify 验证验证码

type AliOption

type AliOption func(*AliOptions)

func WithAccessKeyId

func WithAccessKeyId(accessKeyId string) AliOption

func WithAccessKeySecret

func WithAccessKeySecret(accessKeySecret string) AliOption

func WithAnalog

func WithAnalog(analog bool) AliOption

func WithEndpoint

func WithEndpoint(endpoint string) AliOption

func WithSignName

func WithSignName(signName string) AliOption

func WithTempCode

func WithTempCode(tempCode string) AliOption

type AliOptions

type AliOptions struct {
	Analog          bool
	AccessKeyId     string
	AccessKeySecret string
	Endpoint        string
	SignName        string
	TempCode        string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL