gokit

package
v0.0.0-...-15846b5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetAmount   = "getAmount"   // 获得余额
	QueryReport = "queryReport" // 获得状态报告,只能查询当天的,已获取的状态报告后续不会再获取
	QueryMo     = "queryMo"     // 获得上行短信,只能查询当天的,已获取的上行短信后续不会再获取
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SMS

type SMS struct {
	Username string // 短信帐号
	Password string // 登录密码
	Verycode string // 校验码/密匙
	Method   string // 如果有乱码请尝试用 sendUtf8Msg 或  sendGbkMsg
	Msgtype  string // 1-普通短信,2-模板短信
	Tempid   string // 模板编号
	Code     string // 编码
}

func (*SMS) Query

func (s *SMS) Query(method string) ([]byte, error)

获得余额、获得状态报告、获得上行短信

func (*SMS) Send

func (s *SMS) Send(mobile, content string) ([]byte, error)

mobile 多个手机以,分割,不得存在空格 content fmt.Sprintf("%s%s", "@1@=", "服务器出现异常")

Jump to

Keyboard shortcuts

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