credential

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package credential contains auto-generated files. DO NOT MODIFY

Package credential contains auto-generated files. DO NOT MODIFY

Package credential contains auto-generated files. DO NOT MODIFY

Package credential 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 a specific credential resource

func New

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

New creates a new instance of the credential client

func (Client) Delete

func (c Client) Delete() error

Delete removes a SIP credential from the account See https://www.twilio.com/docs/voice/sip/api/sip-credential-resource#delete-a-sip-credential-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) DeleteWithContext

func (c Client) DeleteWithContext(context context.Context) error

DeleteWithContext removes a SIP credential from the account See https://www.twilio.com/docs/voice/sip/api/sip-credential-resource#delete-a-sip-credential-resource for more details

func (Client) Fetch

func (c Client) Fetch() (*FetchCredentialResponse, error)

Fetch retrieves a SIP credential resource See https://www.twilio.com/docs/voice/sip/api/sip-credential-resource#fetch-a-sip-credential-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) FetchWithContext

func (c Client) FetchWithContext(context context.Context) (*FetchCredentialResponse, error)

FetchWithContext retrieves a SIP credential resource See https://www.twilio.com/docs/voice/sip/api/sip-credential-resource#fetch-a-sip-credential-resource for more details

func (Client) Update

Update modifies a SIP credential resource See https://www.twilio.com/docs/voice/sip/api/sip-credential-resource#update-a-sip-credential-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) UpdateWithContext

func (c Client) UpdateWithContext(context context.Context, input *UpdateCredentialInput) (*UpdateCredentialResponse, error)

UpdateWithContext modifies a SIP credential resource See https://www.twilio.com/docs/voice/sip/api/sip-credential-resource#update-a-sip-credential-resource for more details

type ClientProperties

type ClientProperties struct {
	AccountSid        string
	CredentialListSid string
	Sid               string
}

ClientProperties are the properties required to manage the credential resources

type FetchCredentialResponse

type FetchCredentialResponse 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"`
}

FetchCredentialResponse defines the response fields for retrieving a SIP credential

type UpdateCredentialInput

type UpdateCredentialInput struct {
	Password string `validate:"required" form:"Password"`
}

UpdateCredentialInput defines input fields for updating a SIP credential

type UpdateCredentialResponse

type UpdateCredentialResponse 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"`
}

UpdateCredentialResponse defines the response fields for the updated SIP credential

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL