sms

package module
v0.0.0-...-c497cca Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 5 Imported by: 4

README

SMS-GO

  • Go语言的阿里云短信服务SDK
  • 安装 go get github.com/aliyun-sdk/sms-go
  • 使用详见 client_test.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchItem

type BatchItem struct {
	Sign   string
	Mobile string
	Params map[string]string
}

type BatchItems

type BatchItems []BatchItem

type Client

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

func New

func New(ak, sk string, fns ...Option) (*Client, error)

func (*Client) Clone

func (c *Client) Clone(fns ...Option) *Client

func (*Client) Send

func (c *Client) Send(fns ...Option) error

Send 短信发送 支持对多个手机号码发送短信,手机号码之间以英文逗号分隔,上限为1000个手机号码 详见 https://help.aliyun.com/document_detail/101414.html

func (*Client) SendBatch

func (c *Client) SendBatch(items BatchItems) error

SendBatch 批量发送短信 与Send不同的是,SendBatch支持不同的发送参数和签名,上限为100个手机号码 详见 https://help.aliyun.com/document_detail/102364.html

type Option

type Option func(req *requests.CommonRequest)

func Action

func Action(a string) Option

func Domain

func Domain(d string) Option

func Method

func Method(m string) Option

func Mobile

func Mobile(ss string) Option

func Parameter

func Parameter(v map[string]string) Option

func QueryParam

func QueryParam(k, v string) Option

func Scheme

func Scheme(s string) Option

func SignName

func SignName(n string) Option

func Template

func Template(t string) Option

func Version

func Version(v string) Option

type Options

type Options []Option

Jump to

Keyboard shortcuts

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