sms

package
v0.0.0-...-1272ae6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliyunSmsClient

type AliyunSmsClient struct {
	AccessKeyID     string
	AccessKeySecret string
	HTTPDebugEnable bool
}

AliyunSmsClient

func NewAliyunSmsClient

func NewAliyunSmsClient(accessKeyID, accessKeySecret string) *AliyunSmsClient

NewAliyunSmsClient NewAliyunSmsClient

func (*AliyunSmsClient) SendMarket

func (m *AliyunSmsClient) SendMarket(sign, templateId, phone string) (err error)

SendMarket 营销短信

func (*AliyunSmsClient) SendVerifyCode

func (m *AliyunSmsClient) SendVerifyCode(sign, templateID, phone, code string) (err error)

SendVerifyCode 验证码短信

func (*AliyunSmsClient) SetDebug

func (m *AliyunSmsClient) SetDebug(enabled bool)

SetDebug SetDebug

type UpYunMessage

type UpYunMessage struct {
	MessageID int64  `json:"message_id"`
	Mobile    string `json:"mobile"`
}

UpYunMessage UpYunMessage

type UpYunResult

type UpYunResult struct {
	MessageIDS []*UpYunMessage `json:"message_ids"`
}

UpYunResult 返回信息

type UpYunSmsBody

type UpYunSmsBody struct {
	Mobile     string `json:"mobile"`
	TemplateID int64  `json:"template_id"`
	Vars       string `json:"vars"`
}

UpYunSmsBody 发送模型

type UpYunSmsClient

type UpYunSmsClient struct {
	Token string
}

UpYunSmsClient UpYunSmsClient

func NewUpYunSmsClient

func NewUpYunSmsClient(token string) *UpYunSmsClient

func (*UpYunSmsClient) SendSms

func (m *UpYunSmsClient) SendSms(mobile string, templateId int64, vars string) (err error)

SendSms 发送短信 templateId = 模板ID vars = 模板变量 body.Vars = fmt.Sprintf("%v|%v|%v|%v", Datetime,"abc", "123, "456")

Jump to

Keyboard shortcuts

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