document

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package document contains auto-generated files. DO NOT MODIFY

Package document contains auto-generated files. DO NOT MODIFY

Package document contains auto-generated files. DO NOT MODIFY

Package document 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 {
	Permission  func(string) *permission.Client
	Permissions *permissions.Client
	// contains filtered or unexported fields
}

Client for managing a specific document resource See https://www.twilio.com/docs/sync/api/document-resource for more details

func New

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

New creates a new instance of the document client

func (Client) Delete

func (c Client) Delete() error

Delete removes a document resource from the account See https://www.twilio.com/docs/sync/api/document-resource#delete-a-document-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 document resource from the account See https://www.twilio.com/docs/sync/api/document-resource#delete-a-document-resource for more details

func (Client) Fetch

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

Fetch retrieves an document resource See https://www.twilio.com/docs/sync/api/document-resource#fetch-a-document-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) (*FetchDocumentResponse, error)

FetchWithContext retrieves an document resource See https://www.twilio.com/docs/sync/api/document-resource#fetch-a-document-resource for more details

func (Client) Update

Update modifies a document resource See https://www.twilio.com/docs/sync/api/document-resource#update-a-document-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 *UpdateDocumentInput) (*UpdateDocumentResponse, error)

UpdateWithContext modifies a document resource See https://www.twilio.com/docs/sync/api/document-resource#update-a-document-resource for more details

type ClientProperties

type ClientProperties struct {
	ServiceSid string
	Sid        string
}

ClientProperties are the properties required to manage the document resources

type FetchDocumentResponse

type FetchDocumentResponse struct {
	AccountSid  string                 `json:"account_sid"`
	CreatedBy   string                 `json:"created_by"`
	Data        map[string]interface{} `json:"data"`
	DateCreated time.Time              `json:"date_created"`
	DateExpires *time.Time             `json:"date_expires,omitempty"`
	DateUpdated *time.Time             `json:"date_updated,omitempty"`
	Revision    string                 `json:"revision"`
	ServiceSid  string                 `json:"service_Sid"`
	Sid         string                 `json:"sid"`
	URL         string                 `json:"url"`
	UniqueName  *string                `json:"unique_name,omitempty"`
}

FetchDocumentResponse defines the response fields for the retrieved document

type UpdateDocumentInput

type UpdateDocumentInput struct {
	Data *string `form:"Data,omitempty"`
	Ttl  *int    `form:"Ttl,omitempty"`
}

UpdateDocumentInput defines input fields for updating a document resource

type UpdateDocumentResponse

type UpdateDocumentResponse struct {
	AccountSid  string                 `json:"account_sid"`
	CreatedBy   string                 `json:"created_by"`
	Data        map[string]interface{} `json:"data"`
	DateCreated time.Time              `json:"date_created"`
	DateExpires *time.Time             `json:"date_expires,omitempty"`
	DateUpdated *time.Time             `json:"date_updated,omitempty"`
	Revision    string                 `json:"revision"`
	ServiceSid  string                 `json:"service_Sid"`
	Sid         string                 `json:"sid"`
	URL         string                 `json:"url"`
	UniqueName  *string                `json:"unique_name,omitempty"`
}

UpdateDocumentResponse defines the response fields for the updated document

Directories

Path Synopsis
Package permission contains auto-generated files.
Package permission contains auto-generated files.
Package permissions contains auto-generated files.
Package permissions contains auto-generated files.

Jump to

Keyboard shortcuts

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