package
Version:
v1.17.0
Opens a new window with list of versions in this module.
Published: Aug 22, 2021
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package notify allows sending of email and text messages.
View Source
const (
ATT = "att"
TMOBILE = "tmobile"
VERIZON = "verizon"
SPRINT = "sprint"
)
Notify Constants
View Source
var (
SenderConfigFilename = "notify-sender.yaml"
RxConfigFilename = "notify-rx.yaml"
)
Config Constants
Notify can send emails to email or phone number recipients
NewNotify creates a new Notify
SendEmail sends an email with attachments
SendText sends a text message with attachments
Note: text messages tend to be slower as the target service provider decides
when to relay messages from email to mobile devices.
Phone contains phone information
NewPhone creates a new Phone
type RxConfig struct {
Email []string `yaml:"email,omitempty"`
Text SmsConfig `yaml:"sms"`
}
RxConfig contains parameters for notifier receivers
NewRxConfig returns a new RxConfig
GetPhones returns a slice of Phone
type SenderConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
User string `yaml:"user"`
Password string `yaml:"password"`
}
SenderConfig contains parameters for notify sender
NewSenderConfig creates a new SenderConfig
type SmsConfig struct {
Verizon []string `yaml:"verizon,omitempty"`
Att []string `yaml:"att,omitempty"`
Tmobile []string `yaml:"tmobile,omitempty"`
}
SmsConfig contains parameters for sms phone numbers
Source Files
¶
Click to show internal directories.
Click to hide internal directories.