tokens

package
v0.16.0 Latest Latest
Warning

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

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

Documentation

Overview

Package tokens contains auto-generated files. DO NOT MODIFY

Package tokens 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 token resources

func New

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

New creates a new instance of the tokens client

func (Client) Create

func (c Client) Create(input *CreateTokenInput) (*CreateTokenResponse, error)

Create generate an account token 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 *CreateTokenInput) (*CreateTokenResponse, error)

CreateWithContext generate an account token

type ClientProperties

type ClientProperties struct {
	AccountSid string
}

ClientProperties are the properties required to manage the tokens resources

type CreateIceServerResponse

type CreateIceServerResponse struct {
	Credential *string `json:"credential,omitempty"`
	URL        string  `json:"url"`
	URLs       string  `json:"urls"`
	Username   *string `json:"username,omitempty"`
}

type CreateTokenInput

type CreateTokenInput struct {
	Ttl *int `form:"Ttl,omitempty"`
}

CreateTokenInput defines the input fields for generating a token

type CreateTokenResponse

type CreateTokenResponse struct {
	AccountSid  string                    `json:"account_sid"`
	DateCreated utils.RFC2822Time         `json:"date_created"`
	DateUpdated *utils.RFC2822Time        `json:"date_updated,omitempty"`
	IceServers  []CreateIceServerResponse `json:"ice_servers"`
	Password    string                    `json:"password"`
	Ttl         string                    `json:"ttl"`
	Username    string                    `json:"username"`
}

CreateTokenResponse defines the response fields for the generated token

Jump to

Keyboard shortcuts

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