send

package
v0.0.0-...-dea9c68 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AliYunSmsSendPhoneNumberLimit 批量发送短信功能单次请求的手机号码数量上限
	AliYunSmsSendPhoneNumberLimit = 1000
)

Variables

This section is empty.

Functions

func QueryAliYunSmsSendApiPhoneNumberLimit

func QueryAliYunSmsSendApiPhoneNumberLimit() int

QueryAliYunSmsSendApiPhoneNumberLimit 查询阿里云短信发送功能单次请求的手机号码数量上限

Types

type AliYunSmsSendRequestParams

type AliYunSmsSendRequestParams struct {
	AliYunSmsSendRequestParamsInterface
	PhoneNumberList []string // 接收短信的手机号码. 支持同时向多个手机发送, 数量上限为 AliYunSmsSendPhoneNumberLimit
	SignName        string   // 短信签名名称
	TemplateCode    string   // 短信模板ID。
	TemplateParam   *string  // 可选. 短信模板变量对应的实际值,JSON格式。支持传入多个参数,示例:{"name":"张三","number":"15038****76"}
	UpExtendCode    *string  // 可选. 上行短信扩展码,上行短信,指发送给通信服务提供商的短信,用于定制某种服务、完成查询,或是办理某种业务等,需要收费的,按运营商普通短信资费进行扣费
	OutId           *string  // 可选. 外部流水扩展字段
}

AliYunSmsSendRequestParams 阿里云平台请求发送短信API需要的参数

func CreateAliYunSmsSendRequestParams

func CreateAliYunSmsSendRequestParams(PhoneNumberList []string, SignName string, TemplateCode string, TemplateParam *string, UpExtendCode *string, OutId *string) *AliYunSmsSendRequestParams

CreateAliYunSmsSendRequestParams create

func (AliYunSmsSendRequestParams) CheckError

func (p AliYunSmsSendRequestParams) CheckError() error

CheckError 判断各参数是否非法

type AliYunSmsSendRequestParamsInterface

type AliYunSmsSendRequestParamsInterface interface {
	CheckError() error // 判断各参数是否合法
	// contains filtered or unexported methods
}

type AliYunSmsSendResponse

type AliYunSmsSendResponse struct {
	AliYunSmsApiRequestStatus         // 基础的请求状态信息
	BizId                     *string // 回执ID. 可根据发送回执ID查询具体的发送状态. 若为nil或长度为0则说明该次请求未返回合法的回执ID
}

func AliYunSmsSend

AliYunSmsSend 调用阿里云SMS-API发送短信

func (AliYunSmsSendResponse) GetBizId

func (r AliYunSmsSendResponse) GetBizId() *string

GetBizId 获取回执ID

func (AliYunSmsSendResponse) IsBizIdValid

func (r AliYunSmsSendResponse) IsBizIdValid() bool

IsBizIdValid 返回的回执ID是否合法

type AliYunSmsSendResponseInterface

type AliYunSmsSendResponseInterface interface {
	AliYunSmsApiRequestStatusInterface
	GetBizId() string   // 获取回执ID
	IsBizIdValid() bool // 返回的回执ID是否合法
}

Jump to

Keyboard shortcuts

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