events

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package events contains auto-generated files. DO NOT MODIFY

Package events 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 event resources See https://www.twilio.com/docs/usage/monitor-events for more details

func New

func New(client *client.Client) *Client

New creates a new instance of the events client

func (*Client) NewEventsPaginator

func (c *Client) NewEventsPaginator() *EventsPaginator

NewEventsPaginator creates a new instance of the paginator for Page.

func (*Client) NewEventsPaginatorWithOptions

func (c *Client) NewEventsPaginatorWithOptions(options *EventsPageOptions) *EventsPaginator

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

func (Client) Page

func (c Client) Page(options *EventsPageOptions) (*EventsPageResponse, error)

Page retrieves a page of events See https://www.twilio.com/docs/usage/monitor-events#read-multiple-event-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 *EventsPageOptions) (*EventsPageResponse, error)

PageWithContext retrieves a page of events See https://www.twilio.com/docs/usage/monitor-events#read-multiple-event-resources for more details

type EventsPage

type EventsPage struct {
	CurrentPage *EventsPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type EventsPageOptions

type EventsPageOptions struct {
	PageSize        *int
	Page            *int
	PageToken       *string
	ActorSid        *string
	EventType       *string
	ResourceSid     *string
	SourceIpAddress *string
	StartDate       *time.Time
	EndDate         *time.Time
}

EventsPageOptions defines the query options for the api operation

type EventsPageResponse

type EventsPageResponse struct {
	Events []PageEventResponse `json:"events"`
	Meta   PageMetaResponse    `json:"meta"`
}

EventsPageResponse defines the response fields for the events page

type EventsPaginator

type EventsPaginator struct {
	Page   *EventsPage
	Events []PageEventResponse
	// contains filtered or unexported fields
}

EventsPaginator defines the fields for makings paginated api calls Events is an array of events that have been returned from all of the page calls

func (*EventsPaginator) CurrentPage

func (p *EventsPaginator) CurrentPage() *EventsPageResponse

CurrentPage retrieves the results for the current page

func (*EventsPaginator) Error

func (p *EventsPaginator) Error() error

Error retrieves the error returned from the page

func (*EventsPaginator) Next

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

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

type PageEventResponse struct {
	AccountSid      string                 `json:"account_sid"`
	ActorSid        string                 `json:"actor_sid"`
	ActorType       string                 `json:"actor_type"`
	Description     *string                `json:"description,omitempty"`
	EventData       map[string]interface{} `json:"event_data"`
	EventDate       time.Time              `json:"event_date"`
	EventType       string                 `json:"event_type"`
	ResourceSid     string                 `json:"resource_sid"`
	ResourceType    string                 `json:"resource_type"`
	Sid             string                 `json:"sid"`
	Source          string                 `json:"source"`
	SourceIpAddress string                 `json:"source_ip_address"`
	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