environments

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

This is an autogenerated file. DO NOT MODIFY

This is an autogenerated file. DO NOT MODIFY

This is an autogenerated file. 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 resources See https://www.twilio.com/docs/runtime/functions-assets-api/api/environment for more details

func New

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

New creates a new instance of the environments client

func (Client) Create

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

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

func (*Client) NewEnvironmentsPaginator

func (c *Client) NewEnvironmentsPaginator() *EnvironmentsPaginator

NewEnvironmentsPaginator creates a new instance of the paginator for Page.

func (*Client) NewEnvironmentsPaginatorWithOptions

func (c *Client) NewEnvironmentsPaginatorWithOptions(options *EnvironmentsPageOptions) *EnvironmentsPaginator

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

func (Client) Page

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

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

type ClientProperties

type ClientProperties struct {
	ServiceSid string
}

ClientProperties are the properties required to manage the environments resources

type CreateEnvironmentInput

type CreateEnvironmentInput struct {
	DomainSuffix *string `form:"DomainSuffix,omitempty"`
	UniqueName   string  `validate:"required" form:"UniqueName"`
}

CreateEnvironmentInput defines the input fields for creating a new environment resource

type CreateEnvironmentResponse

type CreateEnvironmentResponse struct {
	AccountSid   string     `json:"account_sid"`
	BuildSid     *string    `json:"build_sid,omitempty"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	DomainName   string     `json:"domain_name"`
	DomainSuffix *string    `json:"domain_suffix,omitempty"`
	ServiceSid   string     `json:"service_sid"`
	Sid          string     `json:"sid"`
	URL          string     `json:"url"`
	UniqueName   string     `json:"unique_name"`
}

CreateEnvironmentResponse defines the response fields for the created environment

type EnvironmentsPage

type EnvironmentsPage struct {
	CurrentPage *EnvironmentsPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type EnvironmentsPageOptions

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

EnvironmentsPageOptions defines the query options for the api operation

type EnvironmentsPageResponse

type EnvironmentsPageResponse struct {
	Environments []PageEnvironmentResponse `json:"environments"`
	Meta         PageMetaResponse          `json:"meta"`
}

EnvironmentsPageResponse defines the response fields for the environments page

type EnvironmentsPaginator

type EnvironmentsPaginator struct {
	Page         *EnvironmentsPage
	Environments []PageEnvironmentResponse
	// contains filtered or unexported fields
}

EnvironmentsPaginator defines the fields for makings paginated api calls Environments is an array of environments that have been returned from all of the page calls

func (*EnvironmentsPaginator) CurrentPage

CurrentPage retrieves the results for the current page

func (*EnvironmentsPaginator) Error

func (p *EnvironmentsPaginator) Error() error

Error retrieves the error returned from the page

func (*EnvironmentsPaginator) Next

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

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

type PageEnvironmentResponse struct {
	AccountSid   string     `json:"account_sid"`
	BuildSid     *string    `json:"build_sid,omitempty"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	DomainName   string     `json:"domain_name"`
	DomainSuffix *string    `json:"domain_suffix,omitempty"`
	ServiceSid   string     `json:"service_sid"`
	Sid          string     `json:"sid"`
	URL          string     `json:"url"`
	UniqueName   string     `json:"unique_name"`
}

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