Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AccountSettingGetParams
- type AccountSettingGetResponse
- type AccountSettingGetResponseEnvelope
- type AccountSettingGetResponseEnvelopeSuccess
- type AccountSettingService
- type AccountSettingUpdateParams
- type AccountSettingUpdateResponse
- type AccountSettingUpdateResponseEnvelope
- type AccountSettingUpdateResponseEnvelopeSuccess
- type AssetService
- type AssetUploadNewParams
- type AssetUploadNewParamsBase64
- type AssetUploadNewResponse
- type AssetUploadNewResponseEnvelope
- type AssetUploadNewResponseEnvelopeSuccess
- type AssetUploadService
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type ConsumerScript
- type ConsumerScriptParam
- type Deployment
- type DeploymentParam
- type Domain
- type DomainDeleteParams
- type DomainGetParams
- type DomainGetResponseEnvelope
- type DomainGetResponseEnvelopeSuccess
- type DomainListParams
- type DomainService
- func (r *DomainService) Delete(ctx context.Context, domainID string, body DomainDeleteParams, ...) (err error)
- func (r *DomainService) Get(ctx context.Context, domainID string, query DomainGetParams, ...) (res *Domain, err error)
- func (r *DomainService) List(ctx context.Context, params DomainListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Domain], err error)
- func (r *DomainService) ListAutoPaging(ctx context.Context, params DomainListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Domain]
- func (r *DomainService) Update(ctx context.Context, params DomainUpdateParams, opts ...option.RequestOption) (res *Domain, err error)
- type DomainUpdateParams
- type DomainUpdateResponseEnvelope
- type DomainUpdateResponseEnvelopeSuccess
- type Error
- type ErrorData
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type MigrationStep
- type MigrationStepParam
- type MigrationStepRenamedClass
- type MigrationStepRenamedClassParam
- type MigrationStepTransferredClass
- type MigrationStepTransferredClassParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RatePlan
- type RatePlanParam
- type ResponseInfo
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type RouteDeleteParams
- type RouteDeleteResponse
- type RouteDeleteResponseSuccess
- type RouteGetParams
- type RouteGetResponse
- type RouteGetResponseEnvelope
- type RouteGetResponseEnvelopeSuccess
- type RouteListParams
- type RouteListResponse
- type RouteNewParams
- type RouteNewResponse
- type RouteNewResponseSuccess
- type RouteService
- func (r *RouteService) Delete(ctx context.Context, routeID string, body RouteDeleteParams, ...) (res *RouteDeleteResponse, err error)
- func (r *RouteService) Get(ctx context.Context, routeID string, query RouteGetParams, ...) (res *RouteGetResponse, err error)
- func (r *RouteService) List(ctx context.Context, query RouteListParams, opts ...option.RequestOption) (res *pagination.SinglePage[RouteListResponse], err error)
- func (r *RouteService) ListAutoPaging(ctx context.Context, query RouteListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[RouteListResponse]
- func (r *RouteService) New(ctx context.Context, params RouteNewParams, opts ...option.RequestOption) (res *RouteNewResponse, err error)
- func (r *RouteService) Update(ctx context.Context, routeID string, params RouteUpdateParams, ...) (res *RouteUpdateResponse, err error)
- type RouteUpdateParams
- type RouteUpdateResponse
- type RouteUpdateResponseEnvelope
- type RouteUpdateResponseEnvelopeSuccess
- type Schedule
- type ScheduleParam
- type Script
- type ScriptAssetService
- type ScriptAssetUploadNewParams
- type ScriptAssetUploadNewParamsManifest
- type ScriptAssetUploadNewResponse
- type ScriptAssetUploadNewResponseEnvelope
- type ScriptAssetUploadNewResponseEnvelopeSuccess
- type ScriptAssetUploadService
- type ScriptContentGetParams
- type ScriptContentService
- type ScriptContentUpdateParams
- type ScriptContentUpdateResponseEnvelope
- type ScriptContentUpdateResponseEnvelopeSuccess
- type ScriptDeleteParams
- type ScriptDeploymentGetParams
- type ScriptDeploymentGetResponse
- type ScriptDeploymentGetResponseDeployment
- type ScriptDeploymentGetResponseDeploymentsStrategy
- type ScriptDeploymentGetResponseDeploymentsVersion
- type ScriptDeploymentGetResponseEnvelope
- type ScriptDeploymentGetResponseEnvelopeSuccess
- type ScriptDeploymentNewParams
- type ScriptDeploymentNewParamsStrategy
- type ScriptDeploymentNewParamsVersion
- type ScriptDeploymentNewResponse
- type ScriptDeploymentNewResponseEnvelope
- type ScriptDeploymentNewResponseEnvelopeSuccess
- type ScriptDeploymentNewResponseStrategy
- type ScriptDeploymentNewResponseVersion
- type ScriptDeploymentService
- func (r *ScriptDeploymentService) Get(ctx context.Context, scriptName string, query ScriptDeploymentGetParams, ...) (res *ScriptDeploymentGetResponse, err error)
- func (r *ScriptDeploymentService) New(ctx context.Context, scriptName string, params ScriptDeploymentNewParams, ...) (res *ScriptDeploymentNewResponse, err error)
- type ScriptGetParams
- type ScriptListParams
- type ScriptPlacement
- type ScriptPlacementMode
- type ScriptPlacementStatus
- type ScriptScheduleGetParams
- type ScriptScheduleGetResponse
- type ScriptScheduleGetResponseEnvelope
- type ScriptScheduleGetResponseEnvelopeSuccess
- type ScriptScheduleService
- func (r *ScriptScheduleService) Get(ctx context.Context, scriptName string, query ScriptScheduleGetParams, ...) (res *ScriptScheduleGetResponse, err error)
- func (r *ScriptScheduleService) Update(ctx context.Context, scriptName string, params ScriptScheduleUpdateParams, ...) (res *ScriptScheduleUpdateResponse, err error)
- type ScriptScheduleUpdateParams
- type ScriptScheduleUpdateResponse
- type ScriptScheduleUpdateResponseEnvelope
- type ScriptScheduleUpdateResponseEnvelopeSuccess
- type ScriptService
- func (r *ScriptService) Delete(ctx context.Context, scriptName string, params ScriptDeleteParams, ...) (err error)
- func (r *ScriptService) Get(ctx context.Context, scriptName string, query ScriptGetParams, ...) (res *string, err error)
- func (r *ScriptService) List(ctx context.Context, query ScriptListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Script], err error)
- func (r *ScriptService) ListAutoPaging(ctx context.Context, query ScriptListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Script]
- func (r *ScriptService) Update(ctx context.Context, scriptName string, params ScriptUpdateParams, ...) (res *ScriptUpdateResponse, err error)
- type ScriptSetting
- type ScriptSettingEditParams
- type ScriptSettingEditResponseEnvelope
- type ScriptSettingEditResponseEnvelopeSuccess
- type ScriptSettingGetParams
- type ScriptSettingGetResponseEnvelope
- type ScriptSettingGetResponseEnvelopeSuccess
- type ScriptSettingObservability
- type ScriptSettingObservabilityParam
- type ScriptSettingParam
- type ScriptSettingService
- type ScriptSubdomainGetParams
- type ScriptSubdomainGetResponse
- type ScriptSubdomainNewParams
- type ScriptSubdomainNewResponse
- type ScriptSubdomainService
- func (r *ScriptSubdomainService) Get(ctx context.Context, scriptName string, query ScriptSubdomainGetParams, ...) (res *ScriptSubdomainGetResponse, err error)
- func (r *ScriptSubdomainService) New(ctx context.Context, scriptName string, params ScriptSubdomainNewParams, ...) (res *ScriptSubdomainNewResponse, err error)
- type ScriptTailDeleteParams
- type ScriptTailDeleteResponse
- type ScriptTailDeleteResponseSuccess
- type ScriptTailGetParams
- type ScriptTailGetResponse
- type ScriptTailGetResponseEnvelope
- type ScriptTailGetResponseEnvelopeSuccess
- type ScriptTailNewParams
- type ScriptTailNewResponse
- type ScriptTailNewResponseEnvelope
- type ScriptTailNewResponseEnvelopeSuccess
- type ScriptTailService
- func (r *ScriptTailService) Delete(ctx context.Context, scriptName string, id string, body ScriptTailDeleteParams, ...) (res *ScriptTailDeleteResponse, err error)
- func (r *ScriptTailService) Get(ctx context.Context, scriptName string, query ScriptTailGetParams, ...) (res *ScriptTailGetResponse, err error)
- func (r *ScriptTailService) New(ctx context.Context, scriptName string, params ScriptTailNewParams, ...) (res *ScriptTailNewResponse, err error)
- type ScriptUpdateParams
- type ScriptUpdateParamsMetadata
- type ScriptUpdateParamsMetadataAssets
- type ScriptUpdateParamsMetadataAssetsConfig
- type ScriptUpdateParamsMetadataAssetsConfigHTMLHandling
- type ScriptUpdateParamsMetadataAssetsConfigNotFoundHandling
- type ScriptUpdateParamsMetadataBinding
- type ScriptUpdateParamsMetadataBindingUnion
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAI
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAIType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngine
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAny
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssets
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRendering
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1Type
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespace
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDo
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdrive
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindJson
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespace
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERT
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainText
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueue
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2Type
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecret
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindService
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumer
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorize
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeType
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadata
- type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataType
- type ScriptUpdateParamsMetadataMigrations
- type ScriptUpdateParamsMetadataMigrationsUnion
- type ScriptUpdateParamsMetadataMigrationsWorkersMultipleStepMigrations
- type ScriptUpdateParamsMetadataObservability
- type ScriptUpdateParamsMetadataPlacement
- type ScriptUpdateParamsMetadataPlacementMode
- type ScriptUpdateParamsMetadataPlacementStatus
- type ScriptUpdateParamsMetadataUsageModel
- type ScriptUpdateResponse
- type ScriptUpdateResponseEnvelope
- type ScriptUpdateResponseEnvelopeSuccess
- type ScriptUpdateResponsePlacement
- type ScriptUpdateResponsePlacementMode
- type ScriptUpdateResponsePlacementStatus
- type ScriptUpdateResponseUsageModel
- type ScriptUsageModel
- type ScriptVersionGetParams
- type ScriptVersionGetResponse
- type ScriptVersionGetResponseEnvelope
- type ScriptVersionGetResponseEnvelopeSuccess
- type ScriptVersionListParams
- type ScriptVersionListResponse
- type ScriptVersionNewParams
- type ScriptVersionNewParamsMetadata
- type ScriptVersionNewParamsMetadataAnnotations
- type ScriptVersionNewParamsMetadataBinding
- type ScriptVersionNewParamsMetadataBindingUnion
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAI
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAIType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngine
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAny
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssets
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRendering
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1Type
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespace
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDo
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdrive
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJson
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespace
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERT
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainText
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueue
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2Type
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecret
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindService
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumer
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorize
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeType
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadata
- type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataType
- type ScriptVersionNewParamsMetadataUsageModel
- type ScriptVersionNewResponse
- type ScriptVersionNewResponseEnvelope
- type ScriptVersionNewResponseEnvelopeSuccess
- type ScriptVersionService
- func (r *ScriptVersionService) Get(ctx context.Context, scriptName string, versionID string, ...) (res *ScriptVersionGetResponse, err error)
- func (r *ScriptVersionService) List(ctx context.Context, scriptName string, params ScriptVersionListParams, ...) (res *pagination.V4PagePagination[ScriptVersionListResponse], err error)
- func (r *ScriptVersionService) ListAutoPaging(ctx context.Context, scriptName string, params ScriptVersionListParams, ...) *pagination.V4PagePaginationAutoPager[ScriptVersionListResponse]
- func (r *ScriptVersionService) New(ctx context.Context, scriptName string, params ScriptVersionNewParams, ...) (res *ScriptVersionNewResponse, err error)
- type SingleStepMigration
- type SingleStepMigrationParam
- func (r SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion()
- func (r SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsMetadataMigrationsUnion()
- func (r SingleStepMigrationParam) MarshalJSON() (data []byte, err error)
- type SingleStepMigrationRenamedClass
- type SingleStepMigrationRenamedClassParam
- type SingleStepMigrationTransferredClass
- type SingleStepMigrationTransferredClassParam
- type SortDirection
- type SubdomainGetParams
- type SubdomainGetResponse
- type SubdomainGetResponseEnvelope
- type SubdomainGetResponseEnvelopeSuccess
- type SubdomainService
- type SubdomainUpdateParams
- type SubdomainUpdateResponse
- type SubdomainUpdateResponseEnvelope
- type SubdomainUpdateResponseEnvelopeSuccess
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenStatus
- type TokenValue
- type WorkerMetadataParam
- type WorkerService
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountSettingGetParams ¶
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 ¶
func (r AccountSettingGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *AccountSettingService) Get(ctx context.Context, query AccountSettingGetParams, opts ...option.RequestOption) (res *AccountSettingGetResponse, err error)
Fetches Worker account settings for an account.
func (*AccountSettingService) Update ¶
func (r *AccountSettingService) Update(ctx context.Context, params AccountSettingUpdateParams, opts ...option.RequestOption) (res *AccountSettingUpdateResponse, err error)
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 ¶
func (r AccountSettingUpdateResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r AssetUploadNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *AssetUploadService) New(ctx context.Context, params AssetUploadNewParams, opts ...option.RequestOption) (res *AssetUploadNewResponse, err error)
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 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 ¶
type DomainDeleteParams ¶
type DomainGetParams ¶
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 ¶
func (r DomainGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *DomainService) List(ctx context.Context, params DomainListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Domain], err error)
Lists all Worker Domains for an account.
func (*DomainService) ListAutoPaging ¶
func (r *DomainService) ListAutoPaging(ctx context.Context, params DomainListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Domain]
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 ¶
func (r DomainUpdateResponseEnvelopeSuccess) IsKnown() bool
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 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 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 RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
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 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 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 ¶
func (r RouteGetResponseEnvelopeSuccess) IsKnown() bool
type RouteListParams ¶
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 ¶
func (r *RouteService) List(ctx context.Context, query RouteListParams, opts ...option.RequestOption) (res *pagination.SinglePage[RouteListResponse], err error)
Returns routes for a zone.
func (*RouteService) ListAutoPaging ¶
func (r *RouteService) ListAutoPaging(ctx context.Context, query RouteListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[RouteListResponse]
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 ¶
func (r RouteUpdateResponseEnvelopeSuccess) IsKnown() bool
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 ¶
type ScheduleParam ¶
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 ¶
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 ¶
func (r ScriptAssetUploadNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *ScriptAssetUploadService) New(ctx context.Context, scriptName string, params ScriptAssetUploadNewParams, opts ...option.RequestOption) (res *ScriptAssetUploadNewResponse, err error)
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 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 ¶
func (r ScriptContentUpdateResponseEnvelopeSuccess) IsKnown() bool
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 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 ¶
func (r ScriptDeploymentGetResponseDeploymentsStrategy) IsKnown() bool
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 ¶
func (r ScriptDeploymentGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r ScriptDeploymentNewParamsStrategy) IsKnown() bool
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 ¶
func (r ScriptDeploymentNewResponseEnvelopeSuccess) IsKnown() bool
type ScriptDeploymentNewResponseStrategy ¶
type ScriptDeploymentNewResponseStrategy string
const (
ScriptDeploymentNewResponseStrategyPercentage ScriptDeploymentNewResponseStrategy = "percentage"
)
func (ScriptDeploymentNewResponseStrategy) IsKnown ¶
func (r ScriptDeploymentNewResponseStrategy) IsKnown() bool
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 ¶
func (r *ScriptDeploymentService) Get(ctx context.Context, scriptName string, query ScriptDeploymentGetParams, opts ...option.RequestOption) (res *ScriptDeploymentGetResponse, err error)
List of Worker Deployments. The first deployment in the list is the latest deployment actively serving traffic.
func (*ScriptDeploymentService) New ¶
func (r *ScriptDeploymentService) New(ctx context.Context, scriptName string, params ScriptDeploymentNewParams, opts ...option.RequestOption) (res *ScriptDeploymentNewResponse, err error)
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 ScriptListParams ¶
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 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 ¶
func (r ScriptScheduleGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *ScriptScheduleService) Get(ctx context.Context, scriptName string, query ScriptScheduleGetParams, opts ...option.RequestOption) (res *ScriptScheduleGetResponse, err error)
Fetches Cron Triggers for a Worker.
func (*ScriptScheduleService) Update ¶
func (r *ScriptScheduleService) Update(ctx context.Context, scriptName string, params ScriptScheduleUpdateParams, opts ...option.RequestOption) (res *ScriptScheduleUpdateResponse, err error)
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 ¶
func (r ScriptScheduleUpdateResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *ScriptService) List(ctx context.Context, query ScriptListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Script], err error)
Fetch a list of uploaded workers.
func (*ScriptService) ListAutoPaging ¶
func (r *ScriptService) ListAutoPaging(ctx context.Context, query ScriptListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Script]
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 ¶
func (r ScriptSettingEditResponseEnvelopeSuccess) IsKnown() bool
type ScriptSettingGetParams ¶
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 ¶
func (r ScriptSettingGetResponseEnvelopeSuccess) IsKnown() bool
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 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 ¶
func (r *ScriptSubdomainService) Get(ctx context.Context, scriptName string, query ScriptSubdomainGetParams, opts ...option.RequestOption) (res *ScriptSubdomainGetResponse, err error)
Get if the Worker is available on the workers.dev subdomain.
func (*ScriptSubdomainService) New ¶
func (r *ScriptSubdomainService) New(ctx context.Context, scriptName string, params ScriptSubdomainNewParams, opts ...option.RequestOption) (res *ScriptSubdomainNewResponse, err error)
Enable or disable the Worker on the workers.dev subdomain.
type ScriptTailDeleteParams ¶
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 ¶
func (r ScriptTailDeleteResponseSuccess) IsKnown() bool
type ScriptTailGetParams ¶
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 ¶
func (r ScriptTailGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r ScriptTailNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataAssetsConfigHTMLHandling) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataAssetsConfigNotFoundHandling) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindAI) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAIType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAIType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindAITypeAI ScriptUpdateParamsMetadataBindingsWorkersBindingKindAIType = "ai"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindAIType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindAIType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngine) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineTypeAnalyticsEngine ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType = "analytics_engine"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindAny) MarshalJSON() (data []byte, err error)
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssets) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsTypeAssets ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsType = "assets"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindAssetsType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRendering) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingTypeBrowserRendering ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingType = "browser_rendering"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindBrowserRenderingType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1Type ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1Type string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1TypeD1 ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1Type = "d1"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1Type) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindD1Type) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespace) MarshalJSON() (data []byte, err error)
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound) MarshalJSON() (data []byte, err error)
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceTypeDispatchNamespace ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType = "dispatch_namespace"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindDo) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoTypeDurableObjectNamespace ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoType = "durable_object_namespace"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindDoType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdrive) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveTypeHyperdrive ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveType = "hyperdrive"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindHyperdriveType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindJson) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonTypeJson ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonType = "json"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindJsonType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespace) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceTypeKVNamespace ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceType = "kv_namespace"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindKVNamespaceType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERT) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTTypeMTLSCertificate ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTType = "mtls_certificate"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindMTLSCERTType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainText) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextTypePlainText ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextType = "plain_text"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindPlainTextType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueue) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueTypeQueue ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueType = "queue"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindQueueType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2Type ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2Type string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2TypeR2Bucket ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2Type = "r2_bucket"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2Type) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindR2Type) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecret) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretTypeSecretText ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretType = "secret_text"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindSecretType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindService) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceTypeService ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceType = "service"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindServiceType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumer) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerTypeTailConsumer ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerType = "tail_consumer"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindTailConsumerType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorize) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeTypeVectorize ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeType = "vectorize"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindVectorizeType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadata) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataType ¶
type ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataType string
The kind of resource that the binding provides.
const (
ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataTypeVersionMetadata ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataType = "version_metadata"
)
func (ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataType) IsKnown ¶
func (r ScriptUpdateParamsMetadataBindingsWorkersBindingKindVersionMetadataType) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataMigrationsWorkersMultipleStepMigrations) MarshalJSON() (data []byte, err error)
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 ¶
func (r ScriptUpdateParamsMetadataPlacementMode) IsKnown() bool
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 ¶
func (r ScriptUpdateParamsMetadataPlacementStatus) IsKnown() bool
type ScriptUpdateParamsMetadataUsageModel ¶
type ScriptUpdateParamsMetadataUsageModel string
Usage model for the Worker invocations.
const (
ScriptUpdateParamsMetadataUsageModelStandard ScriptUpdateParamsMetadataUsageModel = "standard"
)
func (ScriptUpdateParamsMetadataUsageModel) IsKnown ¶
func (r ScriptUpdateParamsMetadataUsageModel) IsKnown() bool
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 ¶
func (r ScriptUpdateResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r ScriptUpdateResponsePlacementMode) IsKnown() bool
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 ¶
func (r ScriptUpdateResponsePlacementStatus) IsKnown() bool
type ScriptUpdateResponseUsageModel ¶
type ScriptUpdateResponseUsageModel string
Usage model for the Worker invocations.
const (
ScriptUpdateResponseUsageModelStandard ScriptUpdateResponseUsageModel = "standard"
)
func (ScriptUpdateResponseUsageModel) IsKnown ¶
func (r ScriptUpdateResponseUsageModel) IsKnown() bool
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 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 ¶
func (r ScriptVersionGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAI) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAIType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAIType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAITypeAI ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAIType = "ai"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAIType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAIType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngine) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineTypeAnalyticsEngine ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType = "analytics_engine"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAnalyticsEngineType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAny) MarshalJSON() (data []byte, err error)
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssets) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsTypeAssets ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsType = "assets"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindAssetsType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRendering) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingTypeBrowserRendering ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingType = "browser_rendering"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindBrowserRenderingType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1Type ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1Type string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1TypeD1 ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1Type = "d1"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1Type) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindD1Type) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespace) MarshalJSON() (data []byte, err error)
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutbound) MarshalJSON() (data []byte, err error)
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceOutboundWorker) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceTypeDispatchNamespace ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDispatchNamespaceType = "dispatch_namespace"
)
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDo) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoTypeDurableObjectNamespace ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoType = "durable_object_namespace"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindDoType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdrive) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveTypeHyperdrive ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveType = "hyperdrive"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindHyperdriveType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJson) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonTypeJson ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonType = "json"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindJsonType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespace) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceTypeKVNamespace ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceType = "kv_namespace"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindKVNamespaceType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERT) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTTypeMTLSCertificate ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTType = "mtls_certificate"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindMTLSCERTType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainText) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextTypePlainText ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextType = "plain_text"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindPlainTextType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueue) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueTypeQueue ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueType = "queue"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindQueueType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2Type ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2Type string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2TypeR2Bucket ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2Type = "r2_bucket"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2Type) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindR2Type) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecret) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretTypeSecretText ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretType = "secret_text"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindSecretType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindService) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceTypeService ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceType = "service"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindServiceType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumer) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerTypeTailConsumer ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerType = "tail_consumer"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindTailConsumerType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorize) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeTypeVectorize ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeType = "vectorize"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVectorizeType) IsKnown() bool
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 ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadata) MarshalJSON() (data []byte, err error)
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataType ¶
type ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataType string
The kind of resource that the binding provides.
const (
ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataTypeVersionMetadata ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataType = "version_metadata"
)
func (ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataType) IsKnown ¶
func (r ScriptVersionNewParamsMetadataBindingsWorkersBindingKindVersionMetadataType) IsKnown() bool
type ScriptVersionNewParamsMetadataUsageModel ¶
type ScriptVersionNewParamsMetadataUsageModel string
Usage model for the Worker invocations.
const (
ScriptVersionNewParamsMetadataUsageModelStandard ScriptVersionNewParamsMetadataUsageModel = "standard"
)
func (ScriptVersionNewParamsMetadataUsageModel) IsKnown ¶
func (r ScriptVersionNewParamsMetadataUsageModel) IsKnown() bool
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 ¶
func (r ScriptVersionNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *ScriptVersionService) List(ctx context.Context, scriptName string, params ScriptVersionListParams, opts ...option.RequestOption) (res *pagination.V4PagePagination[ScriptVersionListResponse], err error)
List of Worker Versions. The first version in the list is the latest version.
func (*ScriptVersionService) ListAutoPaging ¶
func (r *ScriptVersionService) ListAutoPaging(ctx context.Context, scriptName string, params ScriptVersionListParams, opts ...option.RequestOption) *pagination.V4PagePaginationAutoPager[ScriptVersionListResponse]
List of Worker Versions. The first version in the list is the latest version.
func (*ScriptVersionService) New ¶
func (r *ScriptVersionService) New(ctx context.Context, scriptName string, params ScriptVersionNewParams, opts ...option.RequestOption) (res *ScriptVersionNewResponse, err error)
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 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 ¶
func (r SubdomainGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *SubdomainService) Get(ctx context.Context, query SubdomainGetParams, opts ...option.RequestOption) (res *SubdomainGetResponse, err error)
Returns a Workers subdomain for an account.
func (*SubdomainService) Update ¶
func (r *SubdomainService) Update(ctx context.Context, params SubdomainUpdateParams, opts ...option.RequestOption) (res *SubdomainUpdateResponse, err error)
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 ¶
func (r SubdomainUpdateResponseEnvelopeSuccess) IsKnown() bool
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 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 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.