workers

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 17 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 CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

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.

View Source
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AccountSettingGetParams

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

type AccountSettingGetResponse

type AccountSettingGetResponse struct {
	DefaultUsageModel string                        `json:"default_usage_model"`
	GreenCompute      bool                          `json:"green_compute"`
	JSON              accountSettingGetResponseJSON `json:"-"`
}

func (*AccountSettingGetResponse) UnmarshalJSON

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

type AccountSettingGetResponseEnvelope

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

func (*AccountSettingGetResponseEnvelope) UnmarshalJSON

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

type AccountSettingGetResponseEnvelopeSuccess

type AccountSettingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AccountSettingGetResponseEnvelopeSuccessTrue AccountSettingGetResponseEnvelopeSuccess = true
)

func (AccountSettingGetResponseEnvelopeSuccess) IsKnown

type AccountSettingService

type AccountSettingService struct {
	Options []option.RequestOption
}

AccountSettingService 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 NewAccountSettingService method instead.

func NewAccountSettingService

func NewAccountSettingService(opts ...option.RequestOption) (r *AccountSettingService)

NewAccountSettingService 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 (*AccountSettingService) Get

Fetches Worker account settings for an account.

func (*AccountSettingService) Update

Creates Worker account settings for an account.

type AccountSettingUpdateParams

type AccountSettingUpdateParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id,required"`
	DefaultUsageModel param.Field[string] `json:"default_usage_model"`
	GreenCompute      param.Field[bool]   `json:"green_compute"`
}

func (AccountSettingUpdateParams) MarshalJSON

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

type AccountSettingUpdateResponse

type AccountSettingUpdateResponse struct {
	DefaultUsageModel string                           `json:"default_usage_model"`
	GreenCompute      bool                             `json:"green_compute"`
	JSON              accountSettingUpdateResponseJSON `json:"-"`
}

func (*AccountSettingUpdateResponse) UnmarshalJSON

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

type AccountSettingUpdateResponseEnvelope

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

func (*AccountSettingUpdateResponseEnvelope) UnmarshalJSON

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

type AccountSettingUpdateResponseEnvelopeSuccess

type AccountSettingUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AccountSettingUpdateResponseEnvelopeSuccessTrue AccountSettingUpdateResponseEnvelopeSuccess = true
)

func (AccountSettingUpdateResponseEnvelopeSuccess) IsKnown

type AssetService

type AssetService struct {
	Options []option.RequestOption
	Upload  *AssetUploadService
}

AssetService 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 NewAssetService method instead.

func NewAssetService

func NewAssetService(opts ...option.RequestOption) (r *AssetService)

NewAssetService 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 AssetUploadNewParams

type AssetUploadNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Whether the file contents are base64-encoded. Must be `true`.
	Base64 param.Field[AssetUploadNewParamsBase64] `query:"base64,required"`
	// Base-64 encoded contents of the file. The content type of the file should be
	// included to ensure a valid "Content-Type" header is included in asset responses.
	AnyFileHash param.Field[[]string] `json:"<any file hash>"`
}

func (AssetUploadNewParams) MarshalMultipart

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

func (AssetUploadNewParams) URLQuery

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

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

type AssetUploadNewParamsBase64

type AssetUploadNewParamsBase64 bool

Whether the file contents are base64-encoded. Must be `true`.

const (
	AssetUploadNewParamsBase64True AssetUploadNewParamsBase64 = true
)

func (AssetUploadNewParamsBase64) IsKnown

func (r AssetUploadNewParamsBase64) IsKnown() bool

type AssetUploadNewResponse

type AssetUploadNewResponse struct {
	// A "completion" JWT which can be redeemed when creating a Worker version.
	JWT  string                     `json:"jwt"`
	JSON assetUploadNewResponseJSON `json:"-"`
}

func (*AssetUploadNewResponse) UnmarshalJSON

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

type AssetUploadNewResponseEnvelope

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

func (*AssetUploadNewResponseEnvelope) UnmarshalJSON

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

type AssetUploadNewResponseEnvelopeSuccess

type AssetUploadNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AssetUploadNewResponseEnvelopeSuccessTrue AssetUploadNewResponseEnvelopeSuccess = true
)

func (AssetUploadNewResponseEnvelopeSuccess) IsKnown

type AssetUploadService

type AssetUploadService struct {
	Options []option.RequestOption
}

AssetUploadService 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 NewAssetUploadService method instead.

func NewAssetUploadService

func NewAssetUploadService(opts ...option.RequestOption) (r *AssetUploadService)

NewAssetUploadService 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 (*AssetUploadService) New

Upload assets ahead of creating a Worker version. To learn more about the direct uploads of assets, see https://developers.cloudflare.com/workers/static-assets/direct-upload/

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 CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType

type CertificateRequestType = shared.CertificateRequestType

Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).

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 CloudflareTunnelStatus

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

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 ConsumerScript

type ConsumerScript 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      consumerScriptJSON `json:"-"`
}

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

func (*ConsumerScript) UnmarshalJSON

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

type ConsumerScriptParam

type ConsumerScriptParam 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 (ConsumerScriptParam) MarshalJSON

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

type Deployment

type Deployment struct {
	// Human-readable message about the deployment. Truncated to 100 bytes.
	WorkersMessage string         `json:"workers/message"`
	JSON           deploymentJSON `json:"-"`
}

func (*Deployment) UnmarshalJSON

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

type DeploymentParam

type DeploymentParam struct {
	// Human-readable message about the deployment. Truncated to 100 bytes.
	WorkersMessage param.Field[string] `json:"workers/message"`
}

func (DeploymentParam) MarshalJSON

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

type Domain

type Domain struct {
	// Identifer of the Worker Domain.
	ID string `json:"id"`
	// Worker environment associated with the zone and hostname.
	Environment string `json:"environment"`
	// Hostname of the Worker Domain.
	Hostname string `json:"hostname"`
	// Worker service associated with the zone and hostname.
	Service string `json:"service"`
	// Identifier of the zone.
	ZoneID string `json:"zone_id"`
	// Name of the zone.
	ZoneName string     `json:"zone_name"`
	JSON     domainJSON `json:"-"`
}

func (*Domain) UnmarshalJSON

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

type DomainDeleteParams

type DomainDeleteParams struct {
	// Identifer of the account.
	AccountID param.Field[string] `path:"account_id,required"`
}

type DomainGetParams

type DomainGetParams struct {
	// Identifer of the account.
	AccountID param.Field[string] `path:"account_id,required"`
}

type DomainGetResponseEnvelope

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

func (*DomainGetResponseEnvelope) UnmarshalJSON

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

type DomainGetResponseEnvelopeSuccess

type DomainGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DomainGetResponseEnvelopeSuccessTrue DomainGetResponseEnvelopeSuccess = true
)

func (DomainGetResponseEnvelopeSuccess) IsKnown

type DomainListParams

type DomainListParams struct {
	// Identifer of the account.
	AccountID param.Field[string] `path:"account_id,required"`
	// Worker environment associated with the zone and hostname.
	Environment param.Field[string] `query:"environment"`
	// Hostname of the Worker Domain.
	Hostname param.Field[string] `query:"hostname"`
	// Worker service associated with the zone and hostname.
	Service param.Field[string] `query:"service"`
	// Identifier of the zone.
	ZoneID param.Field[string] `query:"zone_id"`
	// Name of the zone.
	ZoneName param.Field[string] `query:"zone_name"`
}

func (DomainListParams) URLQuery

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

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

type DomainService

type DomainService struct {
	Options []option.RequestOption
}

DomainService 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 NewDomainService method instead.

func NewDomainService

func NewDomainService(opts ...option.RequestOption) (r *DomainService)

NewDomainService 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 (*DomainService) Delete

func (r *DomainService) Delete(ctx context.Context, domainID string, body DomainDeleteParams, opts ...option.RequestOption) (err error)

Detaches a Worker from a zone and hostname.

func (*DomainService) Get

func (r *DomainService) Get(ctx context.Context, domainID string, query DomainGetParams, opts ...option.RequestOption) (res *Domain, err error)

Gets a Worker domain.

func (*DomainService) List

Lists all Worker Domains for an account.

func (*DomainService) ListAutoPaging

Lists all Worker Domains for an account.

func (*DomainService) Update

func (r *DomainService) Update(ctx context.Context, params DomainUpdateParams, opts ...option.RequestOption) (res *Domain, err error)

Attaches a Worker to a zone and hostname.

type DomainUpdateParams

type DomainUpdateParams struct {
	// Identifer of the account.
	AccountID param.Field[string] `path:"account_id,required"`
	// Worker environment associated with the zone and hostname.
	Environment param.Field[string] `json:"environment,required"`
	// Hostname of the Worker Domain.
	Hostname param.Field[string] `json:"hostname,required"`
	// Worker service associated with the zone and hostname.
	Service param.Field[string] `json:"service,required"`
	// Identifier of the zone.
	ZoneID param.Field[string] `json:"zone_id,required"`
}

func (DomainUpdateParams) MarshalJSON

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

type DomainUpdateResponseEnvelope

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

func (*DomainUpdateResponseEnvelope) UnmarshalJSON

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

type DomainUpdateResponseEnvelopeSuccess

type DomainUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DomainUpdateResponseEnvelopeSuccessTrue DomainUpdateResponseEnvelopeSuccess = true
)

func (DomainUpdateResponseEnvelopeSuccess) IsKnown

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type Member

type Member = shared.Member

This is an alias to an internal type.

type MemberPoliciesAccess

type MemberPoliciesAccess = shared.MemberPoliciesAccess

Allow or deny operations against the resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroup

type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroupsMeta

type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type MemberPoliciesResourceGroup

type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup

A group of scoped resources.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsMeta

type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta

Attributes associated to the resource group.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScope

type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope

A scope is a combination of scope objects which provides additional context.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScopeObject

type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject

A scope object represents any resource that can have actions applied against invite.

This is an alias to an internal type.

type MemberPolicy

type MemberPolicy = shared.MemberPolicy

This is an alias to an internal type.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUser

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

type MigrationStep

type MigrationStep 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 to create Durable Object namespaces with SQLite from.
	NewSqliteClasses []string `json:"new_sqlite_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []MigrationStepRenamedClass `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 []MigrationStepTransferredClass `json:"transferred_classes"`
	JSON               migrationStepJSON               `json:"-"`
}

func (*MigrationStep) UnmarshalJSON

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

type MigrationStepParam

type MigrationStepParam 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 to create Durable Object namespaces with SQLite from.
	NewSqliteClasses param.Field[[]string] `json:"new_sqlite_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses param.Field[[]MigrationStepRenamedClassParam] `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[[]MigrationStepTransferredClassParam] `json:"transferred_classes"`
}

func (MigrationStepParam) MarshalJSON

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

type MigrationStepRenamedClass

type MigrationStepRenamedClass struct {
	From string                        `json:"from"`
	To   string                        `json:"to"`
	JSON migrationStepRenamedClassJSON `json:"-"`
}

func (*MigrationStepRenamedClass) UnmarshalJSON

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

type MigrationStepRenamedClassParam

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

func (MigrationStepRenamedClassParam) MarshalJSON

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

type MigrationStepTransferredClass

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

func (*MigrationStepTransferredClass) UnmarshalJSON

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

type MigrationStepTransferredClassParam

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

func (MigrationStepTransferredClassParam) MarshalJSON

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

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 RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

type RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

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 RoleParam

type RoleParam = shared.RoleParam

This is an alias to an internal type.

type RolePermissions

type RolePermissions = shared.RolePermissions

This is an alias to an internal type.

type RolePermissionsParam

type RolePermissionsParam = shared.RolePermissionsParam

This is an alias to an internal type.

type RouteDeleteParams

type RouteDeleteParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RouteDeleteResponse

type RouteDeleteResponse struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success RouteDeleteResponseSuccess `json:"success,required"`
	JSON    routeDeleteResponseJSON    `json:"-"`
}

func (*RouteDeleteResponse) UnmarshalJSON

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

type RouteDeleteResponseSuccess

type RouteDeleteResponseSuccess bool

Whether the API call was successful

const (
	RouteDeleteResponseSuccessTrue RouteDeleteResponseSuccess = true
)

func (RouteDeleteResponseSuccess) IsKnown

func (r RouteDeleteResponseSuccess) IsKnown() bool

type RouteGetParams

type RouteGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RouteGetResponse

type RouteGetResponse struct {
	// Identifier
	ID      string `json:"id,required"`
	Pattern string `json:"pattern,required"`
	// Name of the script, used in URLs and route configuration.
	Script string               `json:"script,required"`
	JSON   routeGetResponseJSON `json:"-"`
}

func (*RouteGetResponse) UnmarshalJSON

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

type RouteGetResponseEnvelope

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

func (*RouteGetResponseEnvelope) UnmarshalJSON

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

type RouteGetResponseEnvelopeSuccess

type RouteGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteGetResponseEnvelopeSuccessTrue RouteGetResponseEnvelopeSuccess = true
)

func (RouteGetResponseEnvelopeSuccess) IsKnown

type RouteListParams

type RouteListParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RouteListResponse

type RouteListResponse struct {
	// Identifier
	ID      string `json:"id,required"`
	Pattern string `json:"pattern,required"`
	// Name of the script, used in URLs and route configuration.
	Script string                `json:"script,required"`
	JSON   routeListResponseJSON `json:"-"`
}

func (*RouteListResponse) UnmarshalJSON

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

type RouteNewParams

type RouteNewParams struct {
	// Identifier
	ZoneID  param.Field[string] `path:"zone_id,required"`
	Pattern param.Field[string] `json:"pattern,required"`
	// Name of the script, used in URLs and route configuration.
	Script param.Field[string] `json:"script"`
}

func (RouteNewParams) MarshalJSON

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

type RouteNewResponse

type RouteNewResponse struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success RouteNewResponseSuccess `json:"success,required"`
	JSON    routeNewResponseJSON    `json:"-"`
}

func (*RouteNewResponse) UnmarshalJSON

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

type RouteNewResponseSuccess

type RouteNewResponseSuccess bool

Whether the API call was successful

const (
	RouteNewResponseSuccessTrue RouteNewResponseSuccess = true
)

func (RouteNewResponseSuccess) IsKnown

func (r RouteNewResponseSuccess) IsKnown() bool

type RouteService

type RouteService struct {
	Options []option.RequestOption
}

RouteService 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 NewRouteService method instead.

func NewRouteService

func NewRouteService(opts ...option.RequestOption) (r *RouteService)

NewRouteService 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 (*RouteService) Delete

func (r *RouteService) Delete(ctx context.Context, routeID string, body RouteDeleteParams, opts ...option.RequestOption) (res *RouteDeleteResponse, err error)

Deletes a route.

func (*RouteService) Get

func (r *RouteService) Get(ctx context.Context, routeID string, query RouteGetParams, opts ...option.RequestOption) (res *RouteGetResponse, err error)

Returns information about a route, including URL pattern and Worker.

func (*RouteService) List

Returns routes for a zone.

func (*RouteService) ListAutoPaging

Returns routes for a zone.

func (*RouteService) New

func (r *RouteService) New(ctx context.Context, params RouteNewParams, opts ...option.RequestOption) (res *RouteNewResponse, err error)

Creates a route that maps a URL pattern to a Worker.

func (*RouteService) Update

func (r *RouteService) Update(ctx context.Context, routeID string, params RouteUpdateParams, opts ...option.RequestOption) (res *RouteUpdateResponse, err error)

Updates the URL pattern or Worker associated with a route.

type RouteUpdateParams

type RouteUpdateParams struct {
	// Identifier
	ZoneID  param.Field[string] `path:"zone_id,required"`
	Pattern param.Field[string] `json:"pattern,required"`
	// Name of the script, used in URLs and route configuration.
	Script param.Field[string] `json:"script"`
}

func (RouteUpdateParams) MarshalJSON

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

type RouteUpdateResponse

type RouteUpdateResponse struct {
	// Identifier
	ID      string `json:"id,required"`
	Pattern string `json:"pattern,required"`
	// Name of the script, used in URLs and route configuration.
	Script string                  `json:"script,required"`
	JSON   routeUpdateResponseJSON `json:"-"`
}

func (*RouteUpdateResponse) UnmarshalJSON

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

type RouteUpdateResponseEnvelope

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

func (*RouteUpdateResponseEnvelope) UnmarshalJSON

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

type RouteUpdateResponseEnvelopeSuccess

type RouteUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteUpdateResponseEnvelopeSuccessTrue RouteUpdateResponseEnvelopeSuccess = true
)

func (RouteUpdateResponseEnvelopeSuccess) IsKnown

type Schedule

type Schedule struct {
	CreatedOn  string       `json:"created_on"`
	Cron       string       `json:"cron"`
	ModifiedOn string       `json:"modified_on"`
	JSON       scheduleJSON `json:"-"`
}

func (*Schedule) UnmarshalJSON

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

type ScheduleParam

type ScheduleParam struct {
	Cron param.Field[string] `json:"cron"`
}

func (ScheduleParam) MarshalJSON

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

type Script

type Script struct {
	// The id of the script in the Workers system. Usually the script name.
	ID string `json:"id"`
	// When the script was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Hashed script content, can be used in a If-None-Match header when updating.
	Etag string `json:"etag"`
	// Whether a Worker contains assets.
	HasAssets bool `json:"has_assets"`
	// Whether a Worker contains modules.
	HasModules bool `json:"has_modules"`
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// When the script was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Configuration for
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	Placement ScriptPlacement `json:"placement"`
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	PlacementMode ScriptPlacementMode `json:"placement_mode"`
	// Status of
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	PlacementStatus ScriptPlacementStatus `json:"placement_status"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers []ConsumerScript `json:"tail_consumers"`
	// Usage model for the Worker invocations.
	UsageModel ScriptUsageModel `json:"usage_model"`
	JSON       scriptJSON       `json:"-"`
}

func (*Script) UnmarshalJSON

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

type ScriptAssetService

type ScriptAssetService struct {
	Options []option.RequestOption
	Upload  *ScriptAssetUploadService
}

ScriptAssetService 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 NewScriptAssetService method instead.

func NewScriptAssetService

func NewScriptAssetService(opts ...option.RequestOption) (r *ScriptAssetService)

NewScriptAssetService 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 ScriptAssetUploadNewParams

type ScriptAssetUploadNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// A manifest ([path]: {hash, size}) map of files to upload. As an example,
	// `/blog/hello-world.html` would be a valid path key.
	Manifest param.Field[map[string]ScriptAssetUploadNewParamsManifest] `json:"manifest"`
}

func (ScriptAssetUploadNewParams) MarshalJSON

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

type ScriptAssetUploadNewParamsManifest

type ScriptAssetUploadNewParamsManifest struct {
	// The hash of the file.
	Hash param.Field[string] `json:"hash"`
	// The size of the file in bytes.
	Size param.Field[int64] `json:"size"`
}

func (ScriptAssetUploadNewParamsManifest) MarshalJSON

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

type ScriptAssetUploadNewResponse

type ScriptAssetUploadNewResponse struct {
	// The requests to make to upload assets.
	Buckets [][]string `json:"buckets"`
	// A JWT to use as authentication for uploading assets.
	JWT  string                           `json:"jwt"`
	JSON scriptAssetUploadNewResponseJSON `json:"-"`
}

func (*ScriptAssetUploadNewResponse) UnmarshalJSON

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

type ScriptAssetUploadNewResponseEnvelope

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

func (*ScriptAssetUploadNewResponseEnvelope) UnmarshalJSON

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

type ScriptAssetUploadNewResponseEnvelopeSuccess

type ScriptAssetUploadNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptAssetUploadNewResponseEnvelopeSuccessTrue ScriptAssetUploadNewResponseEnvelopeSuccess = true
)

func (ScriptAssetUploadNewResponseEnvelopeSuccess) IsKnown

type ScriptAssetUploadService

type ScriptAssetUploadService struct {
	Options []option.RequestOption
}

ScriptAssetUploadService 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 NewScriptAssetUploadService method instead.

func NewScriptAssetUploadService

func NewScriptAssetUploadService(opts ...option.RequestOption) (r *ScriptAssetUploadService)

NewScriptAssetUploadService 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 (*ScriptAssetUploadService) New

Start uploading a collection of assets for use in a Worker version. To learn more about the direct uploads of assets, see https://developers.cloudflare.com/workers/static-assets/direct-upload/

type ScriptContentGetParams

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

type ScriptContentService

type ScriptContentService struct {
	Options []option.RequestOption
}

ScriptContentService 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 NewScriptContentService method instead.

func NewScriptContentService

func NewScriptContentService(opts ...option.RequestOption) (r *ScriptContentService)

NewScriptContentService 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 (*ScriptContentService) Get

func (r *ScriptContentService) Get(ctx context.Context, scriptName string, query ScriptContentGetParams, opts ...option.RequestOption) (res *http.Response, err error)

Fetch script content only

func (*ScriptContentService) Update

func (r *ScriptContentService) Update(ctx context.Context, scriptName string, params ScriptContentUpdateParams, opts ...option.RequestOption) (res *Script, err error)

Put script content without touching config or metadata

type ScriptContentUpdateParams

type ScriptContentUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// JSON encoded metadata about the uploaded parts and Worker configuration.
	Metadata               param.Field[WorkerMetadataParam] `json:"metadata,required"`
	CfWorkerBodyPart       param.Field[string]              `header:"CF-WORKER-BODY-PART"`
	CfWorkerMainModulePart param.Field[string]              `header:"CF-WORKER-MAIN-MODULE-PART"`
}

func (ScriptContentUpdateParams) MarshalMultipart

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

type ScriptContentUpdateResponseEnvelope

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

func (*ScriptContentUpdateResponseEnvelope) UnmarshalJSON

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

type ScriptContentUpdateResponseEnvelopeSuccess

type ScriptContentUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptContentUpdateResponseEnvelopeSuccessTrue ScriptContentUpdateResponseEnvelopeSuccess = true
)

func (ScriptContentUpdateResponseEnvelopeSuccess) IsKnown

type ScriptDeleteParams

type ScriptDeleteParams 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 (ScriptDeleteParams) URLQuery

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

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

type ScriptDeploymentGetParams

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

type ScriptDeploymentGetResponse

type ScriptDeploymentGetResponse struct {
	Deployments []ScriptDeploymentGetResponseDeployment `json:"deployments"`
	JSON        scriptDeploymentGetResponseJSON         `json:"-"`
}

func (*ScriptDeploymentGetResponse) UnmarshalJSON

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

type ScriptDeploymentGetResponseDeployment

type ScriptDeploymentGetResponseDeployment struct {
	Strategy    ScriptDeploymentGetResponseDeploymentsStrategy  `json:"strategy,required"`
	Versions    []ScriptDeploymentGetResponseDeploymentsVersion `json:"versions,required"`
	ID          string                                          `json:"id"`
	Annotations Deployment                                      `json:"annotations"`
	AuthorEmail string                                          `json:"author_email"`
	CreatedOn   string                                          `json:"created_on"`
	Source      string                                          `json:"source"`
	JSON        scriptDeploymentGetResponseDeploymentJSON       `json:"-"`
}

func (*ScriptDeploymentGetResponseDeployment) UnmarshalJSON

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

type ScriptDeploymentGetResponseDeploymentsStrategy

type ScriptDeploymentGetResponseDeploymentsStrategy string
const (
	ScriptDeploymentGetResponseDeploymentsStrategyPercentage ScriptDeploymentGetResponseDeploymentsStrategy = "percentage"
)

func (ScriptDeploymentGetResponseDeploymentsStrategy) IsKnown

type ScriptDeploymentGetResponseDeploymentsVersion

type ScriptDeploymentGetResponseDeploymentsVersion struct {
	Percentage float64                                           `json:"percentage,required"`
	VersionID  string                                            `json:"version_id,required"`
	JSON       scriptDeploymentGetResponseDeploymentsVersionJSON `json:"-"`
}

func (*ScriptDeploymentGetResponseDeploymentsVersion) UnmarshalJSON

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

type ScriptDeploymentGetResponseEnvelope

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

func (*ScriptDeploymentGetResponseEnvelope) UnmarshalJSON

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

type ScriptDeploymentGetResponseEnvelopeSuccess

type ScriptDeploymentGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptDeploymentGetResponseEnvelopeSuccessTrue ScriptDeploymentGetResponseEnvelopeSuccess = true
)

func (ScriptDeploymentGetResponseEnvelopeSuccess) IsKnown

type ScriptDeploymentNewParams

type ScriptDeploymentNewParams struct {
	// Identifier
	AccountID param.Field[string]                             `path:"account_id,required"`
	Strategy  param.Field[ScriptDeploymentNewParamsStrategy]  `json:"strategy,required"`
	Versions  param.Field[[]ScriptDeploymentNewParamsVersion] `json:"versions,required"`
	// If set to true, the deployment will be created even if normally blocked by
	// something such rolling back to an older version when a secret has changed.
	Force       param.Field[bool]            `query:"force"`
	Annotations param.Field[DeploymentParam] `json:"annotations"`
}

func (ScriptDeploymentNewParams) MarshalJSON

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

func (ScriptDeploymentNewParams) URLQuery

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

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

type ScriptDeploymentNewParamsStrategy

type ScriptDeploymentNewParamsStrategy string
const (
	ScriptDeploymentNewParamsStrategyPercentage ScriptDeploymentNewParamsStrategy = "percentage"
)

func (ScriptDeploymentNewParamsStrategy) IsKnown

type ScriptDeploymentNewParamsVersion

type ScriptDeploymentNewParamsVersion struct {
	Percentage param.Field[float64] `json:"percentage,required"`
	VersionID  param.Field[string]  `json:"version_id,required"`
}

func (ScriptDeploymentNewParamsVersion) MarshalJSON

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

type ScriptDeploymentNewResponse

type ScriptDeploymentNewResponse struct {
	Strategy    ScriptDeploymentNewResponseStrategy  `json:"strategy,required"`
	Versions    []ScriptDeploymentNewResponseVersion `json:"versions,required"`
	ID          string                               `json:"id"`
	Annotations Deployment                           `json:"annotations"`
	AuthorEmail string                               `json:"author_email"`
	CreatedOn   string                               `json:"created_on"`
	Source      string                               `json:"source"`
	JSON        scriptDeploymentNewResponseJSON      `json:"-"`
}

func (*ScriptDeploymentNewResponse) UnmarshalJSON

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

type ScriptDeploymentNewResponseEnvelope

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

func (*ScriptDeploymentNewResponseEnvelope) UnmarshalJSON

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

type ScriptDeploymentNewResponseEnvelopeSuccess

type ScriptDeploymentNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptDeploymentNewResponseEnvelopeSuccessTrue ScriptDeploymentNewResponseEnvelopeSuccess = true
)

func (ScriptDeploymentNewResponseEnvelopeSuccess) IsKnown

type ScriptDeploymentNewResponseStrategy

type ScriptDeploymentNewResponseStrategy string
const (
	ScriptDeploymentNewResponseStrategyPercentage ScriptDeploymentNewResponseStrategy = "percentage"
)

func (ScriptDeploymentNewResponseStrategy) IsKnown

type ScriptDeploymentNewResponseVersion

type ScriptDeploymentNewResponseVersion struct {
	Percentage float64                                `json:"percentage,required"`
	VersionID  string                                 `json:"version_id,required"`
	JSON       scriptDeploymentNewResponseVersionJSON `json:"-"`
}

func (*ScriptDeploymentNewResponseVersion) UnmarshalJSON

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

type ScriptDeploymentService

type ScriptDeploymentService struct {
	Options []option.RequestOption
}

ScriptDeploymentService 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 NewScriptDeploymentService method instead.

func NewScriptDeploymentService

func NewScriptDeploymentService(opts ...option.RequestOption) (r *ScriptDeploymentService)

NewScriptDeploymentService 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 (*ScriptDeploymentService) Get

List of Worker Deployments. The first deployment in the list is the latest deployment actively serving traffic.

func (*ScriptDeploymentService) New

Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) are deployed to traffic. A deployment can consist of one or two versions of a Worker.

type ScriptGetParams

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

type ScriptListParams

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

type ScriptPlacement

type ScriptPlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	Mode ScriptPlacementMode `json:"mode"`
	// Status of
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	Status ScriptPlacementStatus `json:"status"`
	JSON   scriptPlacementJSON   `json:"-"`
}

Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).

func (*ScriptPlacement) UnmarshalJSON

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

type ScriptPlacementMode

type ScriptPlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).

const (
	ScriptPlacementModeSmart ScriptPlacementMode = "smart"
)

func (ScriptPlacementMode) IsKnown

func (r ScriptPlacementMode) IsKnown() bool

type ScriptPlacementStatus

type ScriptPlacementStatus string

Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).

const (
	ScriptPlacementStatusSuccess                 ScriptPlacementStatus = "SUCCESS"
	ScriptPlacementStatusUnsupportedApplication  ScriptPlacementStatus = "UNSUPPORTED_APPLICATION"
	ScriptPlacementStatusInsufficientInvocations ScriptPlacementStatus = "INSUFFICIENT_INVOCATIONS"
)

func (ScriptPlacementStatus) IsKnown

func (r ScriptPlacementStatus) IsKnown() bool

type ScriptScheduleGetParams

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

type ScriptScheduleGetResponse

type ScriptScheduleGetResponse struct {
	Schedules []Schedule                    `json:"schedules"`
	JSON      scriptScheduleGetResponseJSON `json:"-"`
}

func (*ScriptScheduleGetResponse) UnmarshalJSON

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

type ScriptScheduleGetResponseEnvelope

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

func (*ScriptScheduleGetResponseEnvelope) UnmarshalJSON

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

type ScriptScheduleGetResponseEnvelopeSuccess

type ScriptScheduleGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptScheduleGetResponseEnvelopeSuccessTrue ScriptScheduleGetResponseEnvelopeSuccess = true
)

func (ScriptScheduleGetResponseEnvelopeSuccess) IsKnown

type ScriptScheduleService

type ScriptScheduleService struct {
	Options []option.RequestOption
}

ScriptScheduleService 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 NewScriptScheduleService method instead.

func NewScriptScheduleService

func NewScriptScheduleService(opts ...option.RequestOption) (r *ScriptScheduleService)

NewScriptScheduleService 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 (*ScriptScheduleService) Get

Fetches Cron Triggers for a Worker.

func (*ScriptScheduleService) Update

Updates Cron Triggers for a Worker.

type ScriptScheduleUpdateParams

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

func (ScriptScheduleUpdateParams) MarshalJSON

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

type ScriptScheduleUpdateResponse

type ScriptScheduleUpdateResponse struct {
	Schedules []Schedule                       `json:"schedules"`
	JSON      scriptScheduleUpdateResponseJSON `json:"-"`
}

func (*ScriptScheduleUpdateResponse) UnmarshalJSON

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

type ScriptScheduleUpdateResponseEnvelope

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

func (*ScriptScheduleUpdateResponseEnvelope) UnmarshalJSON

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

type ScriptScheduleUpdateResponseEnvelopeSuccess

type ScriptScheduleUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptScheduleUpdateResponseEnvelopeSuccessTrue ScriptScheduleUpdateResponseEnvelopeSuccess = true
)

func (ScriptScheduleUpdateResponseEnvelopeSuccess) IsKnown

type ScriptService

type ScriptService struct {
	Options     []option.RequestOption
	Assets      *ScriptAssetService
	Subdomain   *ScriptSubdomainService
	Schedules   *ScriptScheduleService
	Tail        *ScriptTailService
	Content     *ScriptContentService
	Settings    *ScriptSettingService
	Deployments *ScriptDeploymentService
	Versions    *ScriptVersionService
}

ScriptService 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 NewScriptService method instead.

func NewScriptService

func NewScriptService(opts ...option.RequestOption) (r *ScriptService)

NewScriptService 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 (*ScriptService) Delete

func (r *ScriptService) Delete(ctx context.Context, scriptName string, params ScriptDeleteParams, opts ...option.RequestOption) (err error)

Delete your worker. This call has no response body on a successful delete.

func (*ScriptService) Get

func (r *ScriptService) Get(ctx context.Context, scriptName string, query ScriptGetParams, opts ...option.RequestOption) (res *string, err error)

Fetch raw script content for your worker. Note this is the original script content, not JSON encoded.

func (*ScriptService) List

Fetch a list of uploaded workers.

func (*ScriptService) ListAutoPaging

Fetch a list of uploaded workers.

func (*ScriptService) Update

func (r *ScriptService) Update(ctx context.Context, scriptName string, params ScriptUpdateParams, opts ...option.RequestOption) (res *ScriptUpdateResponse, err error)

Upload a worker module. You can find more about the multipart metadata on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/.

type ScriptSetting

type ScriptSetting struct {
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// Observability settings for the Worker.
	Observability ScriptSettingObservability `json:"observability"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers []ConsumerScript  `json:"tail_consumers"`
	JSON          scriptSettingJSON `json:"-"`
}

func (*ScriptSetting) UnmarshalJSON

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

type ScriptSettingEditParams

type ScriptSettingEditParams struct {
	// Identifier
	AccountID     param.Field[string] `path:"account_id,required"`
	ScriptSetting ScriptSettingParam  `json:"script_setting,required"`
}

func (ScriptSettingEditParams) MarshalJSON

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

type ScriptSettingEditResponseEnvelope

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

func (*ScriptSettingEditResponseEnvelope) UnmarshalJSON

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

type ScriptSettingEditResponseEnvelopeSuccess

type ScriptSettingEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptSettingEditResponseEnvelopeSuccessTrue ScriptSettingEditResponseEnvelopeSuccess = true
)

func (ScriptSettingEditResponseEnvelopeSuccess) IsKnown

type ScriptSettingGetParams

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

type ScriptSettingGetResponseEnvelope

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

func (*ScriptSettingGetResponseEnvelope) UnmarshalJSON

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

type ScriptSettingGetResponseEnvelopeSuccess

type ScriptSettingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptSettingGetResponseEnvelopeSuccessTrue ScriptSettingGetResponseEnvelopeSuccess = true
)

func (ScriptSettingGetResponseEnvelopeSuccess) IsKnown

type ScriptSettingObservability

type ScriptSettingObservability struct {
	// Whether observability is enabled for the Worker.
	Enabled bool `json:"enabled,required"`
	// The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%).
	// Default is 1.
	HeadSamplingRate float64                        `json:"head_sampling_rate,nullable"`
	JSON             scriptSettingObservabilityJSON `json:"-"`
}

Observability settings for the Worker.

func (*ScriptSettingObservability) UnmarshalJSON

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

type ScriptSettingObservabilityParam

type ScriptSettingObservabilityParam struct {
	// Whether observability is enabled for the Worker.
	Enabled param.Field[bool] `json:"enabled,required"`
	// The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%).
	// Default is 1.
	HeadSamplingRate param.Field[float64] `json:"head_sampling_rate"`
}

Observability settings for the Worker.

func (ScriptSettingObservabilityParam) MarshalJSON

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

type ScriptSettingParam

type ScriptSettingParam struct {
	// Whether Logpush is turned on for the Worker.
	Logpush param.Field[bool] `json:"logpush"`
	// Observability settings for the Worker.
	Observability param.Field[ScriptSettingObservabilityParam] `json:"observability"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers param.Field[[]ConsumerScriptParam] `json:"tail_consumers"`
}

func (ScriptSettingParam) MarshalJSON

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

type ScriptSettingService

type ScriptSettingService struct {
	Options []option.RequestOption
}

ScriptSettingService 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 NewScriptSettingService method instead.

func NewScriptSettingService

func NewScriptSettingService(opts ...option.RequestOption) (r *ScriptSettingService)

NewScriptSettingService 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 (*ScriptSettingService) Edit

func (r *ScriptSettingService) Edit(ctx context.Context, scriptName string, params ScriptSettingEditParams, opts ...option.RequestOption) (res *ScriptSetting, err error)

Patch script-level settings when using [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions). Including but not limited to Logpush and Tail Consumers.

func (*ScriptSettingService) Get

func (r *ScriptSettingService) Get(ctx context.Context, scriptName string, query ScriptSettingGetParams, opts ...option.RequestOption) (res *ScriptSetting, err error)

Get script-level settings when using [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions). Includes Logpush and Tail Consumers.

type ScriptSubdomainGetParams

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

type ScriptSubdomainGetResponse

type ScriptSubdomainGetResponse struct {
	// Whether the Worker is available on the workers.dev subdomain.
	Enabled bool `json:"enabled"`
	// Whether the Worker's Preview URLs should be available on the workers.dev
	// subdomain.
	PreviewsEnabled bool                           `json:"previews_enabled"`
	JSON            scriptSubdomainGetResponseJSON `json:"-"`
}

func (*ScriptSubdomainGetResponse) UnmarshalJSON

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

type ScriptSubdomainNewParams

type ScriptSubdomainNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Whether the Worker should be available on the workers.dev subdomain.
	Enabled param.Field[bool] `json:"enabled,required"`
	// Whether the Worker's Preview URLs should be available on the workers.dev
	// subdomain.
	PreviewsEnabled param.Field[bool] `json:"previews_enabled"`
}

func (ScriptSubdomainNewParams) MarshalJSON

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

type ScriptSubdomainNewResponse

type ScriptSubdomainNewResponse struct {
	// Whether the Worker is available on the workers.dev subdomain.
	Enabled bool `json:"enabled"`
	// Whether the Worker's Preview URLs should be available on the workers.dev
	// subdomain.
	PreviewsEnabled bool                           `json:"previews_enabled"`
	JSON            scriptSubdomainNewResponseJSON `json:"-"`
}

func (*ScriptSubdomainNewResponse) UnmarshalJSON

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

type ScriptSubdomainService

type ScriptSubdomainService struct {
	Options []option.RequestOption
}

ScriptSubdomainService 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 NewScriptSubdomainService method instead.

func NewScriptSubdomainService

func NewScriptSubdomainService(opts ...option.RequestOption) (r *ScriptSubdomainService)

NewScriptSubdomainService 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 (*ScriptSubdomainService) Get

Get if the Worker is available on the workers.dev subdomain.

func (*ScriptSubdomainService) New

Enable or disable the Worker on the workers.dev subdomain.

type ScriptTailDeleteParams

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

type ScriptTailDeleteResponse

type ScriptTailDeleteResponse struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success ScriptTailDeleteResponseSuccess `json:"success,required"`
	JSON    scriptTailDeleteResponseJSON    `json:"-"`
}

func (*ScriptTailDeleteResponse) UnmarshalJSON

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

type ScriptTailDeleteResponseSuccess

type ScriptTailDeleteResponseSuccess bool

Whether the API call was successful

const (
	ScriptTailDeleteResponseSuccessTrue ScriptTailDeleteResponseSuccess = true
)

func (ScriptTailDeleteResponseSuccess) IsKnown

type ScriptTailGetParams

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

type ScriptTailGetResponse

type ScriptTailGetResponse struct {
	ID        string                    `json:"id"`
	ExpiresAt string                    `json:"expires_at"`
	URL       string                    `json:"url"`
	JSON      scriptTailGetResponseJSON `json:"-"`
}

func (*ScriptTailGetResponse) UnmarshalJSON

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

type ScriptTailGetResponseEnvelope

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

func (*ScriptTailGetResponseEnvelope) UnmarshalJSON

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

type ScriptTailGetResponseEnvelopeSuccess

type ScriptTailGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptTailGetResponseEnvelopeSuccessTrue ScriptTailGetResponseEnvelopeSuccess = true
)

func (ScriptTailGetResponseEnvelopeSuccess) IsKnown

type ScriptTailNewParams

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

func (ScriptTailNewParams) MarshalJSON

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

type ScriptTailNewResponse

type ScriptTailNewResponse struct {
	ID        string                    `json:"id"`
	ExpiresAt string                    `json:"expires_at"`
	URL       string                    `json:"url"`
	JSON      scriptTailNewResponseJSON `json:"-"`
}

func (*ScriptTailNewResponse) UnmarshalJSON

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

type ScriptTailNewResponseEnvelope

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

func (*ScriptTailNewResponseEnvelope) UnmarshalJSON

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

type ScriptTailNewResponseEnvelopeSuccess

type ScriptTailNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptTailNewResponseEnvelopeSuccessTrue ScriptTailNewResponseEnvelopeSuccess = true
)

func (ScriptTailNewResponseEnvelopeSuccess) IsKnown

type ScriptTailService

type ScriptTailService struct {
	Options []option.RequestOption
}

ScriptTailService 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 NewScriptTailService method instead.

func NewScriptTailService

func NewScriptTailService(opts ...option.RequestOption) (r *ScriptTailService)

NewScriptTailService 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 (*ScriptTailService) Delete

func (r *ScriptTailService) Delete(ctx context.Context, scriptName string, id string, body ScriptTailDeleteParams, opts ...option.RequestOption) (res *ScriptTailDeleteResponse, err error)

Deletes a tail from a Worker.

func (*ScriptTailService) Get

func (r *ScriptTailService) Get(ctx context.Context, scriptName string, query ScriptTailGetParams, opts ...option.RequestOption) (res *ScriptTailGetResponse, err error)

Get list of tails currently deployed on a Worker.

func (*ScriptTailService) New

func (r *ScriptTailService) New(ctx context.Context, scriptName string, params ScriptTailNewParams, opts ...option.RequestOption) (res *ScriptTailNewResponse, err error)

Starts a tail that receives logs and exception from a Worker.

type ScriptUpdateParams

type ScriptUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// JSON encoded metadata about the uploaded parts and Worker configuration.
	Metadata param.Field[ScriptUpdateParamsMetadata] `json:"metadata,required"`
}

func (ScriptUpdateParams) MarshalJSON

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

type ScriptUpdateParamsMetadata

type ScriptUpdateParamsMetadata struct {
	// Configuration for assets within a Worker
	Assets param.Field[ScriptUpdateParamsMetadataAssets] `json:"assets"`
	// List of bindings attached to a Worker. You can find more about bindings on our
	// docs:
	// https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
	Bindings param.Field[[]ScriptUpdateParamsMetadataBindingUnion] `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"`
	// Retain assets which exist for a previously uploaded Worker version; used in lieu
	// of providing a completion token.
	KeepAssets param.Field[bool] `json:"keep_assets"`
	// 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[ScriptUpdateParamsMetadataMigrationsUnion] `json:"migrations"`
	// Observability settings for the Worker.
	Observability param.Field[ScriptUpdateParamsMetadataObservability] `json:"observability"`
	// Configuration for
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	Placement param.Field[ScriptUpdateParamsMetadataPlacement] `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[[]ConsumerScriptParam] `json:"tail_consumers"`
	// Usage model for the Worker invocations.
	UsageModel param.Field[ScriptUpdateParamsMetadataUsageModel] `json:"usage_model"`
}

JSON encoded metadata about the uploaded parts and Worker configuration.

func (ScriptUpdateParamsMetadata) MarshalJSON

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

type ScriptUpdateParamsMetadataAssets

type ScriptUpdateParamsMetadataAssets struct {
	// Configuration for assets within a Worker.
	Config param.Field[ScriptUpdateParamsMetadataAssetsConfig] `json:"config"`
	// Token provided upon successful upload of all files from a registered manifest.
	JWT param.Field[string] `json:"jwt"`
}

Configuration for assets within a Worker

func (ScriptUpdateParamsMetadataAssets) MarshalJSON

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

type ScriptUpdateParamsMetadataAssetsConfig

type ScriptUpdateParamsMetadataAssetsConfig struct {
	// Determines the redirects and rewrites of requests for HTML content.
	HTMLHandling param.Field[ScriptUpdateParamsMetadataAssetsConfigHTMLHandling] `json:"html_handling"`
	// Determines the response when a request does not match a static asset, and there
	// is no Worker script.
	NotFoundHandling param.Field[ScriptUpdateParamsMetadataAssetsConfigNotFoundHandling] `json:"not_found_handling"`
	// When true and the incoming request matches an asset, that will be served instead
	// of invoking the Worker script. When false, requests will always invoke the
	// Worker script.
	ServeDirectly param.Field[bool] `json:"serve_directly"`
}

Configuration for assets within a Worker.

func (ScriptUpdateParamsMetadataAssetsConfig) MarshalJSON

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

type ScriptUpdateParamsMetadataAssetsConfigHTMLHandling

type ScriptUpdateParamsMetadataAssetsConfigHTMLHandling string

Determines the redirects and rewrites of requests for HTML content.

const (
	ScriptUpdateParamsMetadataAssetsConfigHTMLHandlingAutoTrailingSlash  ScriptUpdateParamsMetadataAssetsConfigHTMLHandling = "auto-trailing-slash"
	ScriptUpdateParamsMetadataAssetsConfigHTMLHandlingForceTrailingSlash ScriptUpdateParamsMetadataAssetsConfigHTMLHandling = "force-trailing-slash"
	ScriptUpdateParamsMetadataAssetsConfigHTMLHandlingDropTrailingSlash  ScriptUpdateParamsMetadataAssetsConfigHTMLHandling = "drop-trailing-slash"
	ScriptUpdateParamsMetadataAssetsConfigHTMLHandlingNone               ScriptUpdateParamsMetadataAssetsConfigHTMLHandling = "none"
)

func (ScriptUpdateParamsMetadataAssetsConfigHTMLHandling) IsKnown

type ScriptUpdateParamsMetadataAssetsConfigNotFoundHandling

type ScriptUpdateParamsMetadataAssetsConfigNotFoundHandling string

Determines the response when a request does not match a static asset, and there is no Worker script.

const (
	ScriptUpdateParamsMetadataAssetsConfigNotFoundHandlingNone                  ScriptUpdateParamsMetadataAssetsConfigNotFoundHandling = "none"
	ScriptUpdateParamsMetadataAssetsConfigNotFoundHandling404Page               ScriptUpdateParamsMetadataAssetsConfigNotFoundHandling = "404-page"
	ScriptUpdateParamsMetadataAssetsConfigNotFoundHandlingSinglePageApplication ScriptUpdateParamsMetadataAssetsConfigNotFoundHandling = "single-page-application"
)

func (ScriptUpdateParamsMetadataAssetsConfigNotFoundHandling) IsKnown

type ScriptUpdateParamsMetadataBinding

type ScriptUpdateParamsMetadataBinding struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[string] `json:"type,required"`
	// Identifier of the D1 database to bind to.
	ID param.Field[string] `json:"id"`
	// R2 bucket to bind to.
	BucketName param.Field[string] `json:"bucket_name"`
	// Identifier of the certificate to bind to.
	CertificateID param.Field[string] `json:"certificate_id"`
	// The exported class name of the Durable Object.
	ClassName param.Field[string] `json:"class_name"`
	// The dataset name to bind to.
	Dataset param.Field[string] `json:"dataset"`
	// The environment of the script_name to bind to.
	Environment param.Field[string] `json:"environment"`
	// Name of the Vectorize index to bind to.
	IndexName param.Field[string] `json:"index_name"`
	// JSON data to use.
	Json param.Field[string] `json:"json"`
	// Namespace to bind to.
	Namespace param.Field[string] `json:"namespace"`
	// Namespace identifier tag.
	NamespaceID param.Field[string]      `json:"namespace_id"`
	Outbound    param.Field[interface{}] `json:"outbound"`
	// Name of the Queue to bind to.
	QueueName param.Field[string] `json:"queue_name"`
	// The script where the Durable Object is defined, if it is external to this
	// Worker.
	ScriptName param.Field[string] `json:"script_name"`
	// Name of Worker to bind to.
	Service param.Field[string] `json:"service"`
	// The text value to use.
	Text param.Field[string] `json:"text"`
}

A binding to allow the Worker to communicate with resources

func (ScriptUpdateParamsMetadataBinding) MarshalJSON

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

type ScriptUpdateParamsMetadataBindingUnion

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

A binding to allow the Worker to communicate with resources

Satisfied by workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindAny, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindAI, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngine, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssets, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRendering, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespace, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindDo, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdrive, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindJson, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespace, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERT, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainText, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueue, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecret, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindService, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumer, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorize, workers.ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadata, ScriptUpdateParamsMetadataBinding.

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAI

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAI struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindAIType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindAI) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAIType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAIType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindAITypeAI ScriptUpdateParamsMetadataBindingsWorkersBindingKindAIType = "ai"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindAIType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngine

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngine struct {
	// The dataset name to bind to.
	Dataset param.Field[string] `json:"dataset,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngine) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineTypeAnalyticsEngine ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType = "analytics_engine"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAny

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAny struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type        param.Field[string]    `json:"type,required"`
	ExtraFields map[string]interface{} `json:"-,extras"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindAny) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssets

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssets struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssets) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsTypeAssets ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsType = "assets"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRendering

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRendering struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRendering) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingTypeBrowserRendering ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingType = "browser_rendering"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1 struct {
	// Identifier of the D1 database to bind to.
	ID param.Field[string] `json:"id,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1Type] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1Type

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1Type string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1TypeD1 ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1Type = "d1"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1Type) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespace

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespace struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// Namespace to bind to.
	Namespace param.Field[string] `json:"namespace,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType] `json:"type,required"`
	// Outbound worker.
	Outbound param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound] `json:"outbound"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespace) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound 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[ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker] `json:"worker"`
}

Outbound worker.

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker 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 (ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceTypeDispatchNamespace ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType = "dispatch_namespace"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDo

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

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindDo) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoTypeDurableObjectNamespace ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoType = "durable_object_namespace"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdrive

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdrive struct {
	// Identifier of the Hyperdrive connection to bind to.
	ID param.Field[string] `json:"id,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdrive) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveTypeHyperdrive ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveType = "hyperdrive"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindJson

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindJson struct {
	// JSON data to use.
	Json param.Field[string] `json:"json,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindJson) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonTypeJson ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonType = "json"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespace

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespace struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// Namespace identifier tag.
	NamespaceID param.Field[string] `json:"namespace_id,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespace) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceTypeKVNamespace ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceType = "kv_namespace"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERT

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERT struct {
	// Identifier of the certificate to bind to.
	CertificateID param.Field[string] `json:"certificate_id,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERT) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTTypeMTLSCertificate ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTType = "mtls_certificate"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainText

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainText struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The text value to use.
	Text param.Field[string] `json:"text,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainText) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextTypePlainText ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextType = "plain_text"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueue

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueue struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// Name of the Queue to bind to.
	QueueName param.Field[string] `json:"queue_name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueue) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueTypeQueue ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueType = "queue"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2 struct {
	// R2 bucket to bind to.
	BucketName param.Field[string] `json:"bucket_name,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2Type] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2Type

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2Type string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2TypeR2Bucket ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2Type = "r2_bucket"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2Type) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecret

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecret struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The secret value to use.
	Text param.Field[string] `json:"text,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecret) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretTypeSecretText ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretType = "secret_text"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindService

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindService struct {
	// Optional environment if the Worker utilizes one.
	Environment param.Field[string] `json:"environment,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// Name of Worker to bind to.
	Service param.Field[string] `json:"service,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindService) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceTypeService ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceType = "service"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumer

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumer struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// Name of Tail Worker to bind to.
	Service param.Field[string] `json:"service,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumer) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerTypeTailConsumer ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerType = "tail_consumer"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorize

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorize struct {
	// Name of the Vectorize index to bind to.
	IndexName param.Field[string] `json:"index_name,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorize) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeTypeVectorize ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeType = "vectorize"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeType) IsKnown

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadata

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadata struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataType] `json:"type,required"`
}

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadata) MarshalJSON

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataType

type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataType string

The kind of resource that the binding provides.

const (
	ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataTypeVersionMetadata ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataType = "version_metadata"
)

func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataType) IsKnown

type ScriptUpdateParamsMetadataMigrations

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

Migrations to apply for Durable Objects associated with this Worker.

func (ScriptUpdateParamsMetadataMigrations) MarshalJSON

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

type ScriptUpdateParamsMetadataMigrationsUnion

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

Migrations to apply for Durable Objects associated with this Worker.

Satisfied by workers.SingleStepMigrationParam, workers.ScriptUpdateParamsMetadataMigrationsWorkersMultipleStepMigrations, ScriptUpdateParamsMetadataMigrations.

type ScriptUpdateParamsMetadataMigrationsWorkersMultipleStepMigrations

type ScriptUpdateParamsMetadataMigrationsWorkersMultipleStepMigrations 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[[]MigrationStepParam] `json:"steps"`
}

func (ScriptUpdateParamsMetadataMigrationsWorkersMultipleStepMigrations) MarshalJSON

type ScriptUpdateParamsMetadataObservability

type ScriptUpdateParamsMetadataObservability struct {
	// Whether observability is enabled for the Worker.
	Enabled param.Field[bool] `json:"enabled,required"`
	// The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%).
	// Default is 1.
	HeadSamplingRate param.Field[float64] `json:"head_sampling_rate"`
}

Observability settings for the Worker.

func (ScriptUpdateParamsMetadataObservability) MarshalJSON

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

type ScriptUpdateParamsMetadataPlacement

type ScriptUpdateParamsMetadataPlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	Mode param.Field[ScriptUpdateParamsMetadataPlacementMode] `json:"mode"`
}

Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).

func (ScriptUpdateParamsMetadataPlacement) MarshalJSON

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

type ScriptUpdateParamsMetadataPlacementMode

type ScriptUpdateParamsMetadataPlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).

const (
	ScriptUpdateParamsMetadataPlacementModeSmart ScriptUpdateParamsMetadataPlacementMode = "smart"
)

func (ScriptUpdateParamsMetadataPlacementMode) IsKnown

type ScriptUpdateParamsMetadataPlacementStatus

type ScriptUpdateParamsMetadataPlacementStatus string

Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).

const (
	ScriptUpdateParamsMetadataPlacementStatusSuccess                 ScriptUpdateParamsMetadataPlacementStatus = "SUCCESS"
	ScriptUpdateParamsMetadataPlacementStatusUnsupportedApplication  ScriptUpdateParamsMetadataPlacementStatus = "UNSUPPORTED_APPLICATION"
	ScriptUpdateParamsMetadataPlacementStatusInsufficientInvocations ScriptUpdateParamsMetadataPlacementStatus = "INSUFFICIENT_INVOCATIONS"
)

func (ScriptUpdateParamsMetadataPlacementStatus) IsKnown

type ScriptUpdateParamsMetadataUsageModel

type ScriptUpdateParamsMetadataUsageModel string

Usage model for the Worker invocations.

const (
	ScriptUpdateParamsMetadataUsageModelStandard ScriptUpdateParamsMetadataUsageModel = "standard"
)

func (ScriptUpdateParamsMetadataUsageModel) IsKnown

type ScriptUpdateResponse

type ScriptUpdateResponse struct {
	// The id of the script in the Workers system. Usually the script name.
	ID string `json:"id"`
	// When the script was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Hashed script content, can be used in a If-None-Match header when updating.
	Etag string `json:"etag"`
	// Whether a Worker contains assets.
	HasAssets bool `json:"has_assets"`
	// Whether a Worker contains modules.
	HasModules bool `json:"has_modules"`
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// When the script was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Configuration for
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	Placement ScriptUpdateResponsePlacement `json:"placement"`
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	PlacementMode ScriptUpdateResponsePlacementMode `json:"placement_mode"`
	// Status of
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	PlacementStatus ScriptUpdateResponsePlacementStatus `json:"placement_status"`
	StartupTimeMs   int64                               `json:"startup_time_ms"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers []ConsumerScript `json:"tail_consumers"`
	// Usage model for the Worker invocations.
	UsageModel ScriptUpdateResponseUsageModel `json:"usage_model"`
	JSON       scriptUpdateResponseJSON       `json:"-"`
}

func (*ScriptUpdateResponse) UnmarshalJSON

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

type ScriptUpdateResponseEnvelope

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

func (*ScriptUpdateResponseEnvelope) UnmarshalJSON

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

type ScriptUpdateResponseEnvelopeSuccess

type ScriptUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptUpdateResponseEnvelopeSuccessTrue ScriptUpdateResponseEnvelopeSuccess = true
)

func (ScriptUpdateResponseEnvelopeSuccess) IsKnown

type ScriptUpdateResponsePlacement

type ScriptUpdateResponsePlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	Mode ScriptUpdateResponsePlacementMode `json:"mode"`
	// Status of
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	Status ScriptUpdateResponsePlacementStatus `json:"status"`
	JSON   scriptUpdateResponsePlacementJSON   `json:"-"`
}

Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).

func (*ScriptUpdateResponsePlacement) UnmarshalJSON

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

type ScriptUpdateResponsePlacementMode

type ScriptUpdateResponsePlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).

const (
	ScriptUpdateResponsePlacementModeSmart ScriptUpdateResponsePlacementMode = "smart"
)

func (ScriptUpdateResponsePlacementMode) IsKnown

type ScriptUpdateResponsePlacementStatus

type ScriptUpdateResponsePlacementStatus string

Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).

const (
	ScriptUpdateResponsePlacementStatusSuccess                 ScriptUpdateResponsePlacementStatus = "SUCCESS"
	ScriptUpdateResponsePlacementStatusUnsupportedApplication  ScriptUpdateResponsePlacementStatus = "UNSUPPORTED_APPLICATION"
	ScriptUpdateResponsePlacementStatusInsufficientInvocations ScriptUpdateResponsePlacementStatus = "INSUFFICIENT_INVOCATIONS"
)

func (ScriptUpdateResponsePlacementStatus) IsKnown

type ScriptUpdateResponseUsageModel

type ScriptUpdateResponseUsageModel string

Usage model for the Worker invocations.

const (
	ScriptUpdateResponseUsageModelStandard ScriptUpdateResponseUsageModel = "standard"
)

func (ScriptUpdateResponseUsageModel) IsKnown

type ScriptUsageModel

type ScriptUsageModel string

Usage model for the Worker invocations.

const (
	ScriptUsageModelStandard ScriptUsageModel = "standard"
)

func (ScriptUsageModel) IsKnown

func (r ScriptUsageModel) IsKnown() bool

type ScriptVersionGetParams

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

type ScriptVersionGetResponse

type ScriptVersionGetResponse struct {
	Resources interface{}                  `json:"resources,required"`
	ID        string                       `json:"id"`
	Metadata  interface{}                  `json:"metadata"`
	Number    float64                      `json:"number"`
	JSON      scriptVersionGetResponseJSON `json:"-"`
}

func (*ScriptVersionGetResponse) UnmarshalJSON

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

type ScriptVersionGetResponseEnvelope

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

func (*ScriptVersionGetResponseEnvelope) UnmarshalJSON

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

type ScriptVersionGetResponseEnvelopeSuccess

type ScriptVersionGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptVersionGetResponseEnvelopeSuccessTrue ScriptVersionGetResponseEnvelopeSuccess = true
)

func (ScriptVersionGetResponseEnvelopeSuccess) IsKnown

type ScriptVersionListParams

type ScriptVersionListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Only return versions that can be used in a deployment. Ignores pagination.
	Deployable param.Field[bool] `query:"deployable"`
	// Current page.
	Page param.Field[int64] `query:"page"`
	// Items per-page.
	PerPage param.Field[int64] `query:"per_page"`
}

func (ScriptVersionListParams) URLQuery

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

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

type ScriptVersionListResponse

type ScriptVersionListResponse struct {
	ID       string                        `json:"id"`
	Metadata interface{}                   `json:"metadata"`
	Number   float64                       `json:"number"`
	JSON     scriptVersionListResponseJSON `json:"-"`
}

func (*ScriptVersionListResponse) UnmarshalJSON

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

type ScriptVersionNewParams

type ScriptVersionNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// JSON encoded metadata about the uploaded parts and Worker configuration.
	Metadata param.Field[ScriptVersionNewParamsMetadata] `json:"metadata,required"`
}

func (ScriptVersionNewParams) MarshalMultipart

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

type ScriptVersionNewParamsMetadata

type ScriptVersionNewParamsMetadata struct {
	// 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, which
	// is required for Version Upload.
	MainModule  param.Field[string]                                    `json:"main_module,required"`
	Annotations param.Field[ScriptVersionNewParamsMetadataAnnotations] `json:"annotations"`
	// List of bindings attached to a Worker. You can find more about bindings on our
	// docs:
	// https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
	Bindings param.Field[[]ScriptVersionNewParamsMetadataBindingUnion] `json:"bindings"`
	// 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"`
	// Usage model for the Worker invocations.
	UsageModel param.Field[ScriptVersionNewParamsMetadataUsageModel] `json:"usage_model"`
}

JSON encoded metadata about the uploaded parts and Worker configuration.

func (ScriptVersionNewParamsMetadata) MarshalJSON

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

type ScriptVersionNewParamsMetadataAnnotations

type ScriptVersionNewParamsMetadataAnnotations struct {
	// Human-readable message about the version. Truncated to 100 bytes.
	WorkersMessage param.Field[string] `json:"workers/message"`
	// User-provided identifier for the version.
	WorkersTag param.Field[string] `json:"workers/tag"`
}

func (ScriptVersionNewParamsMetadataAnnotations) MarshalJSON

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

type ScriptVersionNewParamsMetadataBinding

type ScriptVersionNewParamsMetadataBinding struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[string] `json:"type,required"`
	// Identifier of the D1 database to bind to.
	ID param.Field[string] `json:"id"`
	// R2 bucket to bind to.
	BucketName param.Field[string] `json:"bucket_name"`
	// Identifier of the certificate to bind to.
	CertificateID param.Field[string] `json:"certificate_id"`
	// The exported class name of the Durable Object.
	ClassName param.Field[string] `json:"class_name"`
	// The dataset name to bind to.
	Dataset param.Field[string] `json:"dataset"`
	// The environment of the script_name to bind to.
	Environment param.Field[string] `json:"environment"`
	// Name of the Vectorize index to bind to.
	IndexName param.Field[string] `json:"index_name"`
	// JSON data to use.
	Json param.Field[string] `json:"json"`
	// Namespace to bind to.
	Namespace param.Field[string] `json:"namespace"`
	// Namespace identifier tag.
	NamespaceID param.Field[string]      `json:"namespace_id"`
	Outbound    param.Field[interface{}] `json:"outbound"`
	// Name of the Queue to bind to.
	QueueName param.Field[string] `json:"queue_name"`
	// The script where the Durable Object is defined, if it is external to this
	// Worker.
	ScriptName param.Field[string] `json:"script_name"`
	// Name of Worker to bind to.
	Service param.Field[string] `json:"service"`
	// The text value to use.
	Text param.Field[string] `json:"text"`
}

A binding to allow the Worker to communicate with resources

func (ScriptVersionNewParamsMetadataBinding) MarshalJSON

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

type ScriptVersionNewParamsMetadataBindingUnion

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

A binding to allow the Worker to communicate with resources

Satisfied by workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAny, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAI, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngine, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssets, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRendering, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespace, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDo, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdrive, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJson, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespace, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERT, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainText, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueue, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecret, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindService, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumer, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorize, workers.ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadata, ScriptVersionNewParamsMetadataBinding.

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAI

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAI struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAIType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAI) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAIType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAIType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAITypeAI ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAIType = "ai"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAIType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngine

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngine struct {
	// The dataset name to bind to.
	Dataset param.Field[string] `json:"dataset,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngine) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineTypeAnalyticsEngine ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType = "analytics_engine"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAny

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAny struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type        param.Field[string]    `json:"type,required"`
	ExtraFields map[string]interface{} `json:"-,extras"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAny) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssets

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssets struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssets) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsTypeAssets ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsType = "assets"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRendering

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRendering struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRendering) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingTypeBrowserRendering ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingType = "browser_rendering"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1 struct {
	// Identifier of the D1 database to bind to.
	ID param.Field[string] `json:"id,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1Type] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1Type

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1Type string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1TypeD1 ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1Type = "d1"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1Type) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespace

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespace struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// Namespace to bind to.
	Namespace param.Field[string] `json:"namespace,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType] `json:"type,required"`
	// Outbound worker.
	Outbound param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound] `json:"outbound"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespace) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound 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[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker] `json:"worker"`
}

Outbound worker.

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker 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 (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceTypeDispatchNamespace ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType = "dispatch_namespace"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDo

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

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDo) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoTypeDurableObjectNamespace ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoType = "durable_object_namespace"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdrive

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdrive struct {
	// Identifier of the Hyperdrive connection to bind to.
	ID param.Field[string] `json:"id,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdrive) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveTypeHyperdrive ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveType = "hyperdrive"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJson

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJson struct {
	// JSON data to use.
	Json param.Field[string] `json:"json,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJson) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonTypeJson ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonType = "json"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespace

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespace struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// Namespace identifier tag.
	NamespaceID param.Field[string] `json:"namespace_id,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespace) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceTypeKVNamespace ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceType = "kv_namespace"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERT

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERT struct {
	// Identifier of the certificate to bind to.
	CertificateID param.Field[string] `json:"certificate_id,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERT) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTTypeMTLSCertificate ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTType = "mtls_certificate"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainText

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainText struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The text value to use.
	Text param.Field[string] `json:"text,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainText) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextTypePlainText ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextType = "plain_text"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueue

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueue struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// Name of the Queue to bind to.
	QueueName param.Field[string] `json:"queue_name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueue) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueTypeQueue ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueType = "queue"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2 struct {
	// R2 bucket to bind to.
	BucketName param.Field[string] `json:"bucket_name,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2Type] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2Type

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2Type string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2TypeR2Bucket ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2Type = "r2_bucket"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2Type) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecret

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecret struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The secret value to use.
	Text param.Field[string] `json:"text,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecret) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretTypeSecretText ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretType = "secret_text"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindService

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindService struct {
	// Optional environment if the Worker utilizes one.
	Environment param.Field[string] `json:"environment,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// Name of Worker to bind to.
	Service param.Field[string] `json:"service,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindService) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceTypeService ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceType = "service"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumer

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumer struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// Name of Tail Worker to bind to.
	Service param.Field[string] `json:"service,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumer) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerTypeTailConsumer ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerType = "tail_consumer"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorize

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorize struct {
	// Name of the Vectorize index to bind to.
	IndexName param.Field[string] `json:"index_name,required"`
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorize) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeTypeVectorize ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeType = "vectorize"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeType) IsKnown

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadata

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadata struct {
	// A JavaScript variable name for the binding.
	Name param.Field[string] `json:"name,required"`
	// The kind of resource that the binding provides.
	Type param.Field[ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataType] `json:"type,required"`
}

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadata) MarshalJSON

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataType

type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataType string

The kind of resource that the binding provides.

const (
	ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataTypeVersionMetadata ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataType = "version_metadata"
)

func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataType) IsKnown

type ScriptVersionNewParamsMetadataUsageModel

type ScriptVersionNewParamsMetadataUsageModel string

Usage model for the Worker invocations.

const (
	ScriptVersionNewParamsMetadataUsageModelStandard ScriptVersionNewParamsMetadataUsageModel = "standard"
)

func (ScriptVersionNewParamsMetadataUsageModel) IsKnown

type ScriptVersionNewResponse

type ScriptVersionNewResponse struct {
	Resources     interface{}                  `json:"resources,required"`
	ID            string                       `json:"id"`
	Metadata      interface{}                  `json:"metadata"`
	Number        float64                      `json:"number"`
	StartupTimeMs int64                        `json:"startup_time_ms"`
	JSON          scriptVersionNewResponseJSON `json:"-"`
}

func (*ScriptVersionNewResponse) UnmarshalJSON

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

type ScriptVersionNewResponseEnvelope

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

func (*ScriptVersionNewResponseEnvelope) UnmarshalJSON

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

type ScriptVersionNewResponseEnvelopeSuccess

type ScriptVersionNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptVersionNewResponseEnvelopeSuccessTrue ScriptVersionNewResponseEnvelopeSuccess = true
)

func (ScriptVersionNewResponseEnvelopeSuccess) IsKnown

type ScriptVersionService

type ScriptVersionService struct {
	Options []option.RequestOption
}

ScriptVersionService 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 NewScriptVersionService method instead.

func NewScriptVersionService

func NewScriptVersionService(opts ...option.RequestOption) (r *ScriptVersionService)

NewScriptVersionService 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 (*ScriptVersionService) Get

func (r *ScriptVersionService) Get(ctx context.Context, scriptName string, versionID string, query ScriptVersionGetParams, opts ...option.RequestOption) (res *ScriptVersionGetResponse, err error)

Get Version Detail

func (*ScriptVersionService) List

List of Worker Versions. The first version in the list is the latest version.

func (*ScriptVersionService) ListAutoPaging

List of Worker Versions. The first version in the list is the latest version.

func (*ScriptVersionService) New

Upload a Worker Version without deploying to Cloudflare's network. You can find more about the multipart metadata on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/.

type SingleStepMigration

type SingleStepMigration 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 to create Durable Object namespaces with SQLite from.
	NewSqliteClasses []string `json:"new_sqlite_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 []SingleStepMigrationRenamedClass `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 []SingleStepMigrationTransferredClass `json:"transferred_classes"`
	JSON               singleStepMigrationJSON               `json:"-"`
}

A single set of migrations to apply.

func (SingleStepMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations

func (r SingleStepMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations()

func (SingleStepMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations

func (r SingleStepMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations()

func (*SingleStepMigration) UnmarshalJSON

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

type SingleStepMigrationParam

type SingleStepMigrationParam 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 to create Durable Object namespaces with SQLite from.
	NewSqliteClasses param.Field[[]string] `json:"new_sqlite_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[[]SingleStepMigrationRenamedClassParam] `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[[]SingleStepMigrationTransferredClassParam] `json:"transferred_classes"`
}

A single set of migrations to apply.

func (SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion

func (r SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion()

func (SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsMetadataMigrationsUnion

func (r SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsMetadataMigrationsUnion()

func (SingleStepMigrationParam) MarshalJSON

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

type SingleStepMigrationRenamedClass

type SingleStepMigrationRenamedClass struct {
	From string                              `json:"from"`
	To   string                              `json:"to"`
	JSON singleStepMigrationRenamedClassJSON `json:"-"`
}

func (*SingleStepMigrationRenamedClass) UnmarshalJSON

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

type SingleStepMigrationRenamedClassParam

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

func (SingleStepMigrationRenamedClassParam) MarshalJSON

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

type SingleStepMigrationTransferredClass

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

func (*SingleStepMigrationTransferredClass) UnmarshalJSON

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

type SingleStepMigrationTransferredClassParam

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

func (SingleStepMigrationTransferredClassParam) MarshalJSON

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

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type SubdomainGetParams

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

type SubdomainGetResponse

type SubdomainGetResponse struct {
	Subdomain string                   `json:"subdomain"`
	JSON      subdomainGetResponseJSON `json:"-"`
}

func (*SubdomainGetResponse) UnmarshalJSON

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

type SubdomainGetResponseEnvelope

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

func (*SubdomainGetResponseEnvelope) UnmarshalJSON

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

type SubdomainGetResponseEnvelopeSuccess

type SubdomainGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SubdomainGetResponseEnvelopeSuccessTrue SubdomainGetResponseEnvelopeSuccess = true
)

func (SubdomainGetResponseEnvelopeSuccess) IsKnown

type SubdomainService

type SubdomainService struct {
	Options []option.RequestOption
}

SubdomainService 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 NewSubdomainService method instead.

func NewSubdomainService

func NewSubdomainService(opts ...option.RequestOption) (r *SubdomainService)

NewSubdomainService 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 (*SubdomainService) Get

Returns a Workers subdomain for an account.

func (*SubdomainService) Update

Creates a Workers subdomain for an account.

type SubdomainUpdateParams

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

func (SubdomainUpdateParams) MarshalJSON

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

type SubdomainUpdateResponse

type SubdomainUpdateResponse struct {
	Subdomain string                      `json:"subdomain"`
	JSON      subdomainUpdateResponseJSON `json:"-"`
}

func (*SubdomainUpdateResponse) UnmarshalJSON

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

type SubdomainUpdateResponseEnvelope

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

func (*SubdomainUpdateResponseEnvelope) UnmarshalJSON

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

type SubdomainUpdateResponseEnvelopeSuccess

type SubdomainUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SubdomainUpdateResponseEnvelopeSuccessTrue SubdomainUpdateResponseEnvelopeSuccess = true
)

func (SubdomainUpdateResponseEnvelopeSuccess) IsKnown

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type Token

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenStatus

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenValue

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

type WorkerMetadataParam

type WorkerMetadataParam 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 (WorkerMetadataParam) MarshalJSON

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

type WorkerService

type WorkerService struct {
	Options         []option.RequestOption
	Routes          *RouteService
	Assets          *AssetService
	Scripts         *ScriptService
	AccountSettings *AccountSettingService
	Domains         *DomainService
	Subdomains      *SubdomainService
}

WorkerService 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 NewWorkerService method instead.

func NewWorkerService

func NewWorkerService(opts ...option.RequestOption) (r *WorkerService)

NewWorkerService 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