go_sms_sender

package module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

README

go-sms-sender

Documentation

Index

Constants

View Source
const (
	Aliyun       = "Aliyun SMS"
	TencentCloud = "Tencent Cloud SMS"
	VolcEngine   = "Volc Engine SMS"
	Huyi         = "Huyi SMS"
	SubMail      = "SubMail SMS"
)
View Source
const (
	API = "https://api.mysubmail.com/message/xsend"
)

Variables

This section is empty.

Functions

func GetMd5String

func GetMd5String(s string) string

Types

type AliyunClient

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

func GetAliyunClient

func GetAliyunClient(accessId string, accessKey string, sign string, template string) (*AliyunClient, error)

func (*AliyunClient) SendMessage

func (c *AliyunClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error

type HuyiClient

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

func GetHuyiClient

func GetHuyiClient(appId string, appKey string, template string) (*HuyiClient, error)

func (*HuyiClient) SendMessage

func (hc *HuyiClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error

type SmsClient

type SmsClient interface {
	SendMessage(param map[string]string, targetPhoneNumber ...string) error
}

func NewSmsClient

func NewSmsClient(provider string, accessId string, accessKey string, sign string, template string, other ...string) (SmsClient, error)

type SubMailClient

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

func GetSubMailClient

func GetSubMailClient(accessId string, accessKey string, templateId string) (*SubMailClient, error)

func (*SubMailClient) SendMessage

func (c *SubMailClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error

type TencentClient

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

func GetTencentClient

func GetTencentClient(accessId string, accessKey string, sign string, templateId string, appId []string) (*TencentClient, error)

func (*TencentClient) SendMessage

func (c *TencentClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error

type VolcClient

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

func GetVolcClient

func GetVolcClient(accessId, accessKey, sign, templateId string, smsAccount []string) (*VolcClient, error)

func (*VolcClient) SendMessage

func (c *VolcClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error

Jump to

Keyboard shortcuts

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