Documentation
¶
Overview ¶
Package credentials contains auto-generated files. DO NOT MODIFY
Package credentials contains auto-generated files. DO NOT MODIFY
Package credentials contains auto-generated files. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Create(input *CreateCredentialInput) (*CreateCredentialResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateCredentialInput) (*CreateCredentialResponse, error)
- func (c *Client) NewCredentialsPaginator() *CredentialsPaginator
- func (c *Client) NewCredentialsPaginatorWithOptions(options *CredentialsPageOptions) *CredentialsPaginator
- func (c Client) Page(options *CredentialsPageOptions) (*CredentialsPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *CredentialsPageOptions) (*CredentialsPageResponse, error)
- type ClientProperties
- type CreateCredentialInput
- type CreateCredentialResponse
- type CredentialsPage
- type CredentialsPageOptions
- type CredentialsPageResponse
- type CredentialsPaginator
- type PageCredentialResponse
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 credential resources
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the credentials client
func (Client) Create ¶
func (c Client) Create(input *CreateCredentialInput) (*CreateCredentialResponse, error)
Create creates a SIP credential resource See https://www.twilio.com/docs/voice/sip/api/sip-credential-resource#create-a-sip-credential-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 *CreateCredentialInput) (*CreateCredentialResponse, error)
CreateWithContext creates a SIP credential resource See https://www.twilio.com/docs/voice/sip/api/sip-credential-resource#create-a-sip-credential-resource for more details
func (*Client) NewCredentialsPaginator ¶
func (c *Client) NewCredentialsPaginator() *CredentialsPaginator
NewCredentialsPaginator creates a new instance of the paginator for Page.
func (*Client) NewCredentialsPaginatorWithOptions ¶
func (c *Client) NewCredentialsPaginatorWithOptions(options *CredentialsPageOptions) *CredentialsPaginator
NewCredentialsPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *CredentialsPageOptions) (*CredentialsPageResponse, error)
Page retrieves a page of SIP credentials See https://www.twilio.com/docs/voice/sip/api/sip-credential-resource#read-multiple-sip-credential-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 *CredentialsPageOptions) (*CredentialsPageResponse, error)
PageWithContext retrieves a page of SIP credentials See https://www.twilio.com/docs/voice/sip/api/sip-credential-resource#read-multiple-sip-credential-resources for more details
type ClientProperties ¶
ClientProperties are the properties required to manage the credentials resources
type CreateCredentialInput ¶
type CreateCredentialInput struct { Password string `validate:"required" form:"Password"` Username string `validate:"required" form:"Username"` }
CreateCredentialInput defines input fields for creating a new SIP credential
type CreateCredentialResponse ¶
type CreateCredentialResponse struct { AccountSid string `json:"account_sid"` CredentialListSid string `json:"credential_list_sid"` DateCreated utils.RFC2822Time `json:"date_created"` DateUpdated *utils.RFC2822Time `json:"date_updated,omitempty"` Sid string `json:"sid"` Username string `json:"username"` }
CreateCredentialResponse defines the response fields for creating a new SIP credential
type CredentialsPage ¶
type CredentialsPage struct { CurrentPage *CredentialsPageResponse Error error // contains filtered or unexported fields }
CredentialsPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageCredentialResponse or error that is returned from the api call(s)
type CredentialsPageOptions ¶
CredentialsPageOptions defines the query options for the api operation
type CredentialsPageResponse ¶
type CredentialsPageResponse struct { Credentials []PageCredentialResponse `json:"credentials"` End int `json:"end"` FirstPageURI string `json:"first_page_uri"` NextPageURI *string `json:"next_page_uri,omitempty"` Page int `json:"page"` PageSize int `json:"page_size"` PreviousPageURI *string `json:"previous_page_uri,omitempty"` Start int `json:"start"` URI string `json:"uri"` }
CredentialsPageResponse defines the response fields for the SIP credentials page
type CredentialsPaginator ¶
type CredentialsPaginator struct { Page *CredentialsPage Credentials []PageCredentialResponse // contains filtered or unexported fields }
CredentialsPaginator defines the fields for makings paginated api calls Credentials is an array of credentials that have been returned from all of the page calls
func (*CredentialsPaginator) CurrentPage ¶
func (p *CredentialsPaginator) CurrentPage() *CredentialsPageResponse
CurrentPage retrieves the results for the current page
func (*CredentialsPaginator) Error ¶
func (p *CredentialsPaginator) Error() error
Error retrieves the error returned from the page
func (*CredentialsPaginator) Next ¶
func (p *CredentialsPaginator) 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 (*CredentialsPaginator) NextWithContext ¶
func (p *CredentialsPaginator) 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 PageCredentialResponse ¶
type PageCredentialResponse struct { AccountSid string `json:"account_sid"` CredentialListSid string `json:"credential_list_sid"` DateCreated utils.RFC2822Time `json:"date_created"` DateUpdated *utils.RFC2822Time `json:"date_updated,omitempty"` Sid string `json:"sid"` Username string `json:"username"` }