durable_objects

package
v2.0.0-beta.9 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DurableObjectService

type DurableObjectService struct {
	Options    []option.RequestOption
	Namespaces *NamespaceService
}

DurableObjectService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDurableObjectService method instead.

func NewDurableObjectService

func NewDurableObjectService(opts ...option.RequestOption) (r *DurableObjectService)

NewDurableObjectService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type Error

type Error = apierror.Error

type NamespaceListParams

type NamespaceListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type NamespaceListResponseEnvelope

type NamespaceListResponseEnvelope struct {
	Errors   []NamespaceListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []NamespaceListResponseEnvelopeMessages `json:"messages,required"`
	Result   []WorkersNamespace                      `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    NamespaceListResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo NamespaceListResponseEnvelopeResultInfo `json:"result_info"`
	JSON       namespaceListResponseEnvelopeJSON       `json:"-"`
}

func (*NamespaceListResponseEnvelope) UnmarshalJSON

func (r *NamespaceListResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type NamespaceListResponseEnvelopeErrors

type NamespaceListResponseEnvelopeErrors struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    namespaceListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*NamespaceListResponseEnvelopeErrors) UnmarshalJSON

func (r *NamespaceListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type NamespaceListResponseEnvelopeMessages

type NamespaceListResponseEnvelopeMessages struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    namespaceListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*NamespaceListResponseEnvelopeMessages) UnmarshalJSON

func (r *NamespaceListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type NamespaceListResponseEnvelopeResultInfo

type NamespaceListResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service
	Count float64 `json:"count"`
	// Current page within paginated list of results
	Page float64 `json:"page"`
	// Number of results per page of results
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters
	TotalCount float64                                     `json:"total_count"`
	JSON       namespaceListResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*NamespaceListResponseEnvelopeResultInfo) UnmarshalJSON

func (r *NamespaceListResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)

type NamespaceListResponseEnvelopeSuccess

type NamespaceListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	NamespaceListResponseEnvelopeSuccessTrue NamespaceListResponseEnvelopeSuccess = true
)

type NamespaceObjectListParams

type NamespaceObjectListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Opaque token indicating the position from which to continue when requesting the
	// next set of records. A valid value for the cursor can be obtained from the
	// cursors object in the result_info structure.
	Cursor param.Field[string] `query:"cursor"`
	// The number of objects to return. The cursor attribute may be used to iterate
	// over the next batch of objects if there are more than the limit.
	Limit param.Field[float64] `query:"limit"`
}

func (NamespaceObjectListParams) URLQuery

func (r NamespaceObjectListParams) URLQuery() (v url.Values)

URLQuery serializes NamespaceObjectListParams's query parameters as `url.Values`.

type NamespaceObjectService

type NamespaceObjectService struct {
	Options []option.RequestOption
}

NamespaceObjectService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNamespaceObjectService method instead.

func NewNamespaceObjectService

func NewNamespaceObjectService(opts ...option.RequestOption) (r *NamespaceObjectService)

NewNamespaceObjectService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*NamespaceObjectService) List

Returns the Durable Objects in a given namespace.

func (*NamespaceObjectService) ListAutoPaging

Returns the Durable Objects in a given namespace.

type NamespaceService

type NamespaceService struct {
	Options []option.RequestOption
	Objects *NamespaceObjectService
}

NamespaceService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNamespaceService method instead.

func NewNamespaceService

func NewNamespaceService(opts ...option.RequestOption) (r *NamespaceService)

NewNamespaceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*NamespaceService) List

Returns the Durable Object namespaces owned by an account.

type WorkersNamespace

type WorkersNamespace struct {
	ID     interface{}          `json:"id"`
	Class  interface{}          `json:"class"`
	Name   interface{}          `json:"name"`
	Script interface{}          `json:"script"`
	JSON   workersNamespaceJSON `json:"-"`
}

func (*WorkersNamespace) UnmarshalJSON

func (r *WorkersNamespace) UnmarshalJSON(data []byte) (err error)

type WorkersObject

type WorkersObject struct {
	// ID of the Durable Object.
	ID string `json:"id"`
	// Whether the Durable Object has stored data.
	HasStoredData bool              `json:"hasStoredData"`
	JSON          workersObjectJSON `json:"-"`
}

func (*WorkersObject) UnmarshalJSON

func (r *WorkersObject) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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