sms

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

* @Author: qida * @LastEditors: qida

* @Author: qida * @Date: 2022-01-07 13:50:03 * @LastEditTime: 2022-01-07 15:33:56 * @LastEditors: qida * @Description: * @FilePath: \zxjy_api_crme:\gopath\lib\src\github.com\qida\gfc\sms\ali.go * good day

* @Author: qida * @LastEditors: qida

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