tencent

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SmsSignMethod = `HmacSHA1`                // 签名
	SmsRegion     = `ap-guangzhou`            // 区域
	SmsEndpoint   = `sms.tencentcloudapi.com` // 就近域名
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigItem

type ConfigItem struct {
	SmsTencentSecretId   string            `json:"sms_tencent_secret_id"`   // 密钥ID
	SmsTencentSecretKey  string            `json:"sms_tencent_secret_key"`  // 密钥
	SmsTencentSignMethod string            `json:"sms_tencent_sign_method"` // 签名方式
	SmsTencentRegion     string            `json:"sms_tencent_region"`      // 地域|区域
	SmsTencentSdkAppid   string            `json:"sms_tencent_sdk_appid"`   // 短信APPID
	SmsTencentSignName   string            `json:"sms_tencent_sign_name"`   // 签名头
	SmsTencentSenderId   string            `json:"sms_tencent_sender_id"`   // 国内短信无需填写该项;国际/港澳台短信已申请独立 SenderId 需要填写该字段,默认使用公共 SenderId,无需填写该字段
	CountryCode          enums.CountryCode // 国家区号编号,例如:+86【中国】
}

ConfigItem 腾讯SDK配置

type Handler

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

Handler 腾讯服务处理

func (*Handler) Apply

Apply 申请或修改短信模板-审核通过不允许修改

func (*Handler) Config

func (h *Handler) Config(config interface{}) error

Config 设置TencentSDK配置

func (*Handler) Ctx

func (h *Handler) Ctx(ctx context.Context)

Ctx 设置上下文

func (*Handler) List

List 获取短信模板列表

func (*Handler) Pull

func (h *Handler) Pull(in models.PullSendStatusInput) (resp []*models.PullSendResultItem, err error)

Pull 拉取发送短信结果

func (*Handler) Send

func (h *Handler) Send(mobile []string, in models.SendSmsInput) (resp *models.SendSmsResponse, err error)

Send 发送短信

Jump to

Keyboard shortcuts

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