yunpian

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const EndpointFormat = "json"
View Source
const EndpointTemplate = "https://%s.yunpian.com/%s/%s/%s.%s"
View Source
const EndpointVersion = "v2"
View Source
const MethodSingleSend = "single_send"

MethodSingleSend https://www.yunpian.com/official/document/sms/zh_cn/domestic_single_send

View Source
const MethodTplSingleSend = "tpl_single_send"

MethodTplSingleSend https://www.yunpian.com/official/document/sms/zh_CN/domestic_tpl_single_send

View Source
const NAME = "yunpian"
View Source
const ProductSms = "sms"
View Source
const ResourceSms = "sms"
View Source
const SuccessCode = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

type Gateway struct {
	ApiKey    string
	Signature string
}

func (*Gateway) Name

func (g *Gateway) Name() string

Name Get gateway name.

func (*Gateway) Send

func (g *Gateway) Send(to *gsms.PhoneNumber, message gsms.Message, config *gsms.Config) (err error)

Send message.

type Response

type Response struct {
	Code   int    `json:"code"`   // 系统返回码
	Msg    string `json:"msg"`    // 例如""发送成功"",或者相应错误信息
	Detail string `json:"detail"` // 具体错误描述或解决方法
}

Jump to

Keyboard shortcuts

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