sms

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SMS_PLATFORM_FASTOO = "smsFastoo"
)
View Source
const (
	SMS_PLATFORM_SMSBAO = "smsBao"
)

Variables

View Source
var (
	MESSAGE_SUCCESS   string = "OK"
	ACCESS_KEY_ID     string = "LTAIDquqdpFdYVmW"
	ACCESS_KEY_SECRET string = "ozeRm4LWSqEnpPEw9spdOfylSNprY1"
	SIGN_NAME         string = "海拉科技"
	TEMPLATE_CODE     string = "SMS_127790203"
	PRODUCT           string = "Dysmsapi"
	VERSION           string = "2017-05-25"
	DOMAIN            string = "dysmsapi.aliyuncs.com"
	REGION            string = "cn-hangzhou"

	ErrReturnValue = errors.New("sms return message means failed.")
)
View Source
var (
	ErrSmsBadPlatformConfig = errors.New("error sms platform config")
	ErrSmsNoMoney           = errors.New("sms no money")
	ErrSmsReturnBadValue    = errors.New("sms return error value")
)

Functions

func SendSmsTo

func SendSmsTo(phone string, text string) error

Types

type ISms

type ISms interface {
	SendVCode(phone, code string) error
	GetBalance() (float64, error)
	GetRemains() (int, error)
}

func NewSmsBao

func NewSmsBao(username, password, tplSmsVcode string) ISms

func NewSmsFastoo

func NewSmsFastoo() ISms

Jump to

Keyboard shortcuts

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