alidayu

package
v0.0.0-...-7becda7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2017 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// IsDebug切换到沙箱环境
	IsDebug bool

	Appkey    string
	AppSecret string
)

Functions

func SplitCode

func SplitCode(code string) string

SplitCode 将数字用,隔开 --{66666} to {6,6,6,6,6} 适用于文本转语音输出时验证码的输出问题

Types

type Result

type Result struct {
	Success     bool         `json:"success,omitempty"`                       // 成功失败信息
	ResultError *resultError `json:"error_response"`                          // 返回错误
	ResultModel *resultModel `json:"alibaba_aliqin_fc_sms_num_send_response"` // 返回正确
}

Result 用于描述发送短信的结果

func SendBatch

func SendBatch(moblie, signname, templatecode, param string) ([]*Result, error)

SendBatch 短信单条发送的接口 moblie-手机号码 ','隔开 signname-短信签名 templatecode-短信模板 param-传入参数 返回Result格式,请确保输出成功失败的结构体引用,如果Result.Success为true则获取Result.ResultError报错

func SendLecall

func SendLecall(mobile, templatecode, param string) (*Result, error)

SendLecall 文本转语音的接口 moblie-手机号码 templatecode-短信模板 param-传入参数 返回Result格式,请确保输出成功失败的结构体引用,如果Result.Success为true则获取Result.ResultError报错

func SendOnce

func SendOnce(moblie, signname, templatecode, param string) (*Result, error)

SendOnce 短信单条发送的接口 moblie-手机号码 signname-短信签名 templatecode-短信模板 param-传入参数 返回Result格式,请确保输出成功失败的结构体引用,如果Result.Success为true则获取Result.ResultError报错

Jump to

Keyboard shortcuts

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