twilio

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name          = "twilio"
	AttrFrom      = "from"
	AttrSid       = "sid"
	AttrAuthToken = "authToken"
	AttrPhone     = "phone"
	AttrBody      = "body"
	AttrAmount    = "amount"
	AttrCurrency  = "currency"
)
View Source
const (
	// StatusAccepted ...
	StatusAccepted = "accepted"
	// StatusQueued ...
	StatusQueued = "queued"
	// StatusSending ...
	StatusSending = "sending"
	// StatusReceiving ...
	StatusReceiving = "receiving"
	// StatusReceived ...
	StatusReceived = "received"
	// StatusDelivered ...
	StatusDelivered = "delivered"
	// StatusUndelivered ...
	StatusUndelivered = "undelivered"
	// StatusSent ...
	StatusSent = "sent"
	// StatusFailed ...
	StatusFailed = "failed"
)

Variables

This section is empty.

Functions

func New

func New() plugins.Plugable

func NewAttr

func NewAttr() m.Attributes

func NewMessageParams

func NewMessageParams() m.Attributes

func NewSettings

func NewSettings() map[string]*m.Attribute

Types

type Actor

type Actor struct {
	entity_manager.BaseActor
	// contains filtered or unexported fields
}

Actor ...

func NewActor

func NewActor(settings m.Attributes,
	entityManager entity_manager.EntityManager,
	eventBus event_bus.EventBus,
	adaptors *adaptors.Adaptors) *Actor

NewActor ...

func (*Actor) Balance

func (e *Actor) Balance() (balance Balance, err error)

Balance ...

func (*Actor) GetStatus

func (e *Actor) GetStatus(smsId string) (string, error)

GetStatus ...

func (*Actor) Send

func (e *Actor) Send(phone string, message m.Message) (err error)

Send ...

func (*Actor) Spawn

func (p *Actor) Spawn() entity_manager.PluginActor

func (*Actor) UpdateBalance

func (p *Actor) UpdateBalance() (err error)

UpdateBalance ...

type Balance

type Balance struct {
	Currency   string `json:"currency"`
	Balance    string `json:"balance"`
	AccountSid string `json:"account_sid"`
}

Balance ...

Jump to

Keyboard shortcuts

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