factors

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package factors contains auto-generated files. DO NOT MODIFY

Package factors contains auto-generated files. DO NOT MODIFY

Package factors contains auto-generated files. DO NOT MODIFY

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for managing factor resources See https://www.twilio.com/docs/verify/api/factor for more details This client is currently in beta and subject to change. Please use with caution

func New

func New(client *client.Client, properties ClientProperties) *Client

New creates a new instance of the factors client

func (Client) Create

func (c Client) Create(input *CreateFactorInput) (*CreateFactorResponse, error)

Create creates a new factor See https://www.twilio.com/docs/verify/api/factor#create-a-factor-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information This resource is currently in beta and subject to change. Please use with caution

func (Client) CreateWithContext

func (c Client) CreateWithContext(context context.Context, input *CreateFactorInput) (*CreateFactorResponse, error)

CreateWithContext creates a new factor See https://www.twilio.com/docs/verify/api/factor#create-a-factor-resource for more details This resource is currently in beta and subject to change. Please use with caution

func (*Client) NewFactorsPaginator

func (c *Client) NewFactorsPaginator() *FactorsPaginator

NewFactorsPaginator creates a new instance of the paginator for Page.

func (*Client) NewFactorsPaginatorWithOptions

func (c *Client) NewFactorsPaginatorWithOptions(options *FactorsPageOptions) *FactorsPaginator

NewFactorsPaginatorWithOptions creates a new instance of the paginator for Page with options.

func (Client) Page

func (c Client) Page(options *FactorsPageOptions) (*FactorsPageResponse, error)

Page retrieves a page of factors See https://www.twilio.com/docs/verify/api/factor#read-multiple-factor-resources for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information This resource is currently in beta and subject to change. Please use with caution

func (Client) PageWithContext

func (c Client) PageWithContext(context context.Context, options *FactorsPageOptions) (*FactorsPageResponse, error)

PageWithContext retrieves a page of factors See https://www.twilio.com/docs/verify/api/factor#read-multiple-factor-resources for more details This resource is currently in beta and subject to change. Please use with caution

type ClientProperties

type ClientProperties struct {
	Identity   string
	ServiceSid string
}

ClientProperties are the properties required to manage the factors resources

type CreateFactorBindingInput

type CreateFactorBindingInput struct {
	Alg       string `validate:"required" form:"Alg"`
	PublicKey string `validate:"required" form:"PublicKey"`
}

type CreateFactorConfigInput

type CreateFactorConfigInput struct {
	AppId                string  `validate:"required" form:"AppId"`
	NotificationPlatform string  `validate:"required" form:"NotificationPlatform"`
	NotificationToken    string  `validate:"required" form:"NotificationToken"`
	SdkVersion           *string `form:"SdkVersion,omitempty"`
}

type CreateFactorConfigResponse

type CreateFactorConfigResponse struct {
	AppId                string  `json:"app_id"`
	NotificationPlatform string  `json:"notification_platform"`
	NotificationToken    string  `json:"notification_token"`
	SdkVersion           *string `json:"sdk_version,omitempty"`
}

type CreateFactorInput

type CreateFactorInput struct {
	Binding      CreateFactorBindingInput `validate:"required" form:"Binding"`
	Config       CreateFactorConfigInput  `validate:"required" form:"Config"`
	FactorType   string                   `validate:"required" form:"FactorType"`
	FriendlyName string                   `validate:"required" form:"FriendlyName"`
}

CreateFactorInput defines the input fields for creating a new factor

type CreateFactorResponse

type CreateFactorResponse struct {
	AccountSid   string                     `json:"account_sid"`
	Config       CreateFactorConfigResponse `json:"config"`
	DateCreated  time.Time                  `json:"date_created"`
	DateUpdated  *time.Time                 `json:"date_updated,omitempty"`
	EntitySid    string                     `json:"entity_sid"`
	FactorType   string                     `json:"factor_type"`
	FriendlyName string                     `json:"friendly_name"`
	Identity     string                     `json:"identity"`
	ServiceSid   string                     `json:"service_sid"`
	Sid          string                     `json:"sid"`
	Status       string                     `json:"status"`
	URL          string                     `json:"url"`
}

CreateFactorResponse defines the response fields for the created factor

type FactorsPage

type FactorsPage struct {
	CurrentPage *FactorsPageResponse
	Error       error
	// contains filtered or unexported fields
}

FactorsPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageFactorResponse or error that is returned from the api call(s)

type FactorsPageOptions

type FactorsPageOptions struct {
	PageSize  *int
	Page      *int
	PageToken *string
}

FactorsPageOptions defines the query options for the api operation

type FactorsPageResponse

type FactorsPageResponse struct {
	Factors []PageFactorResponse `json:"factors"`
	Meta    PageMetaResponse     `json:"meta"`
}

FactorsPageResponse defines the response fields for the factors page

type FactorsPaginator

type FactorsPaginator struct {
	Page    *FactorsPage
	Factors []PageFactorResponse
	// contains filtered or unexported fields
}

FactorsPaginator defines the fields for makings paginated api calls Factors is an array of factors that have been returned from all of the page calls

func (*FactorsPaginator) CurrentPage

func (p *FactorsPaginator) CurrentPage() *FactorsPageResponse

CurrentPage retrieves the results for the current page

func (*FactorsPaginator) Error

func (p *FactorsPaginator) Error() error

Error retrieves the error returned from the page

func (*FactorsPaginator) Next

func (p *FactorsPaginator) Next() bool

Next retrieves the next page of results. Next will return false when either an error occurs or there are no more pages to iterate Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (*FactorsPaginator) NextWithContext

func (p *FactorsPaginator) NextWithContext(context context.Context) bool

NextWithContext retrieves the next page of results. NextWithContext will return false when either an error occurs or there are no more pages to iterate

type PageFactorConfigResponse

type PageFactorConfigResponse struct {
	AppId                string  `json:"app_id"`
	NotificationPlatform string  `json:"notification_platform"`
	NotificationToken    string  `json:"notification_token"`
	SdkVersion           *string `json:"sdk_version,omitempty"`
}

type PageFactorResponse

type PageFactorResponse struct {
	AccountSid   string                   `json:"account_sid"`
	Config       PageFactorConfigResponse `json:"config"`
	DateCreated  time.Time                `json:"date_created"`
	DateUpdated  *time.Time               `json:"date_updated,omitempty"`
	EntitySid    string                   `json:"entity_sid"`
	FactorType   string                   `json:"factor_type"`
	FriendlyName string                   `json:"friendly_name"`
	Identity     string                   `json:"identity"`
	ServiceSid   string                   `json:"service_sid"`
	Sid          string                   `json:"sid"`
	Status       string                   `json:"status"`
	URL          string                   `json:"url"`
}

type PageMetaResponse

type PageMetaResponse struct {
	FirstPageURL    string  `json:"first_page_url"`
	Key             string  `json:"key"`
	NextPageURL     *string `json:"next_page_url,omitempty"`
	Page            int     `json:"page"`
	PageSize        int     `json:"page_size"`
	PreviousPageURL *string `json:"previous_page_url,omitempty"`
	URL             string  `json:"url"`
}

Jump to

Keyboard shortcuts

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