challenges

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 challenges contains auto-generated files. DO NOT MODIFY

Package challenges contains auto-generated files. DO NOT MODIFY

Package challenges 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 ChallengesPage

type ChallengesPage struct {
	CurrentPage *ChallengesPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type ChallengesPageOptions

type ChallengesPageOptions struct {
	PageSize  *int
	Page      *int
	PageToken *string
	FactorSid *string
	Status    *string
}

ChallengesPageOptions defines the query options for the api operation

type ChallengesPageResponse

type ChallengesPageResponse struct {
	Challenges []PageChallengeResponse `json:"challenges"`
	Meta       PageMetaResponse        `json:"meta"`
}

ChallengesPageResponse defines the response fields for the challenges page

type ChallengesPaginator

type ChallengesPaginator struct {
	Page       *ChallengesPage
	Challenges []PageChallengeResponse
	// contains filtered or unexported fields
}

ChallengesPaginator defines the fields for makings paginated api calls Challenges is an array of challenges that have been returned from all of the page calls

func (*ChallengesPaginator) CurrentPage

func (p *ChallengesPaginator) CurrentPage() *ChallengesPageResponse

CurrentPage retrieves the results for the current page

func (*ChallengesPaginator) Error

func (p *ChallengesPaginator) Error() error

Error retrieves the error returned from the page

func (*ChallengesPaginator) Next

func (p *ChallengesPaginator) 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 (*ChallengesPaginator) NextWithContext

func (p *ChallengesPaginator) 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 Client

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

Client for managing challenge resources See https://www.twilio.com/docs/verify/api/challenge 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 challenges client

func (Client) Create

Create creates a new challenge See https://www.twilio.com/docs/verify/api/challenge#create-a-challenge-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 *CreateChallengeInput) (*CreateChallengeResponse, error)

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

func (*Client) NewChallengesPaginator

func (c *Client) NewChallengesPaginator() *ChallengesPaginator

NewChallengesPaginator creates a new instance of the paginator for Page.

func (*Client) NewChallengesPaginatorWithOptions

func (c *Client) NewChallengesPaginatorWithOptions(options *ChallengesPageOptions) *ChallengesPaginator

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

func (Client) Page

Page retrieves a page of challenges See https://www.twilio.com/docs/verify/api/challenge#read-multiple-challenge-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 *ChallengesPageOptions) (*ChallengesPageResponse, error)

PageWithContext retrieves a page of challenges See https://www.twilio.com/docs/verify/api/challenge#read-multiple-challenge-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 challenges resources

type CreateChallengeDetailsInput

type CreateChallengeDetailsInput struct {
	Fields  *[]string `form:"Fields,omitempty"`
	Message *string   `form:"Message,omitempty"`
}

type CreateChallengeDetailsResponse

type CreateChallengeDetailsResponse struct {
	Date    *time.Time     `json:"date,omitempty"`
	Fields  *[]interface{} `json:"fields,omitempty"`
	Message *string        `json:"message,omitempty"`
}

type CreateChallengeInput

type CreateChallengeInput struct {
	Details        *CreateChallengeDetailsInput `form:"Details,omitempty"`
	ExpirationDate *time.Time                   `form:"ExpirationDate,omitempty"`
	FactorSid      string                       `validate:"required" form:"FactorSid"`
	HiddenDetails  *string                      `form:"HiddenDetails,omitempty"`
}

CreateChallengeInput defines the input fields for creating a new challenge

type CreateChallengeResponse

type CreateChallengeResponse struct {
	AccountSid      string                          `json:"account_sid"`
	DateCreated     time.Time                       `json:"date_created"`
	DateResponded   *time.Time                      `json:"date_responded,omitempty"`
	DateUpdated     *time.Time                      `json:"date_updated,omitempty"`
	Details         *CreateChallengeDetailsResponse `json:"details,omitempty"`
	EntitySid       string                          `json:"entity_sid"`
	ExpirationDate  time.Time                       `json:"expiration_date"`
	FactorSid       string                          `json:"factor_sid"`
	FactorType      string                          `json:"factor_type"`
	HiddenDetails   *map[string]interface{}         `json:"hidden_details,omitempty"`
	Identity        string                          `json:"identity"`
	RespondedReason *string                         `json:"responded_reason,omitempty"`
	ServiceSid      string                          `json:"service_sid"`
	Sid             string                          `json:"sid"`
	Status          string                          `json:"status"`
	URL             string                          `json:"url"`
}

CreateChallengeResponse defines the response fields for the created challenge

type PageChallengeDetailsResponse

type PageChallengeDetailsResponse struct {
	Date    *time.Time     `json:"date,omitempty"`
	Fields  *[]interface{} `json:"fields,omitempty"`
	Message *string        `json:"message,omitempty"`
}

type PageChallengeResponse

type PageChallengeResponse struct {
	AccountSid      string                        `json:"account_sid"`
	DateCreated     time.Time                     `json:"date_created"`
	DateResponded   *time.Time                    `json:"date_responded,omitempty"`
	DateUpdated     *time.Time                    `json:"date_updated,omitempty"`
	Details         *PageChallengeDetailsResponse `json:"details,omitempty"`
	EntitySid       string                        `json:"entity_sid"`
	ExpirationDate  time.Time                     `json:"expiration_date"`
	FactorSid       string                        `json:"factor_sid"`
	FactorType      string                        `json:"factor_type"`
	HiddenDetails   *map[string]interface{}       `json:"hidden_details,omitempty"`
	Identity        string                        `json:"identity"`
	RespondedReason *string                       `json:"responded_reason,omitempty"`
	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