Documentation
¶
Index ¶
- type DurableObjectService
- type Error
- type ErrorData
- type NamespaceListParams
- type NamespaceListResponseEnvelope
- type NamespaceListResponseEnvelopeErrors
- type NamespaceListResponseEnvelopeMessages
- type NamespaceListResponseEnvelopeResultInfo
- type NamespaceListResponseEnvelopeSuccess
- type NamespaceObjectListParams
- type NamespaceObjectService
- func (r *NamespaceObjectService) List(ctx context.Context, id string, params NamespaceObjectListParams, ...) (res *shared.CursorLimitPagination[WorkersObject], err error)
- func (r *NamespaceObjectService) ListAutoPaging(ctx context.Context, id string, params NamespaceObjectListParams, ...) *shared.CursorLimitPaginationAutoPager[WorkersObject]
- type NamespaceService
- type WorkersNamespace
- type WorkersObject
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 NamespaceListParams ¶
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
)
func (NamespaceListResponseEnvelopeSuccess) IsKnown ¶
func (r NamespaceListResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *NamespaceObjectService) List(ctx context.Context, id string, params NamespaceObjectListParams, opts ...option.RequestOption) (res *shared.CursorLimitPagination[WorkersObject], err error)
Returns the Durable Objects in a given namespace.
func (*NamespaceObjectService) ListAutoPaging ¶
func (r *NamespaceObjectService) ListAutoPaging(ctx context.Context, id string, params NamespaceObjectListParams, opts ...option.RequestOption) *shared.CursorLimitPaginationAutoPager[WorkersObject]
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 ¶
func (r *NamespaceService) List(ctx context.Context, query NamespaceListParams, opts ...option.RequestOption) (res *[]WorkersNamespace, err error)
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)