buckets

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package buckets contains auto-generated files. DO NOT MODIFY

Package buckets contains auto-generated files. DO NOT MODIFY

Package buckets 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 BucketsPage

type BucketsPage struct {
	CurrentPage *BucketsPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type BucketsPageOptions

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

BucketsPageOptions defines the query options for the api operation

type BucketsPageResponse

type BucketsPageResponse struct {
	Buckets []PageBucketResponse `json:"buckets"`
	Meta    PageMetaResponse     `json:"meta"`
}

BucketsPageResponse defines the response fields for the rate limit buckets page

type BucketsPaginator

type BucketsPaginator struct {
	Page    *BucketsPage
	Buckets []PageBucketResponse
	// contains filtered or unexported fields
}

BucketsPaginator defines the fields for makings paginated api calls Buckets is an array of buckets that have been returned from all of the page calls

func (*BucketsPaginator) CurrentPage

func (p *BucketsPaginator) CurrentPage() *BucketsPageResponse

CurrentPage retrieves the results for the current page

func (*BucketsPaginator) Error

func (p *BucketsPaginator) Error() error

Error retrieves the error returned from the page

func (*BucketsPaginator) Next

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

func (p *BucketsPaginator) 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 rate limit bucket resources See https://www.twilio.com/docs/verify/api/service-rate-limit-buckets for more details

func New

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

New creates a new instance of the buckets client

func (Client) Create

func (c Client) Create(input *CreateBucketInput) (*CreateBucketResponse, error)

Create creates a new rate limit bucket See https://www.twilio.com/docs/verify/api/service-rate-limit-buckets#create-a-bucket for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) CreateWithContext

func (c Client) CreateWithContext(context context.Context, input *CreateBucketInput) (*CreateBucketResponse, error)

CreateWithContext creates a new rate limit bucket See https://www.twilio.com/docs/verify/api/service-rate-limit-buckets#create-a-bucket for more details

func (*Client) NewBucketsPaginator

func (c *Client) NewBucketsPaginator() *BucketsPaginator

NewBucketsPaginator creates a new instance of the paginator for Page.

func (*Client) NewBucketsPaginatorWithOptions

func (c *Client) NewBucketsPaginatorWithOptions(options *BucketsPageOptions) *BucketsPaginator

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

func (Client) Page

func (c Client) Page(options *BucketsPageOptions) (*BucketsPageResponse, error)

Page retrieves a page of rate limit buckets See https://www.twilio.com/docs/verify/api/service-rate-limit-buckets#list-all-buckets for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) PageWithContext

func (c Client) PageWithContext(context context.Context, options *BucketsPageOptions) (*BucketsPageResponse, error)

PageWithContext retrieves a page of rate limit buckets See https://www.twilio.com/docs/verify/api/service-rate-limit-buckets#list-all-buckets for more details

type ClientProperties

type ClientProperties struct {
	RateLimitSid string
	ServiceSid   string
}

ClientProperties are the properties required to manage the buckets resources

type CreateBucketInput

type CreateBucketInput struct {
	Interval int `validate:"required" form:"Interval"`
	Max      int `validate:"required" form:"Max"`
}

CreateBucketInput defines the input fields for creating a new rate limit bucket

type CreateBucketResponse

type CreateBucketResponse struct {
	AccountSid   string     `json:"account_sid"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	Interval     int        `json:"interval"`
	Max          int        `json:"max"`
	RateLimitSid string     `json:"rate_limit_sid"`
	ServiceSid   string     `json:"service_sid"`
	Sid          string     `json:"sid"`
	URL          string     `json:"url"`
}

CreateBucketResponse defines the response fields for the created rate limit bucket

type PageBucketResponse

type PageBucketResponse struct {
	AccountSid   string     `json:"account_sid"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	Interval     int        `json:"interval"`
	Max          int        `json:"max"`
	RateLimitSid string     `json:"rate_limit_sid"`
	ServiceSid   string     `json:"service_sid"`
	Sid          string     `json:"sid"`
	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