workers_for_platforms

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN added in v2.1.0

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam added in v2.1.0

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

The type of actor, whether a User, Cloudflare Admin, or an Automated System.

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

A Cloudflare Tunnel that connects your origin to Cloudflare's edge.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

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   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DispatchNamespaceDeleteResponseEnvelopeSuccess `json:"success,required"`
	Result  DispatchNamespaceDeleteResponse                `json:"result,nullable"`
	JSON    dispatchNamespaceDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceDeleteResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceDeleteResponseEnvelopeSuccess

type DispatchNamespaceDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceDeleteResponseEnvelopeSuccessTrue DispatchNamespaceDeleteResponseEnvelopeSuccess = true
)

func (DispatchNamespaceDeleteResponseEnvelopeSuccess) IsKnown

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"`
	// The current number of scripts in this Dispatch Namespace
	ScriptCount int64                            `json:"script_count"`
	JSON        dispatchNamespaceGetResponseJSON `json:"-"`
}

func (*DispatchNamespaceGetResponse) UnmarshalJSON

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

type DispatchNamespaceGetResponseEnvelope

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

func (*DispatchNamespaceGetResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceGetResponseEnvelopeSuccess

type DispatchNamespaceGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceGetResponseEnvelopeSuccessTrue DispatchNamespaceGetResponseEnvelopeSuccess = true
)

func (DispatchNamespaceGetResponseEnvelopeSuccess) IsKnown

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"`
	// The current number of scripts in this Dispatch Namespace
	ScriptCount int64                             `json:"script_count"`
	JSON        dispatchNamespaceListResponseJSON `json:"-"`
}

func (*DispatchNamespaceListResponse) UnmarshalJSON

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

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"`
	// The current number of scripts in this Dispatch Namespace
	ScriptCount int64                            `json:"script_count"`
	JSON        dispatchNamespaceNewResponseJSON `json:"-"`
}

func (*DispatchNamespaceNewResponse) UnmarshalJSON

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

type DispatchNamespaceNewResponseEnvelope

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

func (*DispatchNamespaceNewResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceNewResponseEnvelopeSuccess

type DispatchNamespaceNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceNewResponseEnvelopeSuccessTrue DispatchNamespaceNewResponseEnvelopeSuccess = true
)

func (DispatchNamespaceNewResponseEnvelopeSuccess) IsKnown

type DispatchNamespaceScriptBindingGetParams

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

type DispatchNamespaceScriptBindingGetResponseEnvelope

type DispatchNamespaceScriptBindingGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess `json:"success,required"`
	// List of bindings attached to this Worker
	Result []workers.Binding                                     `json:"result"`
	JSON   dispatchNamespaceScriptBindingGetResponseEnvelopeJSON `json:"-"`
}

func (*DispatchNamespaceScriptBindingGetResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess

type DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptBindingGetResponseEnvelopeSuccessTrue DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess = true
)

func (DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess) IsKnown

type DispatchNamespaceScriptBindingService

type DispatchNamespaceScriptBindingService struct {
	Options []option.RequestOption
}

DispatchNamespaceScriptBindingService 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 NewDispatchNamespaceScriptBindingService method instead.

func NewDispatchNamespaceScriptBindingService

func NewDispatchNamespaceScriptBindingService(opts ...option.RequestOption) (r *DispatchNamespaceScriptBindingService)

NewDispatchNamespaceScriptBindingService 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 (*DispatchNamespaceScriptBindingService) Get

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

type DispatchNamespaceScriptContentGetParams

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

type DispatchNamespaceScriptContentService

type DispatchNamespaceScriptContentService struct {
	Options []option.RequestOption
}

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.

func (*DispatchNamespaceScriptContentService) Get

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

func (*DispatchNamespaceScriptContentService) Update

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

type DispatchNamespaceScriptContentUpdateParams

type DispatchNamespaceScriptContentUpdateParams 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. Source maps may also
	// be included using the `application/source-map` content type.
	AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"`
	// JSON encoded metadata about the uploaded parts and Worker configuration.
	Metadata               param.Field[workers.WorkerMetadataParam] `json:"metadata"`
	CfWorkerBodyPart       param.Field[string]                      `header:"CF-WORKER-BODY-PART"`
	CfWorkerMainModulePart param.Field[string]                      `header:"CF-WORKER-MAIN-MODULE-PART"`
}

func (DispatchNamespaceScriptContentUpdateParams) MarshalMultipart

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

type DispatchNamespaceScriptContentUpdateResponseEnvelope

type DispatchNamespaceScriptContentUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess `json:"success,required"`
	Result  workers.Script                                              `json:"result"`
	JSON    dispatchNamespaceScriptContentUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceScriptContentUpdateResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess

type DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccessTrue DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess = true
)

func (DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess) IsKnown

type DispatchNamespaceScriptDeleteParams

type DispatchNamespaceScriptDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,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) MarshalJSON

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

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   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptGetResponseEnvelopeSuccess `json:"success,required"`
	// Details about a worker uploaded to a Workers for Platforms namespace.
	Result Script                                         `json:"result"`
	JSON   dispatchNamespaceScriptGetResponseEnvelopeJSON `json:"-"`
}

func (*DispatchNamespaceScriptGetResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceScriptGetResponseEnvelopeSuccess

type DispatchNamespaceScriptGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptGetResponseEnvelopeSuccessTrue DispatchNamespaceScriptGetResponseEnvelopeSuccess = true
)

func (DispatchNamespaceScriptGetResponseEnvelopeSuccess) IsKnown

type DispatchNamespaceScriptSecretListParams

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

type DispatchNamespaceScriptSecretListResponse

type DispatchNamespaceScriptSecretListResponse struct {
	// The name of this secret, this is what will be to access it inside the Worker.
	Name string `json:"name"`
	// The type of secret to put.
	Type DispatchNamespaceScriptSecretListResponseType `json:"type"`
	JSON dispatchNamespaceScriptSecretListResponseJSON `json:"-"`
}

func (*DispatchNamespaceScriptSecretListResponse) UnmarshalJSON

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

type DispatchNamespaceScriptSecretListResponseType

type DispatchNamespaceScriptSecretListResponseType string

The type of secret to put.

const (
	DispatchNamespaceScriptSecretListResponseTypeSecretText DispatchNamespaceScriptSecretListResponseType = "secret_text"
)

func (DispatchNamespaceScriptSecretListResponseType) IsKnown

type DispatchNamespaceScriptSecretService

type DispatchNamespaceScriptSecretService struct {
	Options []option.RequestOption
}

DispatchNamespaceScriptSecretService 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 NewDispatchNamespaceScriptSecretService method instead.

func NewDispatchNamespaceScriptSecretService

func NewDispatchNamespaceScriptSecretService(opts ...option.RequestOption) (r *DispatchNamespaceScriptSecretService)

NewDispatchNamespaceScriptSecretService 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 (*DispatchNamespaceScriptSecretService) List

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

func (*DispatchNamespaceScriptSecretService) ListAutoPaging

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

func (*DispatchNamespaceScriptSecretService) Update

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

type DispatchNamespaceScriptSecretUpdateParams

type DispatchNamespaceScriptSecretUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// The name of this secret, this is what will be to access it inside the Worker.
	Name param.Field[string] `json:"name"`
	// The value of the secret.
	Text param.Field[string] `json:"text"`
	// The type of secret to put.
	Type param.Field[DispatchNamespaceScriptSecretUpdateParamsType] `json:"type"`
}

func (DispatchNamespaceScriptSecretUpdateParams) MarshalJSON

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

type DispatchNamespaceScriptSecretUpdateParamsType

type DispatchNamespaceScriptSecretUpdateParamsType string

The type of secret to put.

const (
	DispatchNamespaceScriptSecretUpdateParamsTypeSecretText DispatchNamespaceScriptSecretUpdateParamsType = "secret_text"
)

func (DispatchNamespaceScriptSecretUpdateParamsType) IsKnown

type DispatchNamespaceScriptSecretUpdateResponse

type DispatchNamespaceScriptSecretUpdateResponse struct {
	// The name of this secret, this is what will be to access it inside the Worker.
	Name string `json:"name"`
	// The type of secret to put.
	Type DispatchNamespaceScriptSecretUpdateResponseType `json:"type"`
	JSON dispatchNamespaceScriptSecretUpdateResponseJSON `json:"-"`
}

func (*DispatchNamespaceScriptSecretUpdateResponse) UnmarshalJSON

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

type DispatchNamespaceScriptSecretUpdateResponseEnvelope

type DispatchNamespaceScriptSecretUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess `json:"success,required"`
	Result  DispatchNamespaceScriptSecretUpdateResponse                `json:"result"`
	JSON    dispatchNamespaceScriptSecretUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceScriptSecretUpdateResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess

type DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccessTrue DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess = true
)

func (DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess) IsKnown

type DispatchNamespaceScriptSecretUpdateResponseType

type DispatchNamespaceScriptSecretUpdateResponseType string

The type of secret to put.

const (
	DispatchNamespaceScriptSecretUpdateResponseTypeSecretText DispatchNamespaceScriptSecretUpdateResponseType = "secret_text"
)

func (DispatchNamespaceScriptSecretUpdateResponseType) IsKnown

type DispatchNamespaceScriptService

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

func (r *DispatchNamespaceScriptService) Get(ctx context.Context, dispatchNamespace string, scriptName string, query DispatchNamespaceScriptGetParams, opts ...option.RequestOption) (res *Script, err error)

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.Script, err error)

Upload a worker module to a Workers for Platforms namespace. You can find an example of the metadata on our docs: https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/reference/metadata/

type DispatchNamespaceScriptSettingEditParams

type DispatchNamespaceScriptSettingEditParams struct {
	// Identifier
	AccountID param.Field[string]                                           `path:"account_id,required"`
	Settings  param.Field[DispatchNamespaceScriptSettingEditParamsSettings] `json:"settings"`
}

func (DispatchNamespaceScriptSettingEditParams) MarshalJSON

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

type DispatchNamespaceScriptSettingEditParamsSettings

type DispatchNamespaceScriptSettingEditParamsSettings struct {
	// List of bindings attached to this Worker
	Bindings param.Field[[]workers.BindingUnionParam] `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"`
	// Limits to apply for this Worker.
	Limits param.Field[DispatchNamespaceScriptSettingEditParamsSettingsLimits] `json:"limits"`
	// 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[DispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion] `json:"migrations"`
	Placement  param.Field[workers.PlacementConfigurationParam]                             `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[[]workers.ConsumerScriptParam] `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel param.Field[string] `json:"usage_model"`
}

func (DispatchNamespaceScriptSettingEditParamsSettings) MarshalJSON

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

type DispatchNamespaceScriptSettingEditParamsSettingsLimits

type DispatchNamespaceScriptSettingEditParamsSettingsLimits struct {
	// The amount of CPU time this Worker can use in milliseconds.
	CPUMs param.Field[int64] `json:"cpu_ms"`
}

Limits to apply for this Worker.

func (DispatchNamespaceScriptSettingEditParamsSettingsLimits) MarshalJSON

type DispatchNamespaceScriptSettingEditParamsSettingsMigrations

type DispatchNamespaceScriptSettingEditParamsSettingsMigrations 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"`
	DeletedClasses     param.Field[interface{}] `json:"deleted_classes,required"`
	NewClasses         param.Field[interface{}] `json:"new_classes,required"`
	RenamedClasses     param.Field[interface{}] `json:"renamed_classes,required"`
	TransferredClasses param.Field[interface{}] `json:"transferred_classes,required"`
	Steps              param.Field[interface{}] `json:"steps,required"`
}

Migrations to apply for Durable Objects associated with this Worker.

func (DispatchNamespaceScriptSettingEditParamsSettingsMigrations) MarshalJSON

type DispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion

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

Migrations to apply for Durable Objects associated with this Worker.

Satisfied by workers.SingleStepMigrationParam, workers.SteppedMigrationParam, DispatchNamespaceScriptSettingEditParamsSettingsMigrations.

type DispatchNamespaceScriptSettingEditResponse

type DispatchNamespaceScriptSettingEditResponse struct {
	// List of bindings attached to this Worker
	Bindings []workers.Binding `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"`
	// Limits to apply for this Worker.
	Limits DispatchNamespaceScriptSettingEditResponseLimits `json:"limits"`
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations DispatchNamespaceScriptSettingEditResponseMigrations `json:"migrations"`
	Placement  workers.PlacementConfiguration                       `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 []workers.ConsumerScript `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel string                                         `json:"usage_model"`
	JSON       dispatchNamespaceScriptSettingEditResponseJSON `json:"-"`
}

func (*DispatchNamespaceScriptSettingEditResponse) UnmarshalJSON

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

type DispatchNamespaceScriptSettingEditResponseEnvelope

type DispatchNamespaceScriptSettingEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess `json:"success,required"`
	Result  DispatchNamespaceScriptSettingEditResponse                `json:"result"`
	JSON    dispatchNamespaceScriptSettingEditResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceScriptSettingEditResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess

type DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptSettingEditResponseEnvelopeSuccessTrue DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess = true
)

func (DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess) IsKnown

type DispatchNamespaceScriptSettingEditResponseLimits

type DispatchNamespaceScriptSettingEditResponseLimits struct {
	// The amount of CPU time this Worker can use in milliseconds.
	CPUMs int64                                                `json:"cpu_ms"`
	JSON  dispatchNamespaceScriptSettingEditResponseLimitsJSON `json:"-"`
}

Limits to apply for this Worker.

func (*DispatchNamespaceScriptSettingEditResponseLimits) UnmarshalJSON

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

type DispatchNamespaceScriptSettingEditResponseMigrations

type DispatchNamespaceScriptSettingEditResponseMigrations 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"`
	DeletedClasses     interface{}                                              `json:"deleted_classes,required"`
	NewClasses         interface{}                                              `json:"new_classes,required"`
	RenamedClasses     interface{}                                              `json:"renamed_classes,required"`
	TransferredClasses interface{}                                              `json:"transferred_classes,required"`
	Steps              interface{}                                              `json:"steps,required"`
	JSON               dispatchNamespaceScriptSettingEditResponseMigrationsJSON `json:"-"`
	// contains filtered or unexported fields
}

Migrations to apply for Durable Objects associated with this Worker.

func (DispatchNamespaceScriptSettingEditResponseMigrations) AsUnion

func (*DispatchNamespaceScriptSettingEditResponseMigrations) UnmarshalJSON

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

type DispatchNamespaceScriptSettingEditResponseMigrationsUnion

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

Migrations to apply for Durable Objects associated with this Worker.

Union satisfied by workers.SingleStepMigration or workers.SteppedMigration.

type DispatchNamespaceScriptSettingGetParams

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

type DispatchNamespaceScriptSettingGetResponse

type DispatchNamespaceScriptSettingGetResponse struct {
	// List of bindings attached to this Worker
	Bindings []workers.Binding `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"`
	// Limits to apply for this Worker.
	Limits DispatchNamespaceScriptSettingGetResponseLimits `json:"limits"`
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations DispatchNamespaceScriptSettingGetResponseMigrations `json:"migrations"`
	Placement  workers.PlacementConfiguration                      `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 []workers.ConsumerScript `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel string                                        `json:"usage_model"`
	JSON       dispatchNamespaceScriptSettingGetResponseJSON `json:"-"`
}

func (*DispatchNamespaceScriptSettingGetResponse) UnmarshalJSON

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

type DispatchNamespaceScriptSettingGetResponseEnvelope

type DispatchNamespaceScriptSettingGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess `json:"success,required"`
	Result  DispatchNamespaceScriptSettingGetResponse                `json:"result"`
	JSON    dispatchNamespaceScriptSettingGetResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceScriptSettingGetResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess

type DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptSettingGetResponseEnvelopeSuccessTrue DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess = true
)

func (DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess) IsKnown

type DispatchNamespaceScriptSettingGetResponseLimits

type DispatchNamespaceScriptSettingGetResponseLimits struct {
	// The amount of CPU time this Worker can use in milliseconds.
	CPUMs int64                                               `json:"cpu_ms"`
	JSON  dispatchNamespaceScriptSettingGetResponseLimitsJSON `json:"-"`
}

Limits to apply for this Worker.

func (*DispatchNamespaceScriptSettingGetResponseLimits) UnmarshalJSON

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

type DispatchNamespaceScriptSettingGetResponseMigrations

type DispatchNamespaceScriptSettingGetResponseMigrations 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"`
	DeletedClasses     interface{}                                             `json:"deleted_classes,required"`
	NewClasses         interface{}                                             `json:"new_classes,required"`
	RenamedClasses     interface{}                                             `json:"renamed_classes,required"`
	TransferredClasses interface{}                                             `json:"transferred_classes,required"`
	Steps              interface{}                                             `json:"steps,required"`
	JSON               dispatchNamespaceScriptSettingGetResponseMigrationsJSON `json:"-"`
	// contains filtered or unexported fields
}

Migrations to apply for Durable Objects associated with this Worker.

func (DispatchNamespaceScriptSettingGetResponseMigrations) AsUnion

func (*DispatchNamespaceScriptSettingGetResponseMigrations) UnmarshalJSON

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

type DispatchNamespaceScriptSettingGetResponseMigrationsUnion

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

Migrations to apply for Durable Objects associated with this Worker.

Union satisfied by workers.SingleStepMigration or workers.SteppedMigration.

type DispatchNamespaceScriptSettingService

type DispatchNamespaceScriptSettingService struct {
	Options []option.RequestOption
}

DispatchNamespaceScriptSettingService 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 NewDispatchNamespaceScriptSettingService method instead.

func NewDispatchNamespaceScriptSettingService

func NewDispatchNamespaceScriptSettingService(opts ...option.RequestOption) (r *DispatchNamespaceScriptSettingService)

NewDispatchNamespaceScriptSettingService 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 (*DispatchNamespaceScriptSettingService) Edit

Patch script metadata, such as bindings

func (*DispatchNamespaceScriptSettingService) Get

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

type DispatchNamespaceScriptTagDeleteParams

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

type DispatchNamespaceScriptTagDeleteResponse

type DispatchNamespaceScriptTagDeleteResponse = interface{}

type DispatchNamespaceScriptTagDeleteResponseEnvelope

type DispatchNamespaceScriptTagDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess `json:"success,required"`
	Result  DispatchNamespaceScriptTagDeleteResponse                `json:"result,nullable"`
	JSON    dispatchNamespaceScriptTagDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceScriptTagDeleteResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess

type DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccessTrue DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess = true
)

func (DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess) IsKnown

type DispatchNamespaceScriptTagListParams

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

type DispatchNamespaceScriptTagService

type DispatchNamespaceScriptTagService struct {
	Options []option.RequestOption
}

DispatchNamespaceScriptTagService 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 NewDispatchNamespaceScriptTagService method instead.

func NewDispatchNamespaceScriptTagService

func NewDispatchNamespaceScriptTagService(opts ...option.RequestOption) (r *DispatchNamespaceScriptTagService)

NewDispatchNamespaceScriptTagService 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 (*DispatchNamespaceScriptTagService) Delete

Delete script tag for a script uploaded to a Workers for Platforms namespace.

func (*DispatchNamespaceScriptTagService) List

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

func (*DispatchNamespaceScriptTagService) ListAutoPaging

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

func (*DispatchNamespaceScriptTagService) Update

func (r *DispatchNamespaceScriptTagService) Update(ctx context.Context, dispatchNamespace string, scriptName string, params DispatchNamespaceScriptTagUpdateParams, opts ...option.RequestOption) (res *[]string, err error)

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

type DispatchNamespaceScriptTagUpdateParams

type DispatchNamespaceScriptTagUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Tags to help you manage your Workers
	Body []string `json:"body,required"`
}

func (DispatchNamespaceScriptTagUpdateParams) MarshalJSON

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

type DispatchNamespaceScriptTagUpdateResponseEnvelope

type DispatchNamespaceScriptTagUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess `json:"success,required"`
	Result  []string                                                `json:"result"`
	JSON    dispatchNamespaceScriptTagUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*DispatchNamespaceScriptTagUpdateResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess

type DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccessTrue DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess = true
)

func (DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess) IsKnown

type DispatchNamespaceScriptUpdateParams

type DispatchNamespaceScriptUpdateParams struct {
	// Identifier
	AccountID param.Field[string]                          `path:"account_id,required"`
	Body      DispatchNamespaceScriptUpdateParamsBodyUnion `json:"body,required"`
}

func (DispatchNamespaceScriptUpdateParams) MarshalMultipart

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

type DispatchNamespaceScriptUpdateParamsBody

type DispatchNamespaceScriptUpdateParamsBody struct {
	AnyPartName param.Field[interface{}] `json:"<any part name>,required"`
	Metadata    param.Field[interface{}] `json:"metadata,required"`
	// Rollback message to be associated with this deployment. Only parsed when query
	// param `"rollback_to"` is present.
	Message param.Field[string] `json:"message"`
}

func (DispatchNamespaceScriptUpdateParamsBody) MarshalJSON

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

type DispatchNamespaceScriptUpdateParamsBodyObject

type DispatchNamespaceScriptUpdateParamsBodyObject struct {
	// 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.
	// Source maps may also be included using the `application/source-map` content
	// type.
	AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"`
	// JSON encoded metadata about the uploaded parts and Worker configuration.
	Metadata param.Field[DispatchNamespaceScriptUpdateParamsBodyObjectMetadata] `json:"metadata"`
}

func (DispatchNamespaceScriptUpdateParamsBodyObject) MarshalJSON

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

type DispatchNamespaceScriptUpdateParamsBodyObjectMetadata

type DispatchNamespaceScriptUpdateParamsBodyObjectMetadata 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[DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion] `json:"migrations"`
	Placement  param.Field[workers.PlacementConfigurationParam]                                  `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[[]workers.ConsumerScriptParam] `json:"tail_consumers"`
	// Usage model to apply to invocations.
	UsageModel param.Field[DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel] `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 (DispatchNamespaceScriptUpdateParamsBodyObjectMetadata) MarshalJSON

type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations

type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations 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"`
	DeletedClasses     param.Field[interface{}] `json:"deleted_classes,required"`
	NewClasses         param.Field[interface{}] `json:"new_classes,required"`
	RenamedClasses     param.Field[interface{}] `json:"renamed_classes,required"`
	TransferredClasses param.Field[interface{}] `json:"transferred_classes,required"`
	Steps              param.Field[interface{}] `json:"steps,required"`
}

Migrations to apply for Durable Objects associated with this Worker.

func (DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations) MarshalJSON

type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion

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

Migrations to apply for Durable Objects associated with this Worker.

Satisfied by workers.SingleStepMigrationParam, workers.SteppedMigrationParam, DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations.

type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel

type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel string

Usage model to apply to invocations.

const (
	DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModelBundled DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel = "bundled"
	DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModelUnbound DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel = "unbound"
)

func (DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel) IsKnown

type DispatchNamespaceScriptUpdateResponseEnvelope

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

func (*DispatchNamespaceScriptUpdateResponseEnvelope) UnmarshalJSON

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

type DispatchNamespaceScriptUpdateResponseEnvelopeSuccess

type DispatchNamespaceScriptUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DispatchNamespaceScriptUpdateResponseEnvelopeSuccessTrue DispatchNamespaceScriptUpdateResponseEnvelopeSuccess = true
)

func (DispatchNamespaceScriptUpdateResponseEnvelopeSuccess) IsKnown

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

Get a Workers for Platforms namespace.

func (*DispatchNamespaceService) List

Fetch a list of Workers for Platforms namespaces.

func (*DispatchNamespaceService) ListAutoPaging

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 ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type Member added in v2.1.0

type Member = shared.Member

This is an alias to an internal type.

type MemberParam added in v2.1.0

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRole added in v2.1.0

type MemberRole = shared.MemberRole

This is an alias to an internal type.

type MemberRoleParam added in v2.1.0

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissions added in v2.1.0

type MemberRolesPermissions = shared.MemberRolesPermissions

This is an alias to an internal type.

type MemberRolesPermissionsParam added in v2.1.0

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberUser added in v2.1.0

type MemberUser = shared.MemberUser

This is an alias to an internal type.

type MemberUserParam added in v2.1.0

type MemberUserParam = shared.MemberUserParam

This is an alias to an internal type.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type Script

type Script 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.Script `json:"script"`
	JSON       scriptJSON     `json:"-"`
}

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

func (*Script) UnmarshalJSON

func (r *Script) UnmarshalJSON(data []byte) (err 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.

Jump to

Keyboard shortcuts

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