workers_for_platforms

package
v2.0.0-beta.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DispatchNamespaceDeleteParams

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

type DispatchNamespaceDeleteResponse

type DispatchNamespaceDeleteResponse = interface{}

type DispatchNamespaceDeleteResponseEnvelope

type DispatchNamespaceDeleteResponseEnvelope struct {
	Errors   []DispatchNamespaceDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DispatchNamespaceDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   DispatchNamespaceDeleteResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success DispatchNamespaceDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    dispatchNamespaceDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceDeleteResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceDeleteResponseEnvelopeErrors

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

func (*DispatchNamespaceDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type DispatchNamespaceDeleteResponseEnvelopeMessages

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

func (*DispatchNamespaceDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type DispatchNamespaceDeleteResponseEnvelopeSuccess

type DispatchNamespaceDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceDeleteResponseEnvelopeSuccessTrue DispatchNamespaceDeleteResponseEnvelopeSuccess = true
)

type DispatchNamespaceGetParams

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

type DispatchNamespaceGetResponse

type DispatchNamespaceGetResponse struct {
	// Identifier
	CreatedBy string `json:"created_by"`
	// When the script was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Identifier
	ModifiedBy string `json:"modified_by"`
	// When the script was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// API Resource UUID tag.
	NamespaceID string `json:"namespace_id"`
	// Name of the Workers for Platforms dispatch namespace.
	NamespaceName string                           `json:"namespace_name"`
	JSON          dispatchNamespaceGetResponseJSON `json:"-"`
}

func (*DispatchNamespaceGetResponse) UnmarshalJSON

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

type DispatchNamespaceGetResponseEnvelope

type DispatchNamespaceGetResponseEnvelope struct {
	Errors   []DispatchNamespaceGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DispatchNamespaceGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DispatchNamespaceGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success DispatchNamespaceGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    dispatchNamespaceGetResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceGetResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceGetResponseEnvelopeErrors

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

func (*DispatchNamespaceGetResponseEnvelopeErrors) UnmarshalJSON

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

type DispatchNamespaceGetResponseEnvelopeMessages

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

func (*DispatchNamespaceGetResponseEnvelopeMessages) UnmarshalJSON

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

type DispatchNamespaceGetResponseEnvelopeSuccess

type DispatchNamespaceGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceGetResponseEnvelopeSuccessTrue DispatchNamespaceGetResponseEnvelopeSuccess = true
)

type DispatchNamespaceListParams

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

type DispatchNamespaceListResponse

type DispatchNamespaceListResponse struct {
	// Identifier
	CreatedBy string `json:"created_by"`
	// When the script was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Identifier
	ModifiedBy string `json:"modified_by"`
	// When the script was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// API Resource UUID tag.
	NamespaceID string `json:"namespace_id"`
	// Name of the Workers for Platforms dispatch namespace.
	NamespaceName string                            `json:"namespace_name"`
	JSON          dispatchNamespaceListResponseJSON `json:"-"`
}

func (*DispatchNamespaceListResponse) UnmarshalJSON

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

type DispatchNamespaceListResponseEnvelope

type DispatchNamespaceListResponseEnvelope struct {
	Errors   []DispatchNamespaceListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DispatchNamespaceListResponseEnvelopeMessages `json:"messages,required"`
	Result   []DispatchNamespaceListResponse                 `json:"result,required"`
	// Whether the API call was successful
	Success DispatchNamespaceListResponseEnvelopeSuccess `json:"success,required"`
	JSON    dispatchNamespaceListResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceListResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceListResponseEnvelopeErrors

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

func (*DispatchNamespaceListResponseEnvelopeErrors) UnmarshalJSON

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

type DispatchNamespaceListResponseEnvelopeMessages

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

func (*DispatchNamespaceListResponseEnvelopeMessages) UnmarshalJSON

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

type DispatchNamespaceListResponseEnvelopeSuccess

type DispatchNamespaceListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceListResponseEnvelopeSuccessTrue DispatchNamespaceListResponseEnvelopeSuccess = true
)

type DispatchNamespaceNewParams

type DispatchNamespaceNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// The name of the dispatch namespace
	Name param.Field[string] `json:"name"`
}

func (DispatchNamespaceNewParams) MarshalJSON

func (r DispatchNamespaceNewParams) MarshalJSON() (data []byte, err error)

type DispatchNamespaceNewResponse

type DispatchNamespaceNewResponse struct {
	// Identifier
	CreatedBy string `json:"created_by"`
	// When the script was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Identifier
	ModifiedBy string `json:"modified_by"`
	// When the script was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// API Resource UUID tag.
	NamespaceID string `json:"namespace_id"`
	// Name of the Workers for Platforms dispatch namespace.
	NamespaceName string                           `json:"namespace_name"`
	JSON          dispatchNamespaceNewResponseJSON `json:"-"`
}

func (*DispatchNamespaceNewResponse) UnmarshalJSON

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

type DispatchNamespaceNewResponseEnvelope

type DispatchNamespaceNewResponseEnvelope struct {
	Errors   []DispatchNamespaceNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DispatchNamespaceNewResponseEnvelopeMessages `json:"messages,required"`
	Result   DispatchNamespaceNewResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success DispatchNamespaceNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    dispatchNamespaceNewResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceNewResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceNewResponseEnvelopeErrors

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

func (*DispatchNamespaceNewResponseEnvelopeErrors) UnmarshalJSON

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

type DispatchNamespaceNewResponseEnvelopeMessages

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

func (*DispatchNamespaceNewResponseEnvelopeMessages) UnmarshalJSON

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

type DispatchNamespaceNewResponseEnvelopeSuccess

type DispatchNamespaceNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceNewResponseEnvelopeSuccessTrue DispatchNamespaceNewResponseEnvelopeSuccess = true
)

type DispatchNamespaceScriptContentBindingGetParams

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

type DispatchNamespaceScriptContentBindingGetResponseWorkersD1Binding

type DispatchNamespaceScriptContentBindingGetResponseWorkersD1Binding struct {
	// ID of the D1 database to bind to
	ID string `json:"id,required"`
	// A JavaScript variable name for the binding.
	Binding string `json:"binding,required"`
	// The name of the D1 database associated with the 'id' provided.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentBindingGetResponseWorkersD1BindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentBindingGetResponseWorkersD1BindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentBindingGetResponseWorkersD1Binding) UnmarshalJSON

type DispatchNamespaceScriptContentBindingGetResponseWorkersD1BindingType

type DispatchNamespaceScriptContentBindingGetResponseWorkersD1BindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentBindingGetResponseWorkersD1BindingTypeD1 DispatchNamespaceScriptContentBindingGetResponseWorkersD1BindingType = "d1"
)

type DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBinding

type DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace to bind to
	Namespace string `json:"namespace,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingType `json:"type,required"`
	// Outbound worker
	Outbound DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingOutbound `json:"outbound"`
	JSON     dispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingJSON     `json:"-"`
}

func (*DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBinding) UnmarshalJSON

type DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingOutbound

type DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingOutbound struct {
	// Pass information from the Dispatch Worker to the Outbound Worker through the
	// parameters
	Params []string `json:"params"`
	// Outbound worker
	Worker DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingOutboundWorker `json:"worker"`
	JSON   dispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingOutboundJSON   `json:"-"`
}

Outbound worker

func (*DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingOutbound) UnmarshalJSON

type DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingOutboundWorker

type DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingOutboundWorker struct {
	// Environment of the outbound worker
	Environment string `json:"environment"`
	// Name of the outbound worker
	Service string                                                                                            `json:"service"`
	JSON    dispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingOutboundWorkerJSON `json:"-"`
}

Outbound worker

func (*DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingOutboundWorker) UnmarshalJSON

type DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingType

type DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingTypeDispatchNamespace DispatchNamespaceScriptContentBindingGetResponseWorkersDispatchNamespaceBindingType = "dispatch_namespace"
)

type DispatchNamespaceScriptContentBindingGetResponseWorkersDoBinding

type DispatchNamespaceScriptContentBindingGetResponseWorkersDoBinding struct {
	// The exported class name of the Durable Object
	ClassName string `json:"class_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentBindingGetResponseWorkersDoBindingType `json:"type,required"`
	// The environment of the script_name to bind to
	Environment string `json:"environment"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id"`
	// The script where the Durable Object is defined, if it is external to this Worker
	ScriptName string                                                               `json:"script_name"`
	JSON       dispatchNamespaceScriptContentBindingGetResponseWorkersDoBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentBindingGetResponseWorkersDoBinding) UnmarshalJSON

type DispatchNamespaceScriptContentBindingGetResponseWorkersDoBindingType

type DispatchNamespaceScriptContentBindingGetResponseWorkersDoBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentBindingGetResponseWorkersDoBindingTypeDurableObjectNamespace DispatchNamespaceScriptContentBindingGetResponseWorkersDoBindingType = "durable_object_namespace"
)

type DispatchNamespaceScriptContentBindingGetResponseWorkersKVNamespaceBinding

type DispatchNamespaceScriptContentBindingGetResponseWorkersKVNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentBindingGetResponseWorkersKVNamespaceBindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentBindingGetResponseWorkersKVNamespaceBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentBindingGetResponseWorkersKVNamespaceBinding) UnmarshalJSON

type DispatchNamespaceScriptContentBindingGetResponseWorkersKVNamespaceBindingType

type DispatchNamespaceScriptContentBindingGetResponseWorkersKVNamespaceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentBindingGetResponseWorkersKVNamespaceBindingTypeKVNamespace DispatchNamespaceScriptContentBindingGetResponseWorkersKVNamespaceBindingType = "kv_namespace"
)

type DispatchNamespaceScriptContentBindingGetResponseWorkersMTLSCertBinding

type DispatchNamespaceScriptContentBindingGetResponseWorkersMTLSCertBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentBindingGetResponseWorkersMTLSCertBindingType `json:"type,required"`
	// ID of the certificate to bind to
	CertificateID string                                                                     `json:"certificate_id"`
	JSON          dispatchNamespaceScriptContentBindingGetResponseWorkersMTLSCertBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentBindingGetResponseWorkersMTLSCertBinding) UnmarshalJSON

type DispatchNamespaceScriptContentBindingGetResponseWorkersMTLSCertBindingType

type DispatchNamespaceScriptContentBindingGetResponseWorkersMTLSCertBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentBindingGetResponseWorkersMTLSCertBindingTypeMTLSCertificate DispatchNamespaceScriptContentBindingGetResponseWorkersMTLSCertBindingType = "mtls_certificate"
)

type DispatchNamespaceScriptContentBindingGetResponseWorkersQueueBinding

type DispatchNamespaceScriptContentBindingGetResponseWorkersQueueBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of the Queue to bind to
	QueueName string `json:"queue_name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentBindingGetResponseWorkersQueueBindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentBindingGetResponseWorkersQueueBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentBindingGetResponseWorkersQueueBinding) UnmarshalJSON

type DispatchNamespaceScriptContentBindingGetResponseWorkersQueueBindingType

type DispatchNamespaceScriptContentBindingGetResponseWorkersQueueBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentBindingGetResponseWorkersQueueBindingTypeQueue DispatchNamespaceScriptContentBindingGetResponseWorkersQueueBindingType = "queue"
)

type DispatchNamespaceScriptContentBindingGetResponseWorkersR2Binding

type DispatchNamespaceScriptContentBindingGetResponseWorkersR2Binding struct {
	// R2 bucket to bind to
	BucketName string `json:"bucket_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentBindingGetResponseWorkersR2BindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentBindingGetResponseWorkersR2BindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentBindingGetResponseWorkersR2Binding) UnmarshalJSON

type DispatchNamespaceScriptContentBindingGetResponseWorkersR2BindingType

type DispatchNamespaceScriptContentBindingGetResponseWorkersR2BindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentBindingGetResponseWorkersR2BindingTypeR2Bucket DispatchNamespaceScriptContentBindingGetResponseWorkersR2BindingType = "r2_bucket"
)

type DispatchNamespaceScriptContentBindingGetResponseWorkersServiceBinding

type DispatchNamespaceScriptContentBindingGetResponseWorkersServiceBinding struct {
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of Worker to bind to
	Service string `json:"service,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentBindingGetResponseWorkersServiceBindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentBindingGetResponseWorkersServiceBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentBindingGetResponseWorkersServiceBinding) UnmarshalJSON

type DispatchNamespaceScriptContentBindingGetResponseWorkersServiceBindingType

type DispatchNamespaceScriptContentBindingGetResponseWorkersServiceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentBindingGetResponseWorkersServiceBindingTypeService DispatchNamespaceScriptContentBindingGetResponseWorkersServiceBindingType = "service"
)

type DispatchNamespaceScriptContentBindingService

type DispatchNamespaceScriptContentBindingService struct {
	Options []option.RequestOption
}

DispatchNamespaceScriptContentBindingService 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 NewDispatchNamespaceScriptContentBindingService method instead.

func NewDispatchNamespaceScriptContentBindingService

func NewDispatchNamespaceScriptContentBindingService(opts ...option.RequestOption) (r *DispatchNamespaceScriptContentBindingService)

NewDispatchNamespaceScriptContentBindingService 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 (*DispatchNamespaceScriptContentBindingService) Get

Fetch script bindings from a script uploaded to a Workers for Platforms namespace.

type DispatchNamespaceScriptContentScriptGetParams

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

type DispatchNamespaceScriptContentScriptService

type DispatchNamespaceScriptContentScriptService struct {
	Options []option.RequestOption
}

DispatchNamespaceScriptContentScriptService 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 NewDispatchNamespaceScriptContentScriptService method instead.

func NewDispatchNamespaceScriptContentScriptService

func NewDispatchNamespaceScriptContentScriptService(opts ...option.RequestOption) (r *DispatchNamespaceScriptContentScriptService)

NewDispatchNamespaceScriptContentScriptService 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 (*DispatchNamespaceScriptContentScriptService) Get

Fetch script content from a script uploaded to a Workers for Platforms namespace.

func (*DispatchNamespaceScriptContentScriptService) Update

Put script content for a script uploaded to a Workers for Platforms namespace.

type DispatchNamespaceScriptContentScriptUpdateParams

type DispatchNamespaceScriptContentScriptUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// A module comprising a Worker script, often a javascript file. Multiple modules
	// may be provided as separate named parts, but at least one module must be
	// present. This should be referenced either in the metadata as `main_module`
	// (esm)/`body_part` (service worker) or as a header `CF-WORKER-MAIN-MODULE-PART`
	// (esm) /`CF-WORKER-BODY-PART` (service worker) by part name.
	AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"`
	// JSON encoded metadata about the uploaded parts and Worker configuration.
	Metadata               param.Field[DispatchNamespaceScriptContentScriptUpdateParamsMetadata] `json:"metadata"`
	CfWorkerBodyPart       param.Field[string]                                                   `header:"CF-WORKER-BODY-PART"`
	CfWorkerMainModulePart param.Field[string]                                                   `header:"CF-WORKER-MAIN-MODULE-PART"`
}

func (DispatchNamespaceScriptContentScriptUpdateParams) MarshalMultipart

func (r DispatchNamespaceScriptContentScriptUpdateParams) MarshalMultipart() (data []byte, contentType string, err error)

type DispatchNamespaceScriptContentScriptUpdateParamsMetadata

type DispatchNamespaceScriptContentScriptUpdateParamsMetadata struct {
	// Name of the part in the multipart request that contains the script (e.g. the
	// file adding a listener to the `fetch` event). Indicates a
	// `service worker syntax` Worker.
	BodyPart param.Field[string] `json:"body_part"`
	// Name of the part in the multipart request that contains the main module (e.g.
	// the file exporting a `fetch` handler). Indicates a `module syntax` Worker.
	MainModule param.Field[string] `json:"main_module"`
}

JSON encoded metadata about the uploaded parts and Worker configuration.

func (DispatchNamespaceScriptContentScriptUpdateParamsMetadata) MarshalJSON

type DispatchNamespaceScriptContentScriptUpdateResponseEnvelope

type DispatchNamespaceScriptContentScriptUpdateResponseEnvelope struct {
	Errors   []DispatchNamespaceScriptContentScriptUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DispatchNamespaceScriptContentScriptUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   workers.WorkersScript                                                `json:"result,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptContentScriptUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    dispatchNamespaceScriptContentScriptUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceScriptContentScriptUpdateResponseEnvelope) UnmarshalJSON

type DispatchNamespaceScriptContentScriptUpdateResponseEnvelopeErrors

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

func (*DispatchNamespaceScriptContentScriptUpdateResponseEnvelopeErrors) UnmarshalJSON

type DispatchNamespaceScriptContentScriptUpdateResponseEnvelopeMessages

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

func (*DispatchNamespaceScriptContentScriptUpdateResponseEnvelopeMessages) UnmarshalJSON

type DispatchNamespaceScriptContentScriptUpdateResponseEnvelopeSuccess

type DispatchNamespaceScriptContentScriptUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptContentScriptUpdateResponseEnvelopeSuccessTrue DispatchNamespaceScriptContentScriptUpdateResponseEnvelopeSuccess = true
)

type DispatchNamespaceScriptContentService

DispatchNamespaceScriptContentService 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 NewDispatchNamespaceScriptContentService method instead.

func NewDispatchNamespaceScriptContentService

func NewDispatchNamespaceScriptContentService(opts ...option.RequestOption) (r *DispatchNamespaceScriptContentService)

NewDispatchNamespaceScriptContentService 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 DispatchNamespaceScriptContentSettingEditParams

type DispatchNamespaceScriptContentSettingEditParams struct {
	// Identifier
	AccountID param.Field[string]                                                   `path:"account_id,required"`
	Errors    param.Field[[]DispatchNamespaceScriptContentSettingEditParamsError]   `json:"errors,required"`
	Messages  param.Field[[]DispatchNamespaceScriptContentSettingEditParamsMessage] `json:"messages,required"`
	Result    param.Field[DispatchNamespaceScriptContentSettingEditParamsResult]    `json:"result,required"`
	// Whether the API call was successful
	Success param.Field[DispatchNamespaceScriptContentSettingEditParamsSuccess] `json:"success,required"`
}

func (DispatchNamespaceScriptContentSettingEditParams) MarshalJSON

func (r DispatchNamespaceScriptContentSettingEditParams) MarshalJSON() (data []byte, err error)

type DispatchNamespaceScriptContentSettingEditParamsError

type DispatchNamespaceScriptContentSettingEditParamsError struct {
	Code    param.Field[int64]  `json:"code,required"`
	Message param.Field[string] `json:"message,required"`
}

func (DispatchNamespaceScriptContentSettingEditParamsError) MarshalJSON

func (r DispatchNamespaceScriptContentSettingEditParamsError) MarshalJSON() (data []byte, err error)

type DispatchNamespaceScriptContentSettingEditParamsMessage

type DispatchNamespaceScriptContentSettingEditParamsMessage struct {
	Code    param.Field[int64]  `json:"code,required"`
	Message param.Field[string] `json:"message,required"`
}

func (DispatchNamespaceScriptContentSettingEditParamsMessage) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResult

type DispatchNamespaceScriptContentSettingEditParamsResult struct {
	// List of bindings attached to this Worker
	Bindings param.Field[[]DispatchNamespaceScriptContentSettingEditParamsResultBinding] `json:"bindings"`
	// Opt your Worker into changes after this date
	CompatibilityDate param.Field[string] `json:"compatibility_date"`
	// Opt your Worker into specific changes
	CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"`
	// Whether Logpush is turned on for the Worker.
	Logpush param.Field[bool] `json:"logpush"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations param.Field[DispatchNamespaceScriptContentSettingEditParamsResultMigrations] `json:"migrations"`
	Placement  param.Field[DispatchNamespaceScriptContentSettingEditParamsResultPlacement]  `json:"placement"`
	// Tags to help you manage your Workers
	Tags param.Field[[]string] `json:"tags"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers param.Field[[]DispatchNamespaceScriptContentSettingEditParamsResultTailConsumer] `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel param.Field[string] `json:"usage_model"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResult) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersD1Binding

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersD1Binding struct {
	// ID of the D1 database to bind to
	ID param.Field[string] `json:"id,required"`
	// The name of the D1 database associated with the 'id' provided.
	Name param.Field[string] `json:"name,required"`
	// The class of resource that the binding provides.
	Type param.Field[DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersD1BindingType] `json:"type,required"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersD1Binding) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersD1BindingType

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersD1BindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersD1BindingTypeD1 DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersD1BindingType = "d1"
)

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBinding

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBinding struct {
	// Namespace to bind to
	Namespace param.Field[string] `json:"namespace,required"`
	// The class of resource that the binding provides.
	Type param.Field[DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingType] `json:"type,required"`
	// Outbound worker
	Outbound param.Field[DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutbound] `json:"outbound"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBinding) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutbound

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutbound struct {
	// Pass information from the Dispatch Worker to the Outbound Worker through the
	// parameters
	Params param.Field[[]string] `json:"params"`
	// Outbound worker
	Worker param.Field[DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker] `json:"worker"`
}

Outbound worker

func (DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutbound) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker struct {
	// Environment of the outbound worker
	Environment param.Field[string] `json:"environment"`
	// Name of the outbound worker
	Service param.Field[string] `json:"service"`
}

Outbound worker

func (DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingType

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingTypeDispatchNamespace DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingType = "dispatch_namespace"
)

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDoBinding

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDoBinding struct {
	// The exported class name of the Durable Object
	ClassName param.Field[string] `json:"class_name,required"`
	// The class of resource that the binding provides.
	Type param.Field[DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDoBindingType] `json:"type,required"`
	// The environment of the script_name to bind to
	Environment param.Field[string] `json:"environment"`
	// The script where the Durable Object is defined, if it is external to this Worker
	ScriptName param.Field[string] `json:"script_name"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDoBinding) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDoBindingType

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDoBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDoBindingTypeDurableObjectNamespace DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersDoBindingType = "durable_object_namespace"
)

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersKVNamespaceBinding

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersKVNamespaceBinding struct {
	// The class of resource that the binding provides.
	Type param.Field[DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersKVNamespaceBindingType] `json:"type,required"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersKVNamespaceBinding) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersKVNamespaceBindingType

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersKVNamespaceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersKVNamespaceBindingTypeKVNamespace DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersKVNamespaceBindingType = "kv_namespace"
)

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersMTLSCertBinding

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersMTLSCertBinding struct {
	// The class of resource that the binding provides.
	Type param.Field[DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersMTLSCertBindingType] `json:"type,required"`
	// ID of the certificate to bind to
	CertificateID param.Field[string] `json:"certificate_id"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersMTLSCertBinding) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersMTLSCertBindingType

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersMTLSCertBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersMTLSCertBindingTypeMTLSCertificate DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersMTLSCertBindingType = "mtls_certificate"
)

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersQueueBinding

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersQueueBinding struct {
	// Name of the Queue to bind to
	QueueName param.Field[string] `json:"queue_name,required"`
	// The class of resource that the binding provides.
	Type param.Field[DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersQueueBindingType] `json:"type,required"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersQueueBinding) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersQueueBindingType

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersQueueBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersQueueBindingTypeQueue DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersQueueBindingType = "queue"
)

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersR2Binding

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersR2Binding struct {
	// R2 bucket to bind to
	BucketName param.Field[string] `json:"bucket_name,required"`
	// The class of resource that the binding provides.
	Type param.Field[DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersR2BindingType] `json:"type,required"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersR2Binding) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersR2BindingType

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersR2BindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersR2BindingTypeR2Bucket DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersR2BindingType = "r2_bucket"
)

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersServiceBinding

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersServiceBinding struct {
	// Optional environment if the Worker utilizes one.
	Environment param.Field[string] `json:"environment,required"`
	// Name of Worker to bind to
	Service param.Field[string] `json:"service,required"`
	// The class of resource that the binding provides.
	Type param.Field[DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersServiceBindingType] `json:"type,required"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersServiceBinding) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersServiceBindingType

type DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersServiceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersServiceBindingTypeService DispatchNamespaceScriptContentSettingEditParamsResultBindingsWorkersServiceBindingType = "service"
)

type DispatchNamespaceScriptContentSettingEditParamsResultMigrations

type DispatchNamespaceScriptContentSettingEditParamsResultMigrations interface {
	// contains filtered or unexported methods
}

Migrations to apply for Durable Objects associated with this Worker.

Satisfied by workers_for_platforms.DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrations, workers_for_platforms.DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrations.

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrations

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrations struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses param.Field[[]string] `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses param.Field[[]string] `json:"new_classes"`
	// Tag to set as the latest migration tag.
	NewTag param.Field[string] `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag param.Field[string] `json:"old_tag"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses param.Field[[]DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsRenamedClass] `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses param.Field[[]DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsTransferredClass] `json:"transferred_classes"`
}

A single set of migrations to apply.

func (DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrations) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsRenamedClass

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsRenamedClass struct {
	From param.Field[string] `json:"from"`
	To   param.Field[string] `json:"to"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsRenamedClass) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsTransferredClass

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsTransferredClass struct {
	From       param.Field[string] `json:"from"`
	FromScript param.Field[string] `json:"from_script"`
	To         param.Field[string] `json:"to"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsTransferredClass) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrations

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrations struct {
	// Tag to set as the latest migration tag.
	NewTag param.Field[string] `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag param.Field[string] `json:"old_tag"`
	// Migrations to apply in order.
	Steps param.Field[[]DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStep] `json:"steps"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrations) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStep

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStep struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses param.Field[[]string] `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses param.Field[[]string] `json:"new_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses param.Field[[]DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass] `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses param.Field[[]DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass] `json:"transferred_classes"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStep) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass struct {
	From param.Field[string] `json:"from"`
	To   param.Field[string] `json:"to"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass

type DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass struct {
	From       param.Field[string] `json:"from"`
	FromScript param.Field[string] `json:"from_script"`
	To         param.Field[string] `json:"to"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultPlacement

type DispatchNamespaceScriptContentSettingEditParamsResultPlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	// Only `"smart"` is currently supported
	Mode param.Field[DispatchNamespaceScriptContentSettingEditParamsResultPlacementMode] `json:"mode"`
}

func (DispatchNamespaceScriptContentSettingEditParamsResultPlacement) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsResultPlacementMode

type DispatchNamespaceScriptContentSettingEditParamsResultPlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported

const (
	DispatchNamespaceScriptContentSettingEditParamsResultPlacementModeSmart DispatchNamespaceScriptContentSettingEditParamsResultPlacementMode = "smart"
)

type DispatchNamespaceScriptContentSettingEditParamsResultTailConsumer

type DispatchNamespaceScriptContentSettingEditParamsResultTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service param.Field[string] `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment param.Field[string] `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace param.Field[string] `json:"namespace"`
}

A reference to a script that will consume logs from the attached Worker.

func (DispatchNamespaceScriptContentSettingEditParamsResultTailConsumer) MarshalJSON

type DispatchNamespaceScriptContentSettingEditParamsSuccess

type DispatchNamespaceScriptContentSettingEditParamsSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptContentSettingEditParamsSuccessTrue DispatchNamespaceScriptContentSettingEditParamsSuccess = true
)

type DispatchNamespaceScriptContentSettingEditResponse

type DispatchNamespaceScriptContentSettingEditResponse struct {
	// List of bindings attached to this Worker
	Bindings []DispatchNamespaceScriptContentSettingEditResponseBinding `json:"bindings"`
	// Opt your Worker into changes after this date
	CompatibilityDate string `json:"compatibility_date"`
	// Opt your Worker into specific changes
	CompatibilityFlags []string `json:"compatibility_flags"`
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations DispatchNamespaceScriptContentSettingEditResponseMigrations `json:"migrations"`
	Placement  DispatchNamespaceScriptContentSettingEditResponsePlacement  `json:"placement"`
	// Tags to help you manage your Workers
	Tags []string `json:"tags"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers []DispatchNamespaceScriptContentSettingEditResponseTailConsumer `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel string                                                `json:"usage_model"`
	JSON       dispatchNamespaceScriptContentSettingEditResponseJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponse) UnmarshalJSON

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

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersD1Binding

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersD1Binding struct {
	// ID of the D1 database to bind to
	ID string `json:"id,required"`
	// A JavaScript variable name for the binding.
	Binding string `json:"binding,required"`
	// The name of the D1 database associated with the 'id' provided.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersD1BindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentSettingEditResponseBindingsWorkersD1BindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersD1Binding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersD1BindingType

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersD1BindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersD1BindingTypeD1 DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersD1BindingType = "d1"
)

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBinding

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace to bind to
	Namespace string `json:"namespace,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingType `json:"type,required"`
	// Outbound worker
	Outbound DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound `json:"outbound"`
	JSON     dispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingJSON     `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound struct {
	// Pass information from the Dispatch Worker to the Outbound Worker through the
	// parameters
	Params []string `json:"params"`
	// Outbound worker
	Worker DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker `json:"worker"`
	JSON   dispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundJSON   `json:"-"`
}

Outbound worker

func (*DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker struct {
	// Environment of the outbound worker
	Environment string `json:"environment"`
	// Name of the outbound worker
	Service string                                                                                                     `json:"service"`
	JSON    dispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorkerJSON `json:"-"`
}

Outbound worker

func (*DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingType

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingTypeDispatchNamespace DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDispatchNamespaceBindingType = "dispatch_namespace"
)

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDoBinding

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDoBinding struct {
	// The exported class name of the Durable Object
	ClassName string `json:"class_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDoBindingType `json:"type,required"`
	// The environment of the script_name to bind to
	Environment string `json:"environment"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id"`
	// The script where the Durable Object is defined, if it is external to this Worker
	ScriptName string                                                                        `json:"script_name"`
	JSON       dispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDoBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDoBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDoBindingType

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDoBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDoBindingTypeDurableObjectNamespace DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersDoBindingType = "durable_object_namespace"
)

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersKVNamespaceBinding

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersKVNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersKVNamespaceBindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentSettingEditResponseBindingsWorkersKVNamespaceBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersKVNamespaceBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersKVNamespaceBindingType

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersKVNamespaceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersKVNamespaceBindingTypeKVNamespace DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersKVNamespaceBindingType = "kv_namespace"
)

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersMTLSCertBinding

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersMTLSCertBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersMTLSCertBindingType `json:"type,required"`
	// ID of the certificate to bind to
	CertificateID string                                                                              `json:"certificate_id"`
	JSON          dispatchNamespaceScriptContentSettingEditResponseBindingsWorkersMTLSCertBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersMTLSCertBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersMTLSCertBindingType

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersMTLSCertBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersMTLSCertBindingTypeMTLSCertificate DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersMTLSCertBindingType = "mtls_certificate"
)

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersQueueBinding

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersQueueBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of the Queue to bind to
	QueueName string `json:"queue_name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersQueueBindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentSettingEditResponseBindingsWorkersQueueBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersQueueBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersQueueBindingType

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersQueueBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersQueueBindingTypeQueue DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersQueueBindingType = "queue"
)

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersR2Binding

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersR2Binding struct {
	// R2 bucket to bind to
	BucketName string `json:"bucket_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersR2BindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentSettingEditResponseBindingsWorkersR2BindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersR2Binding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersR2BindingType

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersR2BindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersR2BindingTypeR2Bucket DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersR2BindingType = "r2_bucket"
)

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersServiceBinding

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersServiceBinding struct {
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of Worker to bind to
	Service string `json:"service,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersServiceBindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentSettingEditResponseBindingsWorkersServiceBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersServiceBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersServiceBindingType

type DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersServiceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersServiceBindingTypeService DispatchNamespaceScriptContentSettingEditResponseBindingsWorkersServiceBindingType = "service"
)

type DispatchNamespaceScriptContentSettingEditResponseEnvelope

type DispatchNamespaceScriptContentSettingEditResponseEnvelope struct {
	Errors   []DispatchNamespaceScriptContentSettingEditResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DispatchNamespaceScriptContentSettingEditResponseEnvelopeMessages `json:"messages,required"`
	Result   DispatchNamespaceScriptContentSettingEditResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptContentSettingEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    dispatchNamespaceScriptContentSettingEditResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseEnvelope) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseEnvelopeErrors

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

func (*DispatchNamespaceScriptContentSettingEditResponseEnvelopeErrors) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseEnvelopeMessages

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

func (*DispatchNamespaceScriptContentSettingEditResponseEnvelopeMessages) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseEnvelopeSuccess

type DispatchNamespaceScriptContentSettingEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptContentSettingEditResponseEnvelopeSuccessTrue DispatchNamespaceScriptContentSettingEditResponseEnvelopeSuccess = true
)

type DispatchNamespaceScriptContentSettingEditResponseMigrations

type DispatchNamespaceScriptContentSettingEditResponseMigrations interface {
	// contains filtered or unexported methods
}

Migrations to apply for Durable Objects associated with this Worker.

Union satisfied by workers_for_platforms.DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrations or workers_for_platforms.DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrations.

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrations

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrations struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass `json:"transferred_classes"`
	JSON               dispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrationsJSON               `json:"-"`
}

A single set of migrations to apply.

func (*DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrations) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass struct {
	From string                                                                                                 `json:"from"`
	To   string                                                                                                 `json:"to"`
	JSON dispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClassJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass struct {
	From       string                                                                                                     `json:"from"`
	FromScript string                                                                                                     `json:"from_script"`
	To         string                                                                                                     `json:"to"`
	JSON       dispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClassJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrations

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrations struct {
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// Migrations to apply in order.
	Steps []DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStep `json:"steps"`
	JSON  dispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsJSON   `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrations) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStep

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStep struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass `json:"transferred_classes"`
	JSON               dispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStepJSON                `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStep) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass struct {
	From string                                                                                                   `json:"from"`
	To   string                                                                                                   `json:"to"`
	JSON dispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClassJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass

type DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass struct {
	From       string                                                                                                       `json:"from"`
	FromScript string                                                                                                       `json:"from_script"`
	To         string                                                                                                       `json:"to"`
	JSON       dispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClassJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponsePlacement

type DispatchNamespaceScriptContentSettingEditResponsePlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	// Only `"smart"` is currently supported
	Mode DispatchNamespaceScriptContentSettingEditResponsePlacementMode `json:"mode"`
	JSON dispatchNamespaceScriptContentSettingEditResponsePlacementJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingEditResponsePlacement) UnmarshalJSON

type DispatchNamespaceScriptContentSettingEditResponsePlacementMode

type DispatchNamespaceScriptContentSettingEditResponsePlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported

const (
	DispatchNamespaceScriptContentSettingEditResponsePlacementModeSmart DispatchNamespaceScriptContentSettingEditResponsePlacementMode = "smart"
)

type DispatchNamespaceScriptContentSettingEditResponseTailConsumer

type DispatchNamespaceScriptContentSettingEditResponseTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service string `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace string                                                            `json:"namespace"`
	JSON      dispatchNamespaceScriptContentSettingEditResponseTailConsumerJSON `json:"-"`
}

A reference to a script that will consume logs from the attached Worker.

func (*DispatchNamespaceScriptContentSettingEditResponseTailConsumer) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetParams

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

type DispatchNamespaceScriptContentSettingGetResponse

type DispatchNamespaceScriptContentSettingGetResponse struct {
	// List of bindings attached to this Worker
	Bindings []DispatchNamespaceScriptContentSettingGetResponseBinding `json:"bindings"`
	// Opt your Worker into changes after this date
	CompatibilityDate string `json:"compatibility_date"`
	// Opt your Worker into specific changes
	CompatibilityFlags []string `json:"compatibility_flags"`
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations DispatchNamespaceScriptContentSettingGetResponseMigrations `json:"migrations"`
	Placement  DispatchNamespaceScriptContentSettingGetResponsePlacement  `json:"placement"`
	// Tags to help you manage your Workers
	Tags []string `json:"tags"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers []DispatchNamespaceScriptContentSettingGetResponseTailConsumer `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel string                                               `json:"usage_model"`
	JSON       dispatchNamespaceScriptContentSettingGetResponseJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponse) UnmarshalJSON

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

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersD1Binding

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersD1Binding struct {
	// ID of the D1 database to bind to
	ID string `json:"id,required"`
	// A JavaScript variable name for the binding.
	Binding string `json:"binding,required"`
	// The name of the D1 database associated with the 'id' provided.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersD1BindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentSettingGetResponseBindingsWorkersD1BindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersD1Binding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersD1BindingType

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersD1BindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersD1BindingTypeD1 DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersD1BindingType = "d1"
)

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBinding

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace to bind to
	Namespace string `json:"namespace,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingType `json:"type,required"`
	// Outbound worker
	Outbound DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound `json:"outbound"`
	JSON     dispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingJSON     `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound struct {
	// Pass information from the Dispatch Worker to the Outbound Worker through the
	// parameters
	Params []string `json:"params"`
	// Outbound worker
	Worker DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker `json:"worker"`
	JSON   dispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundJSON   `json:"-"`
}

Outbound worker

func (*DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker struct {
	// Environment of the outbound worker
	Environment string `json:"environment"`
	// Name of the outbound worker
	Service string                                                                                                    `json:"service"`
	JSON    dispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorkerJSON `json:"-"`
}

Outbound worker

func (*DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingType

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingTypeDispatchNamespace DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDispatchNamespaceBindingType = "dispatch_namespace"
)

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDoBinding

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDoBinding struct {
	// The exported class name of the Durable Object
	ClassName string `json:"class_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDoBindingType `json:"type,required"`
	// The environment of the script_name to bind to
	Environment string `json:"environment"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id"`
	// The script where the Durable Object is defined, if it is external to this Worker
	ScriptName string                                                                       `json:"script_name"`
	JSON       dispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDoBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDoBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDoBindingType

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDoBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDoBindingTypeDurableObjectNamespace DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersDoBindingType = "durable_object_namespace"
)

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersKVNamespaceBinding

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersKVNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersKVNamespaceBindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentSettingGetResponseBindingsWorkersKVNamespaceBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersKVNamespaceBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersKVNamespaceBindingType

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersKVNamespaceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersKVNamespaceBindingTypeKVNamespace DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersKVNamespaceBindingType = "kv_namespace"
)

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersMTLSCertBinding

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersMTLSCertBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersMTLSCertBindingType `json:"type,required"`
	// ID of the certificate to bind to
	CertificateID string                                                                             `json:"certificate_id"`
	JSON          dispatchNamespaceScriptContentSettingGetResponseBindingsWorkersMTLSCertBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersMTLSCertBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersMTLSCertBindingType

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersMTLSCertBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersMTLSCertBindingTypeMTLSCertificate DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersMTLSCertBindingType = "mtls_certificate"
)

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersQueueBinding

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersQueueBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of the Queue to bind to
	QueueName string `json:"queue_name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersQueueBindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentSettingGetResponseBindingsWorkersQueueBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersQueueBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersQueueBindingType

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersQueueBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersQueueBindingTypeQueue DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersQueueBindingType = "queue"
)

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersR2Binding

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersR2Binding struct {
	// R2 bucket to bind to
	BucketName string `json:"bucket_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersR2BindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentSettingGetResponseBindingsWorkersR2BindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersR2Binding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersR2BindingType

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersR2BindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersR2BindingTypeR2Bucket DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersR2BindingType = "r2_bucket"
)

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersServiceBinding

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersServiceBinding struct {
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of Worker to bind to
	Service string `json:"service,required"`
	// The class of resource that the binding provides.
	Type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersServiceBindingType `json:"type,required"`
	JSON dispatchNamespaceScriptContentSettingGetResponseBindingsWorkersServiceBindingJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersServiceBinding) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersServiceBindingType

type DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersServiceBindingType string

The class of resource that the binding provides.

const (
	DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersServiceBindingTypeService DispatchNamespaceScriptContentSettingGetResponseBindingsWorkersServiceBindingType = "service"
)

type DispatchNamespaceScriptContentSettingGetResponseEnvelope

type DispatchNamespaceScriptContentSettingGetResponseEnvelope struct {
	Errors   []DispatchNamespaceScriptContentSettingGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DispatchNamespaceScriptContentSettingGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DispatchNamespaceScriptContentSettingGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptContentSettingGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    dispatchNamespaceScriptContentSettingGetResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseEnvelope) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseEnvelopeErrors

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

func (*DispatchNamespaceScriptContentSettingGetResponseEnvelopeErrors) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseEnvelopeMessages

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

func (*DispatchNamespaceScriptContentSettingGetResponseEnvelopeMessages) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseEnvelopeSuccess

type DispatchNamespaceScriptContentSettingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptContentSettingGetResponseEnvelopeSuccessTrue DispatchNamespaceScriptContentSettingGetResponseEnvelopeSuccess = true
)

type DispatchNamespaceScriptContentSettingGetResponseMigrations

type DispatchNamespaceScriptContentSettingGetResponseMigrations interface {
	// contains filtered or unexported methods
}

Migrations to apply for Durable Objects associated with this Worker.

Union satisfied by workers_for_platforms.DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrations or workers_for_platforms.DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrations.

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrations

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrations struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass `json:"transferred_classes"`
	JSON               dispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrationsJSON               `json:"-"`
}

A single set of migrations to apply.

func (*DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrations) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass struct {
	From string                                                                                                `json:"from"`
	To   string                                                                                                `json:"to"`
	JSON dispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClassJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass struct {
	From       string                                                                                                    `json:"from"`
	FromScript string                                                                                                    `json:"from_script"`
	To         string                                                                                                    `json:"to"`
	JSON       dispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClassJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrations

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrations struct {
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// Migrations to apply in order.
	Steps []DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStep `json:"steps"`
	JSON  dispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsJSON   `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrations) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStep

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStep struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass `json:"transferred_classes"`
	JSON               dispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStepJSON                `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStep) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass struct {
	From string                                                                                                  `json:"from"`
	To   string                                                                                                  `json:"to"`
	JSON dispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClassJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass

type DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass struct {
	From       string                                                                                                      `json:"from"`
	FromScript string                                                                                                      `json:"from_script"`
	To         string                                                                                                      `json:"to"`
	JSON       dispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClassJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponsePlacement

type DispatchNamespaceScriptContentSettingGetResponsePlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	// Only `"smart"` is currently supported
	Mode DispatchNamespaceScriptContentSettingGetResponsePlacementMode `json:"mode"`
	JSON dispatchNamespaceScriptContentSettingGetResponsePlacementJSON `json:"-"`
}

func (*DispatchNamespaceScriptContentSettingGetResponsePlacement) UnmarshalJSON

type DispatchNamespaceScriptContentSettingGetResponsePlacementMode

type DispatchNamespaceScriptContentSettingGetResponsePlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported

const (
	DispatchNamespaceScriptContentSettingGetResponsePlacementModeSmart DispatchNamespaceScriptContentSettingGetResponsePlacementMode = "smart"
)

type DispatchNamespaceScriptContentSettingGetResponseTailConsumer

type DispatchNamespaceScriptContentSettingGetResponseTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service string `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace string                                                           `json:"namespace"`
	JSON      dispatchNamespaceScriptContentSettingGetResponseTailConsumerJSON `json:"-"`
}

A reference to a script that will consume logs from the attached Worker.

func (*DispatchNamespaceScriptContentSettingGetResponseTailConsumer) UnmarshalJSON

type DispatchNamespaceScriptContentSettingService

type DispatchNamespaceScriptContentSettingService struct {
	Options []option.RequestOption
}

DispatchNamespaceScriptContentSettingService 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 NewDispatchNamespaceScriptContentSettingService method instead.

func NewDispatchNamespaceScriptContentSettingService

func NewDispatchNamespaceScriptContentSettingService(opts ...option.RequestOption) (r *DispatchNamespaceScriptContentSettingService)

NewDispatchNamespaceScriptContentSettingService 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 (*DispatchNamespaceScriptContentSettingService) Edit

Patch script metadata, such as bindings

func (*DispatchNamespaceScriptContentSettingService) Get

Get script settings from a script uploaded to a Workers for Platforms namespace.

type DispatchNamespaceScriptDeleteParams

type DispatchNamespaceScriptDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// If set to true, delete will not be stopped by associated service binding,
	// durable object, or other binding. Any of these associated bindings/durable
	// objects will be deleted along with the script.
	Force param.Field[bool] `query:"force"`
}

func (DispatchNamespaceScriptDeleteParams) URLQuery

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

type DispatchNamespaceScriptGetParams

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

type DispatchNamespaceScriptGetResponseEnvelope

type DispatchNamespaceScriptGetResponseEnvelope struct {
	Errors   []DispatchNamespaceScriptGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DispatchNamespaceScriptGetResponseEnvelopeMessages `json:"messages,required"`
	// Details about a worker uploaded to a Workers for Platforms namespace.
	Result WorkersNamespaceScript `json:"result,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    dispatchNamespaceScriptGetResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceScriptGetResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceScriptGetResponseEnvelopeErrors

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

func (*DispatchNamespaceScriptGetResponseEnvelopeErrors) UnmarshalJSON

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

type DispatchNamespaceScriptGetResponseEnvelopeMessages

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

func (*DispatchNamespaceScriptGetResponseEnvelopeMessages) UnmarshalJSON

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

type DispatchNamespaceScriptGetResponseEnvelopeSuccess

type DispatchNamespaceScriptGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptGetResponseEnvelopeSuccessTrue DispatchNamespaceScriptGetResponseEnvelopeSuccess = true
)

type DispatchNamespaceScriptService

type DispatchNamespaceScriptService struct {
	Options []option.RequestOption
	Content *DispatchNamespaceScriptContentService
}

DispatchNamespaceScriptService 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 NewDispatchNamespaceScriptService method instead.

func NewDispatchNamespaceScriptService

func NewDispatchNamespaceScriptService(opts ...option.RequestOption) (r *DispatchNamespaceScriptService)

NewDispatchNamespaceScriptService 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 (*DispatchNamespaceScriptService) Delete

func (r *DispatchNamespaceScriptService) Delete(ctx context.Context, dispatchNamespace string, scriptName string, params DispatchNamespaceScriptDeleteParams, opts ...option.RequestOption) (err error)

Delete a worker from a Workers for Platforms namespace. This call has no response body on a successful delete.

func (*DispatchNamespaceScriptService) Get

Fetch information about a script uploaded to a Workers for Platforms namespace.

func (*DispatchNamespaceScriptService) Update

func (r *DispatchNamespaceScriptService) Update(ctx context.Context, dispatchNamespace string, scriptName string, params DispatchNamespaceScriptUpdateParams, opts ...option.RequestOption) (res *workers.WorkersScript, err error)

Upload a worker module to a Workers for Platforms namespace.

type DispatchNamespaceScriptUpdateParams

type DispatchNamespaceScriptUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// A module comprising a Worker script, often a javascript file. Multiple modules
	// may be provided as separate named parts, but at least one module must be present
	// and referenced in the metadata as `main_module` or `body_part` by part name.
	AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"`
	// Rollback message to be associated with this deployment. Only parsed when query
	// param `"rollback_to"` is present.
	Message param.Field[string] `json:"message"`
	// JSON encoded metadata about the uploaded parts and Worker configuration.
	Metadata param.Field[DispatchNamespaceScriptUpdateParamsMetadata] `json:"metadata"`
}

func (DispatchNamespaceScriptUpdateParams) MarshalMultipart

func (r DispatchNamespaceScriptUpdateParams) MarshalMultipart() (data []byte, contentType string, err error)

type DispatchNamespaceScriptUpdateParamsMetadata

type DispatchNamespaceScriptUpdateParamsMetadata struct {
	// List of bindings available to the worker.
	Bindings param.Field[[]interface{}] `json:"bindings"`
	// Name of the part in the multipart request that contains the script (e.g. the
	// file adding a listener to the `fetch` event). Indicates a
	// `service worker syntax` Worker.
	BodyPart param.Field[string] `json:"body_part"`
	// Date indicating targeted support in the Workers runtime. Backwards incompatible
	// fixes to the runtime following this date will not affect this Worker.
	CompatibilityDate param.Field[string] `json:"compatibility_date"`
	// Flags that enable or disable certain features in the Workers runtime. Used to
	// enable upcoming features or opt in or out of specific changes not included in a
	// `compatibility_date`.
	CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"`
	// List of binding types to keep from previous_upload.
	KeepBindings param.Field[[]string] `json:"keep_bindings"`
	// Whether Logpush is turned on for the Worker.
	Logpush param.Field[bool] `json:"logpush"`
	// Name of the part in the multipart request that contains the main module (e.g.
	// the file exporting a `fetch` handler). Indicates a `module syntax` Worker.
	MainModule param.Field[string] `json:"main_module"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations param.Field[DispatchNamespaceScriptUpdateParamsMetadataMigrations] `json:"migrations"`
	Placement  param.Field[DispatchNamespaceScriptUpdateParamsMetadataPlacement]  `json:"placement"`
	// List of strings to use as tags for this Worker
	Tags param.Field[[]string] `json:"tags"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers param.Field[[]DispatchNamespaceScriptUpdateParamsMetadataTailConsumer] `json:"tail_consumers"`
	// Usage model to apply to invocations.
	UsageModel param.Field[DispatchNamespaceScriptUpdateParamsMetadataUsageModel] `json:"usage_model"`
	// Key-value pairs to use as tags for this version of this Worker
	VersionTags param.Field[interface{}] `json:"version_tags"`
}

JSON encoded metadata about the uploaded parts and Worker configuration.

func (DispatchNamespaceScriptUpdateParamsMetadata) MarshalJSON

func (r DispatchNamespaceScriptUpdateParamsMetadata) MarshalJSON() (data []byte, err error)

type DispatchNamespaceScriptUpdateParamsMetadataMigrations

type DispatchNamespaceScriptUpdateParamsMetadataMigrations interface {
	// contains filtered or unexported methods
}

Migrations to apply for Durable Objects associated with this Worker.

Satisfied by workers_for_platforms.DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrations, workers_for_platforms.DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrations.

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrations

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrations struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses param.Field[[]string] `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses param.Field[[]string] `json:"new_classes"`
	// Tag to set as the latest migration tag.
	NewTag param.Field[string] `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag param.Field[string] `json:"old_tag"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses param.Field[[]DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrationsRenamedClass] `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses param.Field[[]DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrationsTransferredClass] `json:"transferred_classes"`
}

A single set of migrations to apply.

func (DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrations) MarshalJSON

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrationsRenamedClass

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrationsRenamedClass struct {
	From param.Field[string] `json:"from"`
	To   param.Field[string] `json:"to"`
}

func (DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrationsRenamedClass) MarshalJSON

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrationsTransferredClass

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrationsTransferredClass struct {
	From       param.Field[string] `json:"from"`
	FromScript param.Field[string] `json:"from_script"`
	To         param.Field[string] `json:"to"`
}

func (DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSingleStepMigrationsTransferredClass) MarshalJSON

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrations

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrations struct {
	// Tag to set as the latest migration tag.
	NewTag param.Field[string] `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag param.Field[string] `json:"old_tag"`
	// Migrations to apply in order.
	Steps param.Field[[]DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStep] `json:"steps"`
}

func (DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrations) MarshalJSON

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStep

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStep struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses param.Field[[]string] `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses param.Field[[]string] `json:"new_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses param.Field[[]DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStepsRenamedClass] `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses param.Field[[]DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStepsTransferredClass] `json:"transferred_classes"`
}

func (DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStep) MarshalJSON

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStepsRenamedClass

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStepsRenamedClass struct {
	From param.Field[string] `json:"from"`
	To   param.Field[string] `json:"to"`
}

func (DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStepsRenamedClass) MarshalJSON

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStepsTransferredClass

type DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStepsTransferredClass struct {
	From       param.Field[string] `json:"from"`
	FromScript param.Field[string] `json:"from_script"`
	To         param.Field[string] `json:"to"`
}

func (DispatchNamespaceScriptUpdateParamsMetadataMigrationsWorkersSteppedMigrationsStepsTransferredClass) MarshalJSON

type DispatchNamespaceScriptUpdateParamsMetadataPlacement

type DispatchNamespaceScriptUpdateParamsMetadataPlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	// Only `"smart"` is currently supported
	Mode param.Field[DispatchNamespaceScriptUpdateParamsMetadataPlacementMode] `json:"mode"`
}

func (DispatchNamespaceScriptUpdateParamsMetadataPlacement) MarshalJSON

func (r DispatchNamespaceScriptUpdateParamsMetadataPlacement) MarshalJSON() (data []byte, err error)

type DispatchNamespaceScriptUpdateParamsMetadataPlacementMode

type DispatchNamespaceScriptUpdateParamsMetadataPlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported

const (
	DispatchNamespaceScriptUpdateParamsMetadataPlacementModeSmart DispatchNamespaceScriptUpdateParamsMetadataPlacementMode = "smart"
)

type DispatchNamespaceScriptUpdateParamsMetadataTailConsumer

type DispatchNamespaceScriptUpdateParamsMetadataTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service param.Field[string] `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment param.Field[string] `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace param.Field[string] `json:"namespace"`
}

A reference to a script that will consume logs from the attached Worker.

func (DispatchNamespaceScriptUpdateParamsMetadataTailConsumer) MarshalJSON

type DispatchNamespaceScriptUpdateParamsMetadataUsageModel

type DispatchNamespaceScriptUpdateParamsMetadataUsageModel string

Usage model to apply to invocations.

const (
	DispatchNamespaceScriptUpdateParamsMetadataUsageModelBundled DispatchNamespaceScriptUpdateParamsMetadataUsageModel = "bundled"
	DispatchNamespaceScriptUpdateParamsMetadataUsageModelUnbound DispatchNamespaceScriptUpdateParamsMetadataUsageModel = "unbound"
)

type DispatchNamespaceScriptUpdateResponseEnvelope

type DispatchNamespaceScriptUpdateResponseEnvelope struct {
	Errors   []DispatchNamespaceScriptUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DispatchNamespaceScriptUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   workers.WorkersScript                                   `json:"result,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    dispatchNamespaceScriptUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceScriptUpdateResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceScriptUpdateResponseEnvelopeErrors

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

func (*DispatchNamespaceScriptUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type DispatchNamespaceScriptUpdateResponseEnvelopeMessages

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

func (*DispatchNamespaceScriptUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type DispatchNamespaceScriptUpdateResponseEnvelopeSuccess

type DispatchNamespaceScriptUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptUpdateResponseEnvelopeSuccessTrue DispatchNamespaceScriptUpdateResponseEnvelopeSuccess = true
)

type DispatchNamespaceService

type DispatchNamespaceService struct {
	Options []option.RequestOption
	Scripts *DispatchNamespaceScriptService
}

DispatchNamespaceService 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 NewDispatchNamespaceService method instead.

func NewDispatchNamespaceService

func NewDispatchNamespaceService(opts ...option.RequestOption) (r *DispatchNamespaceService)

NewDispatchNamespaceService 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 (*DispatchNamespaceService) Delete

Delete a Workers for Platforms namespace.

func (*DispatchNamespaceService) Get

Fetch a Workers for Platforms namespace.

func (*DispatchNamespaceService) List

Fetch a list of Workers for Platforms namespaces.

func (*DispatchNamespaceService) New

Create a new Workers for Platforms namespace.

type DispatchService

type DispatchService struct {
	Options    []option.RequestOption
	Namespaces *DispatchNamespaceService
}

DispatchService 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 NewDispatchService method instead.

func NewDispatchService

func NewDispatchService(opts ...option.RequestOption) (r *DispatchService)

NewDispatchService 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 WorkersForPlatformService

type WorkersForPlatformService struct {
	Options  []option.RequestOption
	Dispatch *DispatchService
}

WorkersForPlatformService 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 NewWorkersForPlatformService method instead.

func NewWorkersForPlatformService

func NewWorkersForPlatformService(opts ...option.RequestOption) (r *WorkersForPlatformService)

NewWorkersForPlatformService 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 WorkersNamespaceScript

type WorkersNamespaceScript struct {
	// When the script was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Name of the Workers for Platforms dispatch namespace.
	DispatchNamespace string `json:"dispatch_namespace"`
	// When the script was last modified.
	ModifiedOn time.Time                  `json:"modified_on" format:"date-time"`
	Script     workers.WorkersScript      `json:"script"`
	JSON       workersNamespaceScriptJSON `json:"-"`
}

Details about a worker uploaded to a Workers for Platforms namespace.

func (*WorkersNamespaceScript) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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