sms

package
v0.0.0-...-201ad92 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2017 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendId

func AppendId(phones []string, id int) []string

func Len

func Len(txt string) int

Returns number of characters that will be used to send txt via SMS

Types

type Sender

type Sender struct {
	Id     string // Sender identifier. See Source field in smsd.cfg
	Server string // IP address:port or unix domain socket path
	Delete bool   // Will message need to be deleted after sent/reported?
	Report bool   // Is report required?
}

func (*Sender) Send

func (s *Sender) Send(txt string, recipients ...string) error

Sends txt as SMS to recipients. Recipient need to be specified as PhoneNumber[=DstId] You can use DstId to link recipient with some other data in your database. Send is thread-safe.

Jump to

Keyboard shortcuts

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