Documentation
¶
Overview ¶
Package sessions contains auto-generated files. DO NOT MODIFY
Package sessions contains auto-generated files. DO NOT MODIFY
Package sessions contains auto-generated files. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Create(input *CreateSessionInput) (*CreateSessionResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateSessionInput) (*CreateSessionResponse, error)
- func (c *Client) NewSessionsPaginator() *SessionsPaginator
- func (c *Client) NewSessionsPaginatorWithOptions(options *SessionsPageOptions) *SessionsPaginator
- func (c Client) Page(options *SessionsPageOptions) (*SessionsPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *SessionsPageOptions) (*SessionsPageResponse, error)
- type ClientProperties
- type CreateSessionInput
- type CreateSessionResponse
- type PageMetaResponse
- type PageSessionResponse
- type SessionsPage
- type SessionsPageOptions
- type SessionsPageResponse
- type SessionsPaginator
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 session resources See https://www.twilio.com/docs/proxy/api/session for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the sessions client
func (Client) Create ¶
func (c Client) Create(input *CreateSessionInput) (*CreateSessionResponse, error)
Create creates a new session See https://www.twilio.com/docs/proxy/api/session#create-a-session-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 *CreateSessionInput) (*CreateSessionResponse, error)
CreateWithContext creates a new session See https://www.twilio.com/docs/proxy/api/session#create-a-session-resource for more details
func (*Client) NewSessionsPaginator ¶
func (c *Client) NewSessionsPaginator() *SessionsPaginator
NewSessionsPaginator creates a new instance of the paginator for Page.
func (*Client) NewSessionsPaginatorWithOptions ¶
func (c *Client) NewSessionsPaginatorWithOptions(options *SessionsPageOptions) *SessionsPaginator
NewSessionsPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *SessionsPageOptions) (*SessionsPageResponse, error)
Page retrieves a page of sessions See https://www.twilio.com/docs/proxy/api/session#read-multiple-session-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 *SessionsPageOptions) (*SessionsPageResponse, error)
PageWithContext retrieves a page of sessions See https://www.twilio.com/docs/proxy/api/session#read-multiple-session-resources for more details
type ClientProperties ¶
type ClientProperties struct {
ServiceSid string
}
ClientProperties are the properties required to manage the sessions resources
type CreateSessionInput ¶
type CreateSessionInput struct { DateExpiry *time.Time `form:"DateExpiry,omitempty"` Mode *string `form:"Mode,omitempty"` Participants *[]interface{} `form:"Participants,omitempty"` Status *string `form:"Status,omitempty"` Ttl *int `form:"Ttl,omitempty"` UniqueName *string `form:"UniqueName,omitempty"` }
CreateSessionInput defines the input fields for creating a new session resource
type CreateSessionResponse ¶
type CreateSessionResponse struct { AccountSid string `json:"account_sid"` ClosedReason *string `json:"closed_reason,omitempty"` DateCreated time.Time `json:"date_created"` DateEnded *time.Time `json:"date_ended,omitempty"` DateExpiry *time.Time `json:"date_expiry,omitempty"` DateLastInteraction *time.Time `json:"date_last_interaction,omitempty"` DateStarted *time.Time `json:"date_started,omitempty"` DateUpdated *time.Time `json:"date_updated,omitempty"` Mode *string `json:"mode,omitempty"` ServiceSid string `json:"service_sid"` Sid string `json:"sid"` Status *string `json:"status,omitempty"` Ttl *int `json:"ttl,omitempty"` URL string `json:"url"` UniqueName string `json:"unique_name"` }
CreateSessionResponse defines the response fields for the created session
type PageMetaResponse ¶
type PageSessionResponse ¶
type PageSessionResponse struct { AccountSid string `json:"account_sid"` ClosedReason *string `json:"closed_reason,omitempty"` DateCreated time.Time `json:"date_created"` DateEnded *time.Time `json:"date_ended,omitempty"` DateExpiry *time.Time `json:"date_expiry,omitempty"` DateLastInteraction *time.Time `json:"date_last_interaction,omitempty"` DateStarted *time.Time `json:"date_started,omitempty"` DateUpdated *time.Time `json:"date_updated,omitempty"` Mode *string `json:"mode,omitempty"` ServiceSid string `json:"service_sid"` Sid string `json:"sid"` Status *string `json:"status,omitempty"` Ttl *int `json:"ttl,omitempty"` URL string `json:"url"` UniqueName string `json:"unique_name"` }
type SessionsPage ¶
type SessionsPage struct { CurrentPage *SessionsPageResponse Error error // contains filtered or unexported fields }
SessionsPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageSessionResponse or error that is returned from the api call(s)
type SessionsPageOptions ¶
SessionsPageOptions defines the query options for the api operation
type SessionsPageResponse ¶
type SessionsPageResponse struct { Meta PageMetaResponse `json:"meta"` Sessions []PageSessionResponse `json:"sessions"` }
SessionsPageResponse defines the response fields for the sessions page
type SessionsPaginator ¶
type SessionsPaginator struct { Page *SessionsPage Sessions []PageSessionResponse // contains filtered or unexported fields }
SessionsPaginator defines the fields for makings paginated api calls Sessions is an array of sessions that have been returned from all of the page calls
func (*SessionsPaginator) CurrentPage ¶
func (p *SessionsPaginator) CurrentPage() *SessionsPageResponse
CurrentPage retrieves the results for the current page
func (*SessionsPaginator) Error ¶
func (p *SessionsPaginator) Error() error
Error retrieves the error returned from the page
func (*SessionsPaginator) Next ¶
func (p *SessionsPaginator) 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 (*SessionsPaginator) NextWithContext ¶
func (p *SessionsPaginator) 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