twilio

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 8 Imported by: 0

README

Twilio plugin

The twilio plugin provides alerts that use the Twilio API.

To use the Twilio alerts you must have a funded Twilio account, and configure the SID, Token, and From/To phone numbers.

Alerts

twilio.call
alert twilio.call "example" {
  sid = "twilio sid"
  token = "twilio token"
  from = "+01 867 5309"
  to = "+01 867 5309"
}

Initiates a phone call using the Twilio API. When the call is answered the alert will be spoken using text-to-speech.

twilio.sms
alert twilio.sms "example" {
  sid = "twilio sid"
  token = "twilio token"
  from = "+01 867 5309"
  to = "+01 867 5309"
}

Sends SMS alerts using the Twilio API.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseAlert

type BaseAlert struct {
	To    string
	From  string
	Sid   string
	Token string
}

func (BaseAlert) Validate

func (b BaseAlert) Validate() error

type CallAlert

type CallAlert struct {
	BaseAlert `config:",squash"`
}

func (CallAlert) Send

func (c CallAlert) Send(details goplum.AlertDetails) error

func (CallAlert) Validate

func (c CallAlert) Validate() error

type Plugin

type Plugin struct{}

func (Plugin) Alert

func (p Plugin) Alert(kind string) goplum.Alert

func (Plugin) Check

func (p Plugin) Check(_ string) goplum.Check

type SmsAlert

type SmsAlert struct {
	BaseAlert `config:",squash"`
}

func (SmsAlert) Send

func (s SmsAlert) Send(details goplum.AlertDetails) error

func (SmsAlert) Validate

func (s SmsAlert) Validate() error

Jump to

Keyboard shortcuts

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