alisms

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliSms

type AliSms struct {
	// contains filtered or unexported fields
}

阿里短信发送

func NewAliSms

func NewAliSms(access_id, access_key, region_id, sign_name string) *AliSms

阿里短信

func (*AliSms) SendSms

func (a *AliSms) SendSms(phoneNumber string, templateName string, params utils.M) (*AliSmsRes, error)

发送短信

func (*AliSms) SendSmsMulti added in v1.0.4

func (a *AliSms) SendSmsMulti(phoneList []string, signList []string, templateName string, params []utils.M) (*AliSmsRes, error)

群发短信

func (*AliSms) SetSignName

func (a *AliSms) SetSignName(sign_name string)

设置短信签名

func (*AliSms) Sign

func (a *AliSms) Sign(data utils.M) (sign string, query_str string)

签名

type AliSmsConfig

type AliSmsConfig struct {
	AccessID  string `json:"access_id" yaml:"access_id"`
	AccessKey string `json:"access_key" yaml:"access_key"`
	RegionID  string `json:"region_id" yaml:"region_id"`
	Template  string `json:"template" yaml:"template"`
	SignName  string `json:"sign_name" yaml:"sign_name"`
}

短信配置

type AliSmsRes

type AliSmsRes struct {
	RequestId string `json:"RequestId" bson:"request_id"`
	Message   string `json:"Message" bson:"message"`
	Code      string `json:"Code" bson:"code"`
	BizId     string `json:"BizId" bson:"biz_id"`
}

短信发送回复消息

Jump to

Keyboard shortcuts

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