sms

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AliAPIServer = "https://sms.aliyuncs.com/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AliReqBody

type AliReqBody struct {
	AccessKeyId  string `json:"AccessKeyId" form:"AccessKeyId"`
	Action       string `json:"Action" form:"Action"`
	SignName     string `json:"SignName" form:"SignName"`
	TemplateCode string `json:"TemplateCode" form:"TemplateCode"`
	RecNum       string `json:"RecNum" form:"RecNum"`
	ParamString  string `json:"ParamString" form:"ParamString"`

	Format           string `json:"Format" form:"Format"`
	Version          string `json:"Version" form:"Version"`
	Signature        string `json:"Signature" form:"Signature"`
	SignatureMethod  string `json:"SignatureMethod" form:"SignatureMethod"`
	SignatureNonce   string `json:"SignatureNonce" form:"SignatureNonce"`
	SignatureVersion string `json:"SignatureVersion" form:"SignatureVersion"`
	Timestamp        string `json:"Timestamp" form:"Timestamp"`
}

type AliSmsClient

type AliSmsClient struct {
	AccessKeyId     string
	AccessKeySecret string
	// contains filtered or unexported fields
}

func NewAliSmsCli

func NewAliSmsCli(accessKeyId, accessKeySecret string) *AliSmsClient

func (*AliSmsClient) SendSms

func (a *AliSmsClient) SendSms(tmplID string, data interface{}) error

type SaiyouSMS

type SaiyouSMS struct {
	AppID  string
	AppKey string
	// contains filtered or unexported fields
}

func NewSaiyouSMS

func NewSaiyouSMS(appid, appkey string) *SaiyouSMS

func (*SaiyouSMS) Send

func (m *SaiyouSMS) Send(to, tpl string, data interface{}) error

type SendResponse

type SendResponse struct {
	Status     string `json:"status"`
	SendId     string `json:"send_id"`
	Fee        int    `json:"fee"`
	SMSCredits string `json:"sms_credits"`
	Message    string `json:"msg"`
}

Jump to

Keyboard shortcuts

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