twilio

package
v0.1.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config holds configuration options for Twilio.

type ConfigOption

type ConfigOption func(*client)

ConfigOption configures the service.

func WithConfig

func WithConfig(config Config) ConfigOption

WithConfig configures the service with a Config.

func WithDefaults

func WithDefaults(accountSID, authToken, smsSender string) ConfigOption

WithDefaults configures a Twilio client with a user's account SID and authentication token and configures all other values to default.

type Twilio

type Twilio interface {
	// SMS sends an SMS message to a phone number.
	SMS(ctx context.Context, phoneNumber string, message string) error
}

Twilio exposes Twilio's REST API.

func NewClient

func NewClient(configuration ConfigOption) Twilio

NewClient returns a Twilio client.

Jump to

Keyboard shortcuts

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