keys

package
Version: v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package keys contains auto-generated files. DO NOT MODIFY

Package keys contains auto-generated files. DO NOT MODIFY

Package keys 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 api key resources See https://www.twilio.com/docs/iam/keys/api-key-resource for more details

func New

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

New creates a new instance of the keys client

func (Client) Create

func (c Client) Create(input *CreateKeyInput) (*CreateKeyResponse, error)

Create creates a new key resource See https://www.twilio.com/docs/iam/keys/api-key-resource#create-a-new-api-key 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 *CreateKeyInput) (*CreateKeyResponse, error)

CreateWithContext creates a new key resource See https://www.twilio.com/docs/iam/keys/api-key-resource#create-a-new-api-key for more details

func (*Client) NewKeysPaginator

func (c *Client) NewKeysPaginator() *KeysPaginator

NewKeysPaginator creates a new instance of the paginator for Page.

func (*Client) NewKeysPaginatorWithOptions

func (c *Client) NewKeysPaginatorWithOptions(options *KeysPageOptions) *KeysPaginator

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

func (Client) Page

func (c Client) Page(options *KeysPageOptions) (*KeysPageResponse, error)

Page retrieves a page of keys See https://www.twilio.com/docs/iam/keys/api-key-resource#read-a-key-resource 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 *KeysPageOptions) (*KeysPageResponse, error)

PageWithContext retrieves a page of keys See https://www.twilio.com/docs/iam/keys/api-key-resource#read-a-key-resource for more details

type ClientProperties

type ClientProperties struct {
	AccountSid string
}

ClientProperties are the properties required to manage the keys resources

type CreateKeyInput

type CreateKeyInput struct {
	FriendlyName *string `form:"FriendlyName,omitempty"`
}

CreateKeyInput defines input fields for creating a new API Key

type CreateKeyResponse

type CreateKeyResponse struct {
	DateCreated  utils.RFC2822Time  `json:"date_created"`
	DateUpdated  *utils.RFC2822Time `json:"date_updated,omitempty"`
	FriendlyName string             `json:"friendly_name"`
	Secret       string             `json:"secret"`
	Sid          string             `json:"sid"`
}

CreateKeyResponse defines the response fields for creating a new API Key

type KeysPage

type KeysPage struct {
	CurrentPage *KeysPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type KeysPageOptions

type KeysPageOptions struct {
	PageSize     *int
	Page         *int
	PageToken    *string
	FriendlyName *string
	Status       *string
}

KeysPageOptions defines the query options for the api operation

type KeysPageResponse

type KeysPageResponse struct {
	End             int               `json:"end"`
	FirstPageURI    string            `json:"first_page_uri"`
	Keys            []PageKeyResponse `json:"keys"`
	NextPageURI     *string           `json:"next_page_uri,omitempty"`
	Page            int               `json:"page"`
	PageSize        int               `json:"page_size"`
	PreviousPageURI *string           `json:"previous_page_uri,omitempty"`
	Start           int               `json:"start"`
	URI             string            `json:"uri"`
}

KeysPageResponse defines the response fields for the keys page

type KeysPaginator

type KeysPaginator struct {
	Page *KeysPage
	Keys []PageKeyResponse
	// contains filtered or unexported fields
}

KeysPaginator defines the fields for makings paginated api calls Keys is an array of keys that have been returned from all of the page calls

func (*KeysPaginator) CurrentPage

func (p *KeysPaginator) CurrentPage() *KeysPageResponse

CurrentPage retrieves the results for the current page

func (*KeysPaginator) Error

func (p *KeysPaginator) Error() error

Error retrieves the error returned from the page

func (*KeysPaginator) Next

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

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

type PageKeyResponse struct {
	DateCreated  utils.RFC2822Time  `json:"date_created"`
	DateUpdated  *utils.RFC2822Time `json:"date_updated,omitempty"`
	FriendlyName string             `json:"friendly_name"`
	Sid          string             `json:"sid"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL