Documentation ¶
Overview ¶
Package sms provides a small wrapper around AWS SNS SMS support.
Example ¶
Example showing the most basic usage and defaults.
sms.Send("Hello World", env.MustGet("PHONE"))
Output:
Example (Overrides) ¶
Example showing how to override the defaults unless you want to go all-out and use the SMS struct directly.
sms.DefaultMaxPrice = 0.5 sms.DefaultType = sms.Transactional sms.Send("Hello World", env.MustGet("PHONE"))
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultMaxPrice = 0.01 DefaultType = Promotional )
Defaults.
Functions ¶
Types ¶
type SMS ¶
type SMS struct { Service snsiface.SNSAPI // Service implementation SenderID string // SenderID (optional) Type Type // Type of SMS delivery mode MaxPrice float64 // MaxPrice (defaults to $0.01) }
SMS configures an SNS SMS client.
type Type ¶
type Type string
Type of SMS delivery mode.
const ( // Promotional are non-critical messages, such as marketing messages. // Amazon SNS optimizes the message delivery to incur the lowest cost. Promotional Type = "Promotional" // Transactional messages are critical messages that support // customer transactions, such as one-time passcodes for multi-factor authentication. // Amazon SNS optimizes the message delivery to achieve the highest reliability. Transactional = "Transactional" )
Click to show internal directories.
Click to hide internal directories.