twilio

package
v0.1.511 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: Apache-2.0 Imports: 8 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 Client

type Client interface {
	contract.TwilioOperator
}

func NewClient

func NewClient(d Dependencies) (Client, error)

type DefaultTool

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

func NewTool

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

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
}

type Tool

type Tool interface {
	Client
}

type TwilioClientOptions

type TwilioClientOptions struct {
	Loaded
}

Jump to

Keyboard shortcuts

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