rate_limits

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

Package rate_limits contains auto-generated files. DO NOT MODIFY

Package rate_limits 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 rate limit resources See https://www.twilio.com/docs/verify/api/service-rate-limits for more details

func New

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

New creates a new instance of the rate limits client

func (Client) Create

Create creates a new rate limit See https://www.twilio.com/docs/verify/api/service-rate-limits#create-a-rate-limit 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 *CreateRateLimitInput) (*CreateRateLimitResponse, error)

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

func (*Client) NewRateLimitsPaginator

func (c *Client) NewRateLimitsPaginator() *RateLimitsPaginator

NewRateLimitsPaginator creates a new instance of the paginator for Page.

func (*Client) NewRateLimitsPaginatorWithOptions

func (c *Client) NewRateLimitsPaginatorWithOptions(options *RateLimitsPageOptions) *RateLimitsPaginator

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

func (Client) Page

Page retrieves a page of rate limits See https://www.twilio.com/docs/verify/api/service-rate-limits#list-all-rate-limits 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 *RateLimitsPageOptions) (*RateLimitsPageResponse, error)

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

type ClientProperties

type ClientProperties struct {
	ServiceSid string
}

ClientProperties are the properties required to manage the rate limits resources

type CreateRateLimitInput

type CreateRateLimitInput struct {
	Description *string `form:"Description,omitempty"`
	UniqueName  string  `validate:"required" form:"UniqueName"`
}

CreateRateLimitInput defines the input fields for creating a new rate limit

type CreateRateLimitResponse

type CreateRateLimitResponse struct {
	AccountSid  string     `json:"account_sid"`
	DateCreated time.Time  `json:"date_created"`
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	Description *string    `json:"description,omitempty"`
	ServiceSid  string     `json:"service_sid"`
	Sid         string     `json:"sid"`
	URL         string     `json:"url"`
	UniqueName  string     `json:"unique_name"`
}

CreateRateLimitResponse defines the response fields for the created rate limit

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"`
}

type PageRateLimitResponse

type PageRateLimitResponse struct {
	AccountSid  string     `json:"account_sid"`
	DateCreated time.Time  `json:"date_created"`
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	Description *string    `json:"description,omitempty"`
	ServiceSid  string     `json:"service_sid"`
	Sid         string     `json:"sid"`
	URL         string     `json:"url"`
	UniqueName  string     `json:"unique_name"`
}

type RateLimitsPage

type RateLimitsPage struct {
	CurrentPage *RateLimitsPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type RateLimitsPageOptions

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

RateLimitsPageOptions defines the query options for the api operation

type RateLimitsPageResponse

type RateLimitsPageResponse struct {
	Meta       PageMetaResponse        `json:"meta"`
	RateLimits []PageRateLimitResponse `json:"rate_limits"`
}

RateLimitsPageResponse defines the response fields for the rate limits page

type RateLimitsPaginator

type RateLimitsPaginator struct {
	Page       *RateLimitsPage
	RateLimits []PageRateLimitResponse
	// contains filtered or unexported fields
}

RateLimitsPaginator defines the fields for makings paginated api calls RateLimits is an array of ratelimits that have been returned from all of the page calls

func (*RateLimitsPaginator) CurrentPage

func (p *RateLimitsPaginator) CurrentPage() *RateLimitsPageResponse

CurrentPage retrieves the results for the current page

func (*RateLimitsPaginator) Error

func (p *RateLimitsPaginator) Error() error

Error retrieves the error returned from the page

func (*RateLimitsPaginator) Next

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

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

Jump to

Keyboard shortcuts

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