sms

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliSmsClient

type AliSmsClient struct {
	AccessKeyID     string
	AccessKeySecret string
	HTTPDebugEnable bool
}

AliSmsClient

func NewAliSmsClient

func NewAliSmsClient(accessKeyID, accessKeySecret string) *AliSmsClient

NewAliSmsClient return AliSmsClient

func (*AliSmsClient) SendMarket

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

SendMarket 营销短信

func (*AliSmsClient) SendNotice added in v0.1.0

func (m *AliSmsClient) SendNotice(sign, templateId, phone string, templateParam string) (err error)

SendNotice 发送通知短信

func (*AliSmsClient) SendVerifyCode

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

SendVerifyCode 验证码短信

func (*AliSmsClient) SetDebug

func (m *AliSmsClient) 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

NewUpYunSmsClient 返回一个新的client

func (*UpYunSmsClient) SendVerifyCode added in v0.1.0

func (m *UpYunSmsClient) SendVerifyCode(mobile string, templateId int64, code string) (err error)

SendVerifyCode 发送验证码短信

templateId = 模板ID

Jump to

Keyboard shortcuts

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