service

package
v0.0.0-...-5628fe7 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2016 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnsubscribeKeyword = "TD"
)

Variables

View Source
var (
	ErrInvalidStatus = errors.New("invalid status")
	ErrNothingPulled = errors.New("nothing pulled")
)
View Source
var (
	ErrInvalidVariables  = errors.New("invalid variables")
	ErrCannotTrack       = errors.New("cannot track")
	ErrInvalidContent    = errors.New("invalid content")
	ErrInvalidPhoneArray = errors.New("invalid phone array")
	ErrNotAllowed        = errors.New("not allowed")
)

Functions

func Pull

func Pull(name v.Name) error

func Push

func Push(channel t.Channel, category t.Category, content string, phoneArray []string) (string, error)

Push sms to phones directly with given content, will return MsgID and optional error

func Send

func Send(name t.Name, variables map[string]string, phoneArray []string) (string, string, error)

Send normal sms to phones with given template and variables, will return MsgID, content and optional error

func Trigger

func Trigger(msg *workers.Msg)

Trigger by SMS job, such as postpone worker

Types

This section is empty.

Jump to

Keyboard shortcuts

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