twilio

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const SUBSYTEM = "twilio"

Variables

View Source
var (
	ErrCodeInvalid          = errors.New("code invalid")
	ErrPhoneNumberInvalid   = errors.New("phone number invalid")
	ErrCodeNotApproved      = errors.New("code not approved")
	ErrVerificationNotFound = errors.New("verification not found")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *Config) (*Client, error)

func (*Client) RequestCode

func (c *Client) RequestCode(phoneNumber string, channel string) error

func (*Client) VerifyCode

func (c *Client) VerifyCode(phoneNumber string, code string) error

type Config

type Config struct {
	AccountSID       string `yaml:"account_sid" json:"account_sid" mapstructure:"account_sid"`
	ApiKey           string `yaml:"api_key" json:"api_key" mapstructure:"api_key"`
	ApiSecret        string `yaml:"api_secret" json:"api_secret" mapstructure:"api_secret"`
	VerifyServiceSID string `yaml:"verify_service_sid" json:"verify_service_sid" mapstructure:"verify_service_sid"`
}

Jump to

Keyboard shortcuts

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