sms

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package sms enables interaction with arbitrary SMS providers. It implements a standardized interface through which Twilio, Nexmo and more may be supported. It's up to individual drivers to add support for each of these services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Drivers

func Drivers() []string

Drivers returns a sorted list of the names of the registered drivers.

func Register

func Register(name string, driver driver.Driver)

Register makes a calendar driver available by the provided name. If Register is called twice with the same name or if driver is nill, it panics.

Types

type Conn

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

Conn is a connection to a specific sms driver.

func Open

func Open(driverName string, r *httprouter.Router) (*Conn, error)

Open a connection to a registered driver.

func (*Conn) Driver

func (c *Conn) Driver() driver.Driver

Driver returns the driver used by a connection.

func (*Conn) Send

func (c *Conn) Send(to, msg string) error

Send an SMS message through an opened driver connection. The from number is handled by the driver.

Directories

Path Synopsis
Package driver defines interfaces to be implemented by SMS drivers as used by package sms.
Package driver defines interfaces to be implemented by SMS drivers as used by package sms.

Jump to

Keyboard shortcuts

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