sms

package
v0.0.0-...-85e1034 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LimitMax = 2
)

Variables

View Source
var (
	RequestRegLimit int = LimitMax
)

Functions

func CheckRegexMobile

func CheckRegexMobile(mobile string) (err error)

func InitQiniuSMS

func InitQiniuSMS(accessKey, secretKey string)

func SendQiniuSMS

func SendQiniuSMS(qiniuSMS QiniuSMS, mobile string, code string) (err error)

func TimerAddPoolLimit

func TimerAddPoolLimit()

Types

type Ali

type Ali struct {
	Client  *dysmsapi.Client
	Request *dysmsapi.SendSmsRequest
}

func NewAli

func NewAli(id, sk string) *Ali

func (*Ali) Send

func (a *Ali) Send(mobile string) (code string, err error)

type ManYou

type ManYou struct {
	Account  string
	Password string
}

type QiniuSMS

type QiniuSMS struct {
	SignatureID string
	TemplateID  string
}

type VerificationParam

type VerificationParam struct {
	CodeType  string `json:"codetype"`
	SendMsgID string `json:"sendmsgid"`
}

func SendManYouSMS

func SendManYouSMS(man_you ManYou, mobile string) (code string, vparam VerificationParam, err error)

Jump to

Keyboard shortcuts

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