logs

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package logs contains auto-generated files. DO NOT MODIFY

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

func New

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

New creates a new instance of the logs client

func (*Client) NewLogsPaginator

func (c *Client) NewLogsPaginator() *LogsPaginator

NewLogsPaginator creates a new instance of the paginator for Page.

func (*Client) NewLogsPaginatorWithOptions

func (c *Client) NewLogsPaginatorWithOptions(options *LogsPageOptions) *LogsPaginator

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

func (Client) Page

func (c Client) Page(options *LogsPageOptions) (*LogsPageResponse, error)

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

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

type ClientProperties

type ClientProperties struct {
	EnvironmentSid string
	ServiceSid     string
}

ClientProperties are the properties required to manage the logs resources

type LogsPage

type LogsPage struct {
	CurrentPage *LogsPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type LogsPageOptions

type LogsPageOptions struct {
	PageSize    *int
	Page        *int
	PageToken   *string
	FunctionSid *string
	StartDate   *time.Time
	EndDate     *time.Time
}

LogsPageOptions defines the query options for the api operation

type LogsPageResponse

type LogsPageResponse struct {
	Logs []PageLogResponse `json:"logs"`
	Meta PageMetaResponse  `json:"meta"`
}

LogsPageResponse defines the response fields for the logs page

type LogsPaginator

type LogsPaginator struct {
	Page *LogsPage
	Logs []PageLogResponse
	// contains filtered or unexported fields
}

LogsPaginator defines the fields for makings paginated api calls Logs is an array of logs that have been returned from all of the page calls

func (*LogsPaginator) CurrentPage

func (p *LogsPaginator) CurrentPage() *LogsPageResponse

CurrentPage retrieves the results for the current page

func (*LogsPaginator) Error

func (p *LogsPaginator) Error() error

Error retrieves the error returned from the page

func (*LogsPaginator) Next

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

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

type PageLogResponse struct {
	AccountSid     string    `json:"account_sid"`
	BuildSid       string    `json:"build_sid"`
	DateCreated    time.Time `json:"date_created"`
	DeploymentSid  string    `json:"deployment_sid"`
	EnvironmentSid string    `json:"environment_sid"`
	FunctionSid    string    `json:"function_sid"`
	Level          string    `json:"level"`
	Message        string    `json:"message"`
	RequestSid     string    `json:"request_sid"`
	ServiceSid     string    `json:"service_sid"`
	Sid            string    `json:"sid"`
	URL            string    `json:"url"`
}

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