gsms

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(smsConfig SmsConfig) error

func SendSmsBlend

func SendSmsBlend(params map[string]string, phoneNumbers []string) (string, error)

func SendSmsBlendWithTemplateId

func SendSmsBlendWithTemplateId(templateId string, params map[string]string, phoneNumbers []string) (string, error)

func SendSmsDirect

func SendSmsDirect(channelKey string, templateId string, params map[string]string, phoneNumbers []string) (string, error)

func SendSmsDirectAsync

func SendSmsDirectAsync(channelKey string, templateId string, params map[string]string, phoneNumbers []string, callback func(string, error))

Types

type SmsConfig

type SmsConfig struct {
	//全场唯一必填参数
	Providers []provider.SmsProvider
	//下面都是定制化
	DefaultChannelKey   string
	LoadBalanceStrategy strategy.LoadBalanceStrategy
	HttpClient          client.HttpClient
}

Jump to

Keyboard shortcuts

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