twilio

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 8 Imported by: 0

README

= Twilio plugin
:toc: macro

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

[source,goplum]
----
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

[source,goplum]
----
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 added in v0.3.0

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

func (BaseAlert) Validate added in v0.3.0

func (b BaseAlert) Validate() error

type CallAlert added in v0.3.0

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

func (CallAlert) Send added in v0.3.0

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

func (CallAlert) Validate added in v0.3.0

func (c CallAlert) Validate() error

type Plugin

type Plugin struct{}

func (Plugin) Alert added in v0.2.0

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

func (Plugin) Check added in v0.2.0

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 added in v0.2.0

func (s SmsAlert) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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