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 ¶
- type BucketsPage
- type BucketsPageOptions
- type BucketsPageResponse
- type BucketsPaginator
- type Client
- func (c Client) Create(input *CreateBucketInput) (*CreateBucketResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateBucketInput) (*CreateBucketResponse, error)
- func (c *Client) NewBucketsPaginator() *BucketsPaginator
- func (c *Client) NewBucketsPaginatorWithOptions(options *BucketsPageOptions) *BucketsPaginator
- func (c Client) Page(options *BucketsPageOptions) (*BucketsPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *BucketsPageOptions) (*BucketsPageResponse, error)
- type ClientProperties
- type CreateBucketInput
- type CreateBucketResponse
- type PageBucketResponse
- type PageMetaResponse
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 ¶
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 ¶
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"` }