variables

package
v0.14.1 Latest Latest
Warning

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

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

Documentation

Overview

Package variables contains auto-generated files. DO NOT MODIFY

Package variables contains auto-generated files. DO NOT MODIFY

Package variables 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 environment variable resources See https://www.twilio.com/docs/runtime/functions-assets-api/api/variable for more details

func New

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

New creates a new instance of the variables client

func (Client) Create

Create creates a new environment variable See https://www.twilio.com/docs/runtime/functions-assets-api/api/variable#create-a-variable-resource 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 *CreateVariableInput) (*CreateVariableResponse, error)

CreateWithContext creates a new environment variable See https://www.twilio.com/docs/runtime/functions-assets-api/api/variable#create-a-variable-resource for more details

func (*Client) NewVariablesPaginator

func (c *Client) NewVariablesPaginator() *VariablesPaginator

NewVariablesPaginator creates a new instance of the paginator for Page.

func (*Client) NewVariablesPaginatorWithOptions

func (c *Client) NewVariablesPaginatorWithOptions(options *VariablesPageOptions) *VariablesPaginator

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

func (Client) Page

Page retrieves a page of environment variables See https://www.twilio.com/docs/runtime/functions-assets-api/api/variable#read-multiple-variable-resources 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 *VariablesPageOptions) (*VariablesPageResponse, error)

PageWithContext retrieves a page of environment variables See https://www.twilio.com/docs/runtime/functions-assets-api/api/variable#read-multiple-variable-resources for more details

type ClientProperties

type ClientProperties struct {
	EnvironmentSid string
	ServiceSid     string
}

ClientProperties are the properties required to manage the variables resources

type CreateVariableInput

type CreateVariableInput struct {
	Key   string `validate:"required" form:"Key"`
	Value string `validate:"required" form:"Value"`
}

CreateVariableInput defines the input fields for creating a new environment variable resource

type CreateVariableResponse

type CreateVariableResponse struct {
	AccountSid     string     `json:"account_sid"`
	DateCreated    time.Time  `json:"date_created"`
	DateUpdated    *time.Time `json:"date_updated,omitempty"`
	EnvironmentSid string     `json:"environment_sid"`
	Key            string     `json:"key"`
	ServiceSid     string     `json:"service_sid"`
	Sid            string     `json:"sid"`
	URL            string     `json:"url"`
	Value          string     `json:"value"`
}

CreateVariableResponse defines the response fields for the created environment variable

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 PageVariableResponse

type PageVariableResponse struct {
	AccountSid     string     `json:"account_sid"`
	DateCreated    time.Time  `json:"date_created"`
	DateUpdated    *time.Time `json:"date_updated,omitempty"`
	EnvironmentSid string     `json:"environment_sid"`
	Key            string     `json:"key"`
	ServiceSid     string     `json:"service_sid"`
	Sid            string     `json:"sid"`
	URL            string     `json:"url"`
	Value          string     `json:"value"`
}

type VariablesPage

type VariablesPage struct {
	CurrentPage *VariablesPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type VariablesPageOptions

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

VariablesPageOptions defines the query options for the api operation

type VariablesPageResponse

type VariablesPageResponse struct {
	Meta      PageMetaResponse       `json:"meta"`
	Variables []PageVariableResponse `json:"variables"`
}

VariablesPageResponse defines the response fields for the environment variables page

type VariablesPaginator

type VariablesPaginator struct {
	Page      *VariablesPage
	Variables []PageVariableResponse
	// contains filtered or unexported fields
}

VariablesPaginator defines the fields for makings paginated api calls Variables is an array of variables that have been returned from all of the page calls

func (*VariablesPaginator) CurrentPage

func (p *VariablesPaginator) CurrentPage() *VariablesPageResponse

CurrentPage retrieves the results for the current page

func (*VariablesPaginator) Error

func (p *VariablesPaginator) Error() error

Error retrieves the error returned from the page

func (*VariablesPaginator) Next

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

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