smscode

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ali

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

func (*Ali) Init added in v1.0.26

func (ali *Ali) Init() error

func (*Ali) Provide

func (ali *Ali) Provide(ctx context.Context) interface{}

func (*Ali) SendSMS

func (ali *Ali) SendSMS(phone, text string) error

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

type AliOption

type AliOption func(*AliOptions)

func WithAccessKeyId

func WithAccessKeyId(accessKeyId string) AliOption

func WithAccessKeySecret

func WithAccessKeySecret(accessKeySecret string) 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 {
	AccessKeyId     string
	AccessKeySecret string
	Endpoint        string
	SignName        string
	TempCode        string
}

type SMSCode

type SMSCode interface {
	Init() error
	SendSMS(phone, text string) error
}

func NewAliSMS

func NewAliSMS(opts ...AliOption) SMSCode

Jump to

Keyboard shortcuts

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