twilio

package
v0.1.1069 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RecipientKey = contract.ToPubSubKey("recipient")
	CodeKey      = contract.ToPubSubKey("code")
)

Functions

func NewTwilioClient

func NewTwilioClient(ctx context.Context, retryOpts helper.RetryOptions, opts TwilioClientOptions) (*twilio.RestClient, error)

Types

type Blackbox added in v0.1.795

type Blackbox interface {
	// contains filtered or unexported methods
}

type Client

type Client interface {
	Blackbox
	contract.TwilioOperator
}

func NewClient

func NewClient(d Dependencies, opts ClientOptions) (Client, error)

func NewNoopClient added in v0.1.859

func NewNoopClient() Client

type ClientOption added in v0.1.795

type ClientOption = contract.Opt[ClientOptions]

func WithLoaded added in v0.1.796

func WithLoaded(x Loaded) ClientOption

type ClientOptions added in v0.1.795

type ClientOptions struct {
	Loaded
}

func ApplyClientOptions added in v0.1.795

func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions

type DefaultTool

type DefaultTool struct {
	T *contract.Tool[Client]
}

func NewTool

func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool

func (*DefaultTool) DecodeCallback added in v0.1.796

DecodeCallback validates and decodes a Twilio callback into a TwilioEvent.

func (*DefaultTool) MintVideoToken added in v0.1.796

func (d *DefaultTool) MintVideoToken(ctx context.Context, opts contract.MintVideoTokenOptions) (*string, error)

MintVideoToken mints a Twilio video token.

func (*DefaultTool) SendPlainSMS

func (d *DefaultTool) SendPlainSMS(ctx context.Context, s sms.SMS) ([]byte, error)

SendPlainSMS sends an SMS using Twilio and marshals the response.

type Loaded

type Loaded struct {
	Username    string
	Password    string
	SecureID    string
	AuthToken   string
	CallbackURL *url.URL
}

type Tool

type Tool interface {
	contract.TwilioOperator
}

type TwilioClientOptions

type TwilioClientOptions struct {
	Loaded
}

Jump to

Keyboard shortcuts

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