sms

package
Version: v0.0.0-...-2cc726f Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

type Sender interface {
	// Send - To send a new SMS.
	Send(phoneNumber, message string) error
}

Sender - Implementations of this will be used to send SMSes. (If required)

func NewSender

func NewSender(config SenderConfig) Sender

NewSender - Gets a new SMS sender.

type SenderConfig

type SenderConfig interface {
	// Phone number used for sending.
	PhoneNumber() string

	// Used to identity account.
	AccountID() string

	// Used to authenticate account.
	AuthToken() string
}

SenderConfig - To configure sms sender.

func NewEnvConfig

func NewEnvConfig() (SenderConfig, error)

NewEnvConfig - Provides a new config from environment variables for sms sender.

Jump to

Keyboard shortcuts

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