function

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: 6 Imported by: 1

Documentation

Overview

Package function contains auto-generated files. DO NOT MODIFY

Package function contains auto-generated files. DO NOT MODIFY

Package function contains auto-generated files. DO NOT MODIFY

Package function 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 {
	Version  func(string) *version.Client
	Versions *versions.Client
	// contains filtered or unexported fields
}

Client for managing a specific function resource See https://www.twilio.com/docs/runtime/functions-assets-api/api/function for more details

func New

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

New creates a new instance of the function client

func (Client) Delete

func (c Client) Delete() error

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

func (Client) Fetch

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

Fetch retrieves a function resource See https://www.twilio.com/docs/runtime/functions-assets-api/api/function#fetch-a-function-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) (*FetchFunctionResponse, error)

FetchWithContext retrieves a function resource See https://www.twilio.com/docs/runtime/functions-assets-api/api/function#fetch-a-function-resource for more details

func (Client) Update

Update modifies a function resource See https://www.twilio.com/docs/runtime/functions-assets-api/api/function#update-a-function-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 *UpdateFunctionInput) (*UpdateFunctionResponse, error)

UpdateWithContext modifies a function resource See https://www.twilio.com/docs/runtime/functions-assets-api/api/function#update-a-function-resource for more details

type ClientProperties

type ClientProperties struct {
	ServiceSid string
	Sid        string
}

ClientProperties are the properties required to manage the function resources

type FetchFunctionResponse

type FetchFunctionResponse struct {
	AccountSid   string     `json:"account_sid"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	FriendlyName string     `json:"friendly_name"`
	ServiceSid   string     `json:"service_sid"`
	Sid          string     `json:"sid"`
	URL          string     `json:"url"`
}

FetchFunctionResponse defines the response fields for the retrieved function

type UpdateFunctionInput

type UpdateFunctionInput struct {
	FriendlyName string `validate:"required" form:"FriendlyName"`
}

UpdateFunctionInput defines input fields for updating a function resource

type UpdateFunctionResponse

type UpdateFunctionResponse struct {
	AccountSid   string     `json:"account_sid"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	FriendlyName string     `json:"friendly_name"`
	ServiceSid   string     `json:"service_sid"`
	Sid          string     `json:"sid"`
	URL          string     `json:"url"`
}

UpdateFunctionResponse defines the response fields for the updated function

Directories

Path Synopsis
Package version contains auto-generated files.
Package version contains auto-generated files.
content
Package content contains auto-generated files.
Package content contains auto-generated files.
Package versions contains auto-generated files.
Package versions contains auto-generated files.

Jump to

Keyboard shortcuts

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