Documentation ¶
Index ¶
- Constants
- type AIModelSchemaGetParams
- type AIModelSchemaGetResponse
- type AIModelSchemaGetResponseEnvelope
- type AIModelSchemaService
- type AIModelService
- type AIRunParams
- type AIRunParamsBody
- type AIRunParamsBodyAutomaticSpeechRecognition
- type AIRunParamsBodyImageClassification
- type AIRunParamsBodyImageToText
- type AIRunParamsBodyImageToTextMessage
- type AIRunParamsBodyObject
- type AIRunParamsBodyObjectDetection
- type AIRunParamsBodySummarization
- type AIRunParamsBodyTextClassification
- type AIRunParamsBodyTextEmbeddings
- type AIRunParamsBodyTextEmbeddingsTextArray
- type AIRunParamsBodyTextEmbeddingsTextUnion
- type AIRunParamsBodyTextToImage
- type AIRunParamsBodyTranslation
- type AIRunParamsBodyUnion
- type AIRunResponseAutomaticSpeechRecognition
- type AIRunResponseAutomaticSpeechRecognitionWord
- type AIRunResponseEnvelope
- type AIRunResponseImageClassification
- type AIRunResponseImageToText
- type AIRunResponseObject
- type AIRunResponseObjectDetection
- type AIRunResponseObjectToolCall
- type AIRunResponseSummarization
- type AIRunResponseTextClassification
- type AIRunResponseTextEmbeddings
- type AIRunResponseTranslation
- type AIRunResponseUnion
- type AIService
- type ASN
- type ASNParam
- type AccountSettingGetParams
- type AccountSettingGetResponse
- type AccountSettingGetResponseEnvelope
- type AccountSettingGetResponseEnvelopeSuccess
- type AccountSettingService
- type AccountSettingUpdateParams
- type AccountSettingUpdateResponse
- type AccountSettingUpdateResponseEnvelope
- type AccountSettingUpdateResponseEnvelopeSuccess
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type Binding
- type BindingParam
- type BindingType
- type BindingUnion
- type BindingUnionParam
- type BindingWorkersQueueBinding
- type BindingWorkersQueueBindingParam
- type BindingWorkersQueueBindingType
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type ConsumerScript
- type ConsumerScriptParam
- type D1Binding
- type D1BindingParam
- type D1BindingType
- type Deployment
- type DeploymentParam
- type DispatchNamespaceBinding
- type DispatchNamespaceBindingOutbound
- type DispatchNamespaceBindingOutboundParam
- type DispatchNamespaceBindingOutboundWorker
- type DispatchNamespaceBindingOutboundWorkerParam
- type DispatchNamespaceBindingParam
- type DispatchNamespaceBindingType
- 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 DurableObjectBinding
- type DurableObjectBindingParam
- type DurableObjectBindingType
- type Error
- type ErrorData
- type KVNamespaceBinding
- type KVNamespaceBindingParam
- type KVNamespaceBindingType
- type MTLSCERTBinding
- type MTLSCERTBindingParam
- type MTLSCERTBindingType
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type MigrationStep
- type MigrationStepParam
- type MigrationStepRenamedClass
- type MigrationStepRenamedClassParam
- type MigrationStepTransferredClass
- type MigrationStepTransferredClassParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type PlacementConfiguration
- type PlacementConfigurationMode
- type PlacementConfigurationParam
- type R2Binding
- type R2BindingParam
- type R2BindingType
- type ResponseInfo
- type Role
- type Schedule
- type Script
- type ScriptContentGetParams
- type ScriptContentService
- type ScriptContentUpdateParams
- type ScriptContentUpdateResponseEnvelope
- type ScriptContentUpdateResponseEnvelopeSuccess
- type ScriptDeleteParams
- type ScriptDeploymentGetParams
- type ScriptDeploymentGetResponse
- type ScriptDeploymentGetResponseDeployment
- type ScriptDeploymentGetResponseEnvelope
- type ScriptDeploymentGetResponseEnvelopeSuccess
- type ScriptDeploymentNewParams
- type ScriptDeploymentNewResponse
- type ScriptDeploymentNewResponseEnvelope
- type ScriptDeploymentNewResponseEnvelopeSuccess
- 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 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 *http.Response, 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 *Script, err error)
- type ScriptSetting
- type ScriptSettingEditParams
- type ScriptSettingEditResponseEnvelope
- type ScriptSettingEditResponseEnvelopeSuccess
- type ScriptSettingGetParams
- type ScriptSettingGetResponseEnvelope
- type ScriptSettingGetResponseEnvelopeSuccess
- type ScriptSettingParam
- type ScriptSettingService
- 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 ScriptUpdateParamsBody
- type ScriptUpdateParamsBodyObject
- type ScriptUpdateParamsBodyObjectMetadata
- type ScriptUpdateParamsBodyObjectMetadataMigrations
- type ScriptUpdateParamsBodyObjectMetadataMigrationsUnion
- type ScriptUpdateParamsBodyObjectMetadataUsageModel
- type ScriptUpdateParamsBodyUnion
- type ScriptUpdateResponseEnvelope
- type ScriptUpdateResponseEnvelopeSuccess
- type ScriptVersionGetParams
- type ScriptVersionGetResponse
- type ScriptVersionGetResponseEnvelope
- type ScriptVersionGetResponseEnvelopeSuccess
- type ScriptVersionListParams
- type ScriptVersionListResponse
- type ScriptVersionNewParams
- type ScriptVersionNewParamsMetadata
- type ScriptVersionNewParamsMetadataAnnotations
- 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 ServiceBinding
- type ServiceBindingParam
- type ServiceBindingType
- type SingleStepMigration
- type SingleStepMigrationParam
- func (r SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion()
- func (r SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion()
- func (r SingleStepMigrationParam) MarshalJSON() (data []byte, err error)
- type SingleStepMigrationRenamedClass
- type SingleStepMigrationRenamedClassParam
- type SingleStepMigrationTransferredClass
- type SingleStepMigrationTransferredClassParam
- type SortDirection
- type SteppedMigration
- type SteppedMigrationParam
- func (r SteppedMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion()
- func (r SteppedMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion()
- func (r SteppedMigrationParam) MarshalJSON() (data []byte, err error)
- type SubdomainGetParams
- type SubdomainGetResponse
- type SubdomainGetResponseEnvelope
- type SubdomainGetResponseEnvelopeSuccess
- type SubdomainService
- type SubdomainUpdateParams
- type SubdomainUpdateResponse
- type SubdomainUpdateResponseEnvelope
- type SubdomainUpdateResponseEnvelopeSuccess
- 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 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 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.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIModelSchemaGetParams ¶ added in v2.3.0
type AIModelSchemaGetParams struct { AccountID param.Field[string] `path:"account_id,required"` // Model Name Model param.Field[string] `query:"model,required"` }
func (AIModelSchemaGetParams) URLQuery ¶ added in v2.3.0
func (r AIModelSchemaGetParams) URLQuery() (v url.Values)
URLQuery serializes AIModelSchemaGetParams's query parameters as `url.Values`.
type AIModelSchemaGetResponse ¶ added in v2.3.0
type AIModelSchemaGetResponse = interface{}
type AIModelSchemaGetResponseEnvelope ¶ added in v2.3.0
type AIModelSchemaGetResponseEnvelope struct { Result AIModelSchemaGetResponse `json:"result,required"` Success bool `json:"success,required"` JSON aiModelSchemaGetResponseEnvelopeJSON `json:"-"` }
func (*AIModelSchemaGetResponseEnvelope) UnmarshalJSON ¶ added in v2.3.0
func (r *AIModelSchemaGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AIModelSchemaService ¶ added in v2.3.0
type AIModelSchemaService struct {
Options []option.RequestOption
}
AIModelSchemaService 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 NewAIModelSchemaService method instead.
func NewAIModelSchemaService ¶ added in v2.3.0
func NewAIModelSchemaService(opts ...option.RequestOption) (r *AIModelSchemaService)
NewAIModelSchemaService 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 (*AIModelSchemaService) Get ¶ added in v2.3.0
func (r *AIModelSchemaService) Get(ctx context.Context, params AIModelSchemaGetParams, opts ...option.RequestOption) (res *AIModelSchemaGetResponse, err error)
Get Model Schema
type AIModelService ¶ added in v2.3.0
type AIModelService struct { Options []option.RequestOption Schema *AIModelSchemaService }
AIModelService 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 NewAIModelService method instead.
func NewAIModelService ¶ added in v2.3.0
func NewAIModelService(opts ...option.RequestOption) (r *AIModelService)
NewAIModelService 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 AIRunParams ¶
type AIRunParams struct { AccountID param.Field[string] `path:"account_id,required"` Body AIRunParamsBodyUnion `json:"body,required"` }
func (AIRunParams) MarshalJSON ¶
func (r AIRunParams) MarshalJSON() (data []byte, err error)
type AIRunParamsBody ¶
type AIRunParamsBody struct { Text param.Field[interface{}] `json:"text,required"` Guidance param.Field[float64] `json:"guidance"` Height param.Field[int64] `json:"height"` Image param.Field[interface{}] `json:"image,required"` ImageB64 param.Field[string] `json:"image_b64"` LoraWeights param.Field[interface{}] `json:"lora_weights,required"` Loras param.Field[interface{}] `json:"loras,required"` Mask param.Field[interface{}] `json:"mask,required"` NegativePrompt param.Field[string] `json:"negative_prompt"` NumSteps param.Field[int64] `json:"num_steps"` Prompt param.Field[string] `json:"prompt"` Seed param.Field[int64] `json:"seed"` Strength param.Field[float64] `json:"strength"` Width param.Field[int64] `json:"width"` Audio param.Field[interface{}] `json:"audio,required"` FrequencyPenalty param.Field[float64] `json:"frequency_penalty"` Lora param.Field[string] `json:"lora"` MaxTokens param.Field[int64] `json:"max_tokens"` PresencePenalty param.Field[float64] `json:"presence_penalty"` Raw param.Field[bool] `json:"raw"` RepetitionPenalty param.Field[float64] `json:"repetition_penalty"` Stream param.Field[bool] `json:"stream"` Temperature param.Field[float64] `json:"temperature"` TopK param.Field[int64] `json:"top_k"` TopP param.Field[float64] `json:"top_p"` Messages param.Field[interface{}] `json:"messages,required"` Tools param.Field[interface{}] `json:"tools,required"` SourceLang param.Field[string] `json:"source_lang"` TargetLang param.Field[string] `json:"target_lang"` InputText param.Field[string] `json:"input_text"` MaxLength param.Field[int64] `json:"max_length"` }
func (AIRunParamsBody) MarshalJSON ¶
func (r AIRunParamsBody) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyAutomaticSpeechRecognition ¶ added in v2.4.0
type AIRunParamsBodyAutomaticSpeechRecognition struct {
Audio param.Field[[]float64] `json:"audio,required"`
}
func (AIRunParamsBodyAutomaticSpeechRecognition) MarshalJSON ¶ added in v2.4.0
func (r AIRunParamsBodyAutomaticSpeechRecognition) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyImageClassification ¶
type AIRunParamsBodyImageClassification struct {
Image param.Field[[]float64] `json:"image,required"`
}
func (AIRunParamsBodyImageClassification) MarshalJSON ¶
func (r AIRunParamsBodyImageClassification) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyImageToText ¶
type AIRunParamsBodyImageToText struct { Image param.Field[[]float64] `json:"image,required"` MaxTokens param.Field[int64] `json:"max_tokens"` Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` Prompt param.Field[string] `json:"prompt"` Raw param.Field[bool] `json:"raw"` Temperature param.Field[float64] `json:"temperature"` }
func (AIRunParamsBodyImageToText) MarshalJSON ¶
func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyImageToTextMessage ¶ added in v2.1.0
type AIRunParamsBodyImageToTextMessage struct { Content param.Field[string] `json:"content,required"` Role param.Field[string] `json:"role,required"` }
func (AIRunParamsBodyImageToTextMessage) MarshalJSON ¶ added in v2.1.0
func (r AIRunParamsBodyImageToTextMessage) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyObject ¶ added in v2.4.0
type AIRunParamsBodyObject struct { Prompt param.Field[string] `json:"prompt,required"` FrequencyPenalty param.Field[float64] `json:"frequency_penalty"` Lora param.Field[string] `json:"lora"` MaxTokens param.Field[int64] `json:"max_tokens"` PresencePenalty param.Field[float64] `json:"presence_penalty"` Raw param.Field[bool] `json:"raw"` RepetitionPenalty param.Field[float64] `json:"repetition_penalty"` Seed param.Field[int64] `json:"seed"` Stream param.Field[bool] `json:"stream"` Temperature param.Field[float64] `json:"temperature"` TopK param.Field[int64] `json:"top_k"` TopP param.Field[float64] `json:"top_p"` }
func (AIRunParamsBodyObject) MarshalJSON ¶ added in v2.4.0
func (r AIRunParamsBodyObject) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyObjectDetection ¶
func (AIRunParamsBodyObjectDetection) MarshalJSON ¶
func (r AIRunParamsBodyObjectDetection) MarshalJSON() (data []byte, err error)
type AIRunParamsBodySummarization ¶
type AIRunParamsBodySummarization struct { InputText param.Field[string] `json:"input_text,required"` MaxLength param.Field[int64] `json:"max_length"` }
func (AIRunParamsBodySummarization) MarshalJSON ¶
func (r AIRunParamsBodySummarization) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextClassification ¶
func (AIRunParamsBodyTextClassification) MarshalJSON ¶
func (r AIRunParamsBodyTextClassification) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextEmbeddings ¶
type AIRunParamsBodyTextEmbeddings struct {
Text param.Field[AIRunParamsBodyTextEmbeddingsTextUnion] `json:"text,required"`
}
func (AIRunParamsBodyTextEmbeddings) MarshalJSON ¶
func (r AIRunParamsBodyTextEmbeddings) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTextEmbeddingsTextArray ¶
type AIRunParamsBodyTextEmbeddingsTextArray []string
func (AIRunParamsBodyTextEmbeddingsTextArray) ImplementsWorkersAIRunParamsBodyTextEmbeddingsTextUnion ¶
func (r AIRunParamsBodyTextEmbeddingsTextArray) ImplementsWorkersAIRunParamsBodyTextEmbeddingsTextUnion()
type AIRunParamsBodyTextEmbeddingsTextUnion ¶
type AIRunParamsBodyTextEmbeddingsTextUnion interface {
ImplementsWorkersAIRunParamsBodyTextEmbeddingsTextUnion()
}
Satisfied by shared.UnionString, workers.AIRunParamsBodyTextEmbeddingsTextArray.
type AIRunParamsBodyTextToImage ¶
type AIRunParamsBodyTextToImage struct { Prompt param.Field[string] `json:"prompt,required"` Guidance param.Field[float64] `json:"guidance"` Height param.Field[int64] `json:"height"` Image param.Field[[]float64] `json:"image"` ImageB64 param.Field[string] `json:"image_b64"` LoraWeights param.Field[[]float64] `json:"lora_weights"` Loras param.Field[[]string] `json:"loras"` Mask param.Field[[]float64] `json:"mask"` NegativePrompt param.Field[string] `json:"negative_prompt"` NumSteps param.Field[int64] `json:"num_steps"` Seed param.Field[int64] `json:"seed"` Strength param.Field[float64] `json:"strength"` Width param.Field[int64] `json:"width"` }
func (AIRunParamsBodyTextToImage) MarshalJSON ¶
func (r AIRunParamsBodyTextToImage) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyTranslation ¶
type AIRunParamsBodyTranslation struct { TargetLang param.Field[string] `json:"target_lang,required"` Text param.Field[string] `json:"text,required"` SourceLang param.Field[string] `json:"source_lang"` }
func (AIRunParamsBodyTranslation) MarshalJSON ¶
func (r AIRunParamsBodyTranslation) MarshalJSON() (data []byte, err error)
type AIRunParamsBodyUnion ¶
type AIRunParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by workers.AIRunParamsBodyTextClassification, workers.AIRunParamsBodyTextToImage, workers.AIRunParamsBodyTextEmbeddings, workers.AIRunParamsBodyAutomaticSpeechRecognition, workers.AIRunParamsBodyImageClassification, workers.AIRunParamsBodyObjectDetection, workers.AIRunParamsBodyObject, workers.AIRunParamsBodyObject, workers.AIRunParamsBodyTranslation, workers.AIRunParamsBodySummarization, workers.AIRunParamsBodyImageToText, AIRunParamsBody.
type AIRunResponseAutomaticSpeechRecognition ¶ added in v2.4.0
type AIRunResponseAutomaticSpeechRecognition struct { Text string `json:"text,required"` Vtt string `json:"vtt"` WordCount float64 `json:"word_count"` Words []AIRunResponseAutomaticSpeechRecognitionWord `json:"words"` JSON aiRunResponseAutomaticSpeechRecognitionJSON `json:"-"` }
func (AIRunResponseAutomaticSpeechRecognition) ImplementsWorkersAIRunResponseUnion ¶ added in v2.4.0
func (r AIRunResponseAutomaticSpeechRecognition) ImplementsWorkersAIRunResponseUnion()
func (*AIRunResponseAutomaticSpeechRecognition) UnmarshalJSON ¶ added in v2.4.0
func (r *AIRunResponseAutomaticSpeechRecognition) UnmarshalJSON(data []byte) (err error)
type AIRunResponseAutomaticSpeechRecognitionWord ¶ added in v2.4.0
type AIRunResponseAutomaticSpeechRecognitionWord struct { End float64 `json:"end"` Start float64 `json:"start"` Word string `json:"word"` JSON aiRunResponseAutomaticSpeechRecognitionWordJSON `json:"-"` }
func (*AIRunResponseAutomaticSpeechRecognitionWord) UnmarshalJSON ¶ added in v2.4.0
func (r *AIRunResponseAutomaticSpeechRecognitionWord) UnmarshalJSON(data []byte) (err error)
type AIRunResponseEnvelope ¶
type AIRunResponseEnvelope struct { Result AIRunResponseUnion `json:"result" format:"binary"` JSON aiRunResponseEnvelopeJSON `json:"-"` }
func (*AIRunResponseEnvelope) UnmarshalJSON ¶
func (r *AIRunResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AIRunResponseImageClassification ¶
type AIRunResponseImageClassification []AIRunResponseImageClassification
func (AIRunResponseImageClassification) ImplementsWorkersAIRunResponseUnion ¶
func (r AIRunResponseImageClassification) ImplementsWorkersAIRunResponseUnion()
type AIRunResponseImageToText ¶
type AIRunResponseImageToText struct { Description string `json:"description"` JSON aiRunResponseImageToTextJSON `json:"-"` }
func (AIRunResponseImageToText) ImplementsWorkersAIRunResponseUnion ¶
func (r AIRunResponseImageToText) ImplementsWorkersAIRunResponseUnion()
func (*AIRunResponseImageToText) UnmarshalJSON ¶
func (r *AIRunResponseImageToText) UnmarshalJSON(data []byte) (err error)
type AIRunResponseObject ¶
type AIRunResponseObject struct { Response string `json:"response"` ToolCalls []AIRunResponseObjectToolCall `json:"tool_calls"` JSON aiRunResponseObjectJSON `json:"-"` }
func (AIRunResponseObject) ImplementsWorkersAIRunResponseUnion ¶
func (r AIRunResponseObject) ImplementsWorkersAIRunResponseUnion()
func (*AIRunResponseObject) UnmarshalJSON ¶
func (r *AIRunResponseObject) UnmarshalJSON(data []byte) (err error)
type AIRunResponseObjectDetection ¶
type AIRunResponseObjectDetection []AIRunResponseObjectDetection
func (AIRunResponseObjectDetection) ImplementsWorkersAIRunResponseUnion ¶
func (r AIRunResponseObjectDetection) ImplementsWorkersAIRunResponseUnion()
type AIRunResponseObjectToolCall ¶ added in v2.3.0
type AIRunResponseObjectToolCall struct { Arguments interface{} `json:"arguments"` Name string `json:"name"` JSON aiRunResponseObjectToolCallJSON `json:"-"` }
func (*AIRunResponseObjectToolCall) UnmarshalJSON ¶ added in v2.3.0
func (r *AIRunResponseObjectToolCall) UnmarshalJSON(data []byte) (err error)
type AIRunResponseSummarization ¶
type AIRunResponseSummarization struct { Summary string `json:"summary"` JSON aiRunResponseSummarizationJSON `json:"-"` }
func (AIRunResponseSummarization) ImplementsWorkersAIRunResponseUnion ¶
func (r AIRunResponseSummarization) ImplementsWorkersAIRunResponseUnion()
func (*AIRunResponseSummarization) UnmarshalJSON ¶
func (r *AIRunResponseSummarization) UnmarshalJSON(data []byte) (err error)
type AIRunResponseTextClassification ¶
type AIRunResponseTextClassification []AIRunResponseTextClassification
func (AIRunResponseTextClassification) ImplementsWorkersAIRunResponseUnion ¶
func (r AIRunResponseTextClassification) ImplementsWorkersAIRunResponseUnion()
type AIRunResponseTextEmbeddings ¶
type AIRunResponseTextEmbeddings struct { Data [][]float64 `json:"data"` Shape []float64 `json:"shape"` JSON aiRunResponseTextEmbeddingsJSON `json:"-"` }
func (AIRunResponseTextEmbeddings) ImplementsWorkersAIRunResponseUnion ¶
func (r AIRunResponseTextEmbeddings) ImplementsWorkersAIRunResponseUnion()
func (*AIRunResponseTextEmbeddings) UnmarshalJSON ¶
func (r *AIRunResponseTextEmbeddings) UnmarshalJSON(data []byte) (err error)
type AIRunResponseTranslation ¶
type AIRunResponseTranslation struct { TranslatedText string `json:"translated_text"` JSON aiRunResponseTranslationJSON `json:"-"` }
func (AIRunResponseTranslation) ImplementsWorkersAIRunResponseUnion ¶
func (r AIRunResponseTranslation) ImplementsWorkersAIRunResponseUnion()
func (*AIRunResponseTranslation) UnmarshalJSON ¶
func (r *AIRunResponseTranslation) UnmarshalJSON(data []byte) (err error)
type AIRunResponseUnion ¶
type AIRunResponseUnion interface {
ImplementsWorkersAIRunResponseUnion()
}
Union satisfied by workers.AIRunResponseTextClassification, shared.UnionString, workers.AIRunResponseTextEmbeddings, workers.AIRunResponseAutomaticSpeechRecognition, workers.AIRunResponseImageClassification, workers.AIRunResponseObjectDetection, workers.AIRunResponseObject, shared.UnionString, workers.AIRunResponseTranslation, workers.AIRunResponseSummarization or workers.AIRunResponseImageToText.
type AIService ¶
type AIService struct { Options []option.RequestOption Models *AIModelService }
AIService 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 NewAIService method instead.
func NewAIService ¶
func NewAIService(opts ...option.RequestOption) (r *AIService)
NewAIService 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 (*AIService) Run ¶
func (r *AIService) Run(ctx context.Context, modelName string, params AIRunParams, opts ...option.RequestOption) (res *AIRunResponseUnion, err error)
This endpoint provides users with the capability to run specific AI models on-demand.
By submitting the required input data, users can receive real-time predictions or results generated by the chosen AI model. The endpoint supports various AI model types, ensuring flexibility and adaptability for diverse use cases.
Model specific inputs available in [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).
type AccountSettingGetParams ¶
type AccountSettingGetResponse ¶
type AccountSettingGetResponse struct { DefaultUsageModel interface{} `json:"default_usage_model"` GreenCompute interface{} `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"` Body string `json:"body,required"` }
func (AccountSettingUpdateParams) MarshalJSON ¶
func (r AccountSettingUpdateParams) MarshalJSON() (data []byte, err error)
type AccountSettingUpdateResponse ¶
type AccountSettingUpdateResponse struct { DefaultUsageModel interface{} `json:"default_usage_model"` GreenCompute interface{} `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 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 Binding ¶
type Binding struct { // A JavaScript variable name for the binding. Name string `json:"name,required"` // Namespace identifier tag. NamespaceID string `json:"namespace_id"` // The class of resource that the binding provides. Type BindingType `json:"type,required"` // Optional environment if the Worker utilizes one. Environment string `json:"environment"` // Name of Worker to bind to Service string `json:"service"` // The exported class name of the Durable Object ClassName string `json:"class_name"` // The script where the Durable Object is defined, if it is external to this Worker ScriptName string `json:"script_name"` // R2 bucket to bind to BucketName string `json:"bucket_name"` // Name of the Queue to bind to QueueName string `json:"queue_name"` // A JavaScript variable name for the binding. Binding string `json:"binding"` // ID of the D1 database to bind to ID string `json:"id"` // Namespace to bind to Namespace string `json:"namespace"` // This field can have the runtime type of [DispatchNamespaceBindingOutbound]. Outbound interface{} `json:"outbound,required"` // ID of the certificate to bind to CertificateID string `json:"certificate_id"` JSON bindingJSON `json:"-"` // contains filtered or unexported fields }
A binding to allow the Worker to communicate with resources
func (Binding) AsUnion ¶
func (r Binding) AsUnion() BindingUnion
AsUnion returns a BindingUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are workers.KVNamespaceBinding, workers.ServiceBinding, workers.DurableObjectBinding, workers.R2Binding, workers.BindingWorkersQueueBinding, workers.D1Binding, workers.DispatchNamespaceBinding, workers.MTLSCERTBinding.
func (*Binding) UnmarshalJSON ¶
type BindingParam ¶
type BindingParam struct { // The class of resource that the binding provides. Type param.Field[BindingType] `json:"type,required"` // Optional environment if the Worker utilizes one. Environment param.Field[string] `json:"environment"` // Name of Worker to bind to Service param.Field[string] `json:"service"` // The exported class name of the Durable Object ClassName param.Field[string] `json:"class_name"` // The script where the Durable Object is defined, if it is external to this Worker ScriptName param.Field[string] `json:"script_name"` // R2 bucket to bind to BucketName param.Field[string] `json:"bucket_name"` // Name of the Queue to bind to QueueName param.Field[string] `json:"queue_name"` // ID of the D1 database to bind to ID param.Field[string] `json:"id"` // Namespace to bind to Namespace param.Field[string] `json:"namespace"` Outbound param.Field[interface{}] `json:"outbound,required"` // ID of the certificate to bind to CertificateID param.Field[string] `json:"certificate_id"` }
A binding to allow the Worker to communicate with resources
func (BindingParam) MarshalJSON ¶
func (r BindingParam) MarshalJSON() (data []byte, err error)
type BindingType ¶
type BindingType string
The class of resource that the binding provides.
const ( BindingTypeKVNamespace BindingType = "kv_namespace" BindingTypeService BindingType = "service" BindingTypeDurableObjectNamespace BindingType = "durable_object_namespace" BindingTypeR2Bucket BindingType = "r2_bucket" BindingTypeQueue BindingType = "queue" BindingTypeD1 BindingType = "d1" BindingTypeDispatchNamespace BindingType = "dispatch_namespace" BindingTypeMTLSCertificate BindingType = "mtls_certificate" )
func (BindingType) IsKnown ¶
func (r BindingType) IsKnown() bool
type BindingUnion ¶
type BindingUnion interface {
// contains filtered or unexported methods
}
A binding to allow the Worker to communicate with resources
Union satisfied by workers.KVNamespaceBinding, workers.ServiceBinding, workers.DurableObjectBinding, workers.R2Binding, workers.BindingWorkersQueueBinding, workers.D1Binding, workers.DispatchNamespaceBinding or workers.MTLSCERTBinding.
type BindingUnionParam ¶
type BindingUnionParam interface {
// contains filtered or unexported methods
}
A binding to allow the Worker to communicate with resources
Satisfied by workers.KVNamespaceBindingParam, workers.ServiceBindingParam, workers.DurableObjectBindingParam, workers.R2BindingParam, workers.BindingWorkersQueueBindingParam, workers.D1BindingParam, workers.DispatchNamespaceBindingParam, workers.MTLSCERTBindingParam, BindingParam.
type BindingWorkersQueueBinding ¶
type BindingWorkersQueueBinding struct { // A JavaScript variable name for the binding. Name string `json:"name,required"` // Name of the Queue to bind to QueueName string `json:"queue_name,required"` // The class of resource that the binding provides. Type BindingWorkersQueueBindingType `json:"type,required"` JSON bindingWorkersQueueBindingJSON `json:"-"` }
func (*BindingWorkersQueueBinding) UnmarshalJSON ¶
func (r *BindingWorkersQueueBinding) UnmarshalJSON(data []byte) (err error)
type BindingWorkersQueueBindingParam ¶
type BindingWorkersQueueBindingParam struct { // Name of the Queue to bind to QueueName param.Field[string] `json:"queue_name,required"` // The class of resource that the binding provides. Type param.Field[BindingWorkersQueueBindingType] `json:"type,required"` }
func (BindingWorkersQueueBindingParam) MarshalJSON ¶
func (r BindingWorkersQueueBindingParam) MarshalJSON() (data []byte, err error)
type BindingWorkersQueueBindingType ¶
type BindingWorkersQueueBindingType string
The class of resource that the binding provides.
const (
BindingWorkersQueueBindingTypeQueue BindingWorkersQueueBindingType = "queue"
)
func (BindingWorkersQueueBindingType) IsKnown ¶
func (r BindingWorkersQueueBindingType) IsKnown() bool
type CertificateCA ¶ added in v2.2.0
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶ added in v2.2.0
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 ¶ added in v2.3.0
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 D1Binding ¶
type D1Binding struct { // ID of the D1 database to bind to ID string `json:"id,required"` // A JavaScript variable name for the binding. Binding string `json:"binding,required"` // The name of the D1 database associated with the 'id' provided. Name string `json:"name,required"` // The class of resource that the binding provides. Type D1BindingType `json:"type,required"` JSON d1BindingJSON `json:"-"` }
func (*D1Binding) UnmarshalJSON ¶
type D1BindingParam ¶
type D1BindingParam struct { // ID of the D1 database to bind to ID param.Field[string] `json:"id,required"` // The name of the D1 database associated with the 'id' provided. Name param.Field[string] `json:"name,required"` // The class of resource that the binding provides. Type param.Field[D1BindingType] `json:"type,required"` }
func (D1BindingParam) MarshalJSON ¶
func (r D1BindingParam) MarshalJSON() (data []byte, err error)
type D1BindingType ¶
type D1BindingType string
The class of resource that the binding provides.
const (
D1BindingTypeD1 D1BindingType = "d1"
)
func (D1BindingType) IsKnown ¶
func (r D1BindingType) IsKnown() bool
type Deployment ¶
type Deployment struct { // Human-readable message about the deployment. 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. WorkersMessage param.Field[string] `json:"workers/message"` }
func (DeploymentParam) MarshalJSON ¶
func (r DeploymentParam) MarshalJSON() (data []byte, err error)
type DispatchNamespaceBinding ¶
type DispatchNamespaceBinding struct { // A JavaScript variable name for the binding. Name string `json:"name,required"` // Namespace to bind to Namespace string `json:"namespace,required"` // The class of resource that the binding provides. Type DispatchNamespaceBindingType `json:"type,required"` // Outbound worker Outbound DispatchNamespaceBindingOutbound `json:"outbound"` JSON dispatchNamespaceBindingJSON `json:"-"` }
func (*DispatchNamespaceBinding) UnmarshalJSON ¶
func (r *DispatchNamespaceBinding) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceBindingOutbound ¶
type DispatchNamespaceBindingOutbound struct { // Pass information from the Dispatch Worker to the Outbound Worker through the // parameters Params []string `json:"params"` // Outbound worker Worker DispatchNamespaceBindingOutboundWorker `json:"worker"` JSON dispatchNamespaceBindingOutboundJSON `json:"-"` }
Outbound worker
func (*DispatchNamespaceBindingOutbound) UnmarshalJSON ¶
func (r *DispatchNamespaceBindingOutbound) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceBindingOutboundParam ¶
type DispatchNamespaceBindingOutboundParam 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[DispatchNamespaceBindingOutboundWorkerParam] `json:"worker"` }
Outbound worker
func (DispatchNamespaceBindingOutboundParam) MarshalJSON ¶
func (r DispatchNamespaceBindingOutboundParam) MarshalJSON() (data []byte, err error)
type DispatchNamespaceBindingOutboundWorker ¶
type DispatchNamespaceBindingOutboundWorker struct { // Environment of the outbound worker Environment string `json:"environment"` // Name of the outbound worker Service string `json:"service"` JSON dispatchNamespaceBindingOutboundWorkerJSON `json:"-"` }
Outbound worker
func (*DispatchNamespaceBindingOutboundWorker) UnmarshalJSON ¶
func (r *DispatchNamespaceBindingOutboundWorker) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceBindingOutboundWorkerParam ¶
type DispatchNamespaceBindingOutboundWorkerParam 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 (DispatchNamespaceBindingOutboundWorkerParam) MarshalJSON ¶
func (r DispatchNamespaceBindingOutboundWorkerParam) MarshalJSON() (data []byte, err error)
type DispatchNamespaceBindingParam ¶
type DispatchNamespaceBindingParam struct { // Namespace to bind to Namespace param.Field[string] `json:"namespace,required"` // The class of resource that the binding provides. Type param.Field[DispatchNamespaceBindingType] `json:"type,required"` // Outbound worker Outbound param.Field[DispatchNamespaceBindingOutboundParam] `json:"outbound"` }
func (DispatchNamespaceBindingParam) MarshalJSON ¶
func (r DispatchNamespaceBindingParam) MarshalJSON() (data []byte, err error)
type DispatchNamespaceBindingType ¶
type DispatchNamespaceBindingType string
The class of resource that the binding provides.
const (
DispatchNamespaceBindingTypeDispatchNamespace DispatchNamespaceBindingType = "dispatch_namespace"
)
func (DispatchNamespaceBindingType) IsKnown ¶
func (r DispatchNamespaceBindingType) IsKnown() bool
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 { 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 { 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 DurableObjectBinding ¶
type DurableObjectBinding struct { // The exported class name of the Durable Object ClassName string `json:"class_name,required"` // A JavaScript variable name for the binding. Name string `json:"name,required"` // The class of resource that the binding provides. Type DurableObjectBindingType `json:"type,required"` // The environment of the script_name to bind to Environment string `json:"environment"` // Namespace identifier tag. NamespaceID string `json:"namespace_id"` // The script where the Durable Object is defined, if it is external to this Worker ScriptName string `json:"script_name"` JSON durableObjectBindingJSON `json:"-"` }
func (*DurableObjectBinding) UnmarshalJSON ¶
func (r *DurableObjectBinding) UnmarshalJSON(data []byte) (err error)
type DurableObjectBindingParam ¶
type DurableObjectBindingParam struct { // The exported class name of the Durable Object ClassName param.Field[string] `json:"class_name,required"` // The class of resource that the binding provides. Type param.Field[DurableObjectBindingType] `json:"type,required"` // The environment of the script_name to bind to Environment param.Field[string] `json:"environment"` // The script where the Durable Object is defined, if it is external to this Worker ScriptName param.Field[string] `json:"script_name"` }
func (DurableObjectBindingParam) MarshalJSON ¶
func (r DurableObjectBindingParam) MarshalJSON() (data []byte, err error)
type DurableObjectBindingType ¶
type DurableObjectBindingType string
The class of resource that the binding provides.
const (
DurableObjectBindingTypeDurableObjectNamespace DurableObjectBindingType = "durable_object_namespace"
)
func (DurableObjectBindingType) IsKnown ¶
func (r DurableObjectBindingType) IsKnown() bool
type KVNamespaceBinding ¶
type KVNamespaceBinding struct { // A JavaScript variable name for the binding. Name string `json:"name,required"` // Namespace identifier tag. NamespaceID string `json:"namespace_id,required"` // The class of resource that the binding provides. Type KVNamespaceBindingType `json:"type,required"` JSON kvNamespaceBindingJSON `json:"-"` }
func (*KVNamespaceBinding) UnmarshalJSON ¶
func (r *KVNamespaceBinding) UnmarshalJSON(data []byte) (err error)
type KVNamespaceBindingParam ¶
type KVNamespaceBindingParam struct { // The class of resource that the binding provides. Type param.Field[KVNamespaceBindingType] `json:"type,required"` }
func (KVNamespaceBindingParam) MarshalJSON ¶
func (r KVNamespaceBindingParam) MarshalJSON() (data []byte, err error)
type KVNamespaceBindingType ¶
type KVNamespaceBindingType string
The class of resource that the binding provides.
const (
KVNamespaceBindingTypeKVNamespace KVNamespaceBindingType = "kv_namespace"
)
func (KVNamespaceBindingType) IsKnown ¶
func (r KVNamespaceBindingType) IsKnown() bool
type MTLSCERTBinding ¶
type MTLSCERTBinding struct { // A JavaScript variable name for the binding. Name string `json:"name,required"` // The class of resource that the binding provides. Type MTLSCERTBindingType `json:"type,required"` // ID of the certificate to bind to CertificateID string `json:"certificate_id"` JSON mtlscertBindingJSON `json:"-"` }
func (*MTLSCERTBinding) UnmarshalJSON ¶
func (r *MTLSCERTBinding) UnmarshalJSON(data []byte) (err error)
type MTLSCERTBindingParam ¶
type MTLSCERTBindingParam struct { // The class of resource that the binding provides. Type param.Field[MTLSCERTBindingType] `json:"type,required"` // ID of the certificate to bind to CertificateID param.Field[string] `json:"certificate_id"` }
func (MTLSCERTBindingParam) MarshalJSON ¶
func (r MTLSCERTBindingParam) MarshalJSON() (data []byte, err error)
type MTLSCERTBindingType ¶
type MTLSCERTBindingType string
The class of resource that the binding provides.
const (
MTLSCERTBindingTypeMTLSCertificate MTLSCERTBindingType = "mtls_certificate"
)
func (MTLSCERTBindingType) IsKnown ¶
func (r MTLSCERTBindingType) IsKnown() bool
type MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
This is an alias to an internal type.
type MemberRoleParam ¶ added in v2.1.0
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberStatus ¶ added in v2.3.0
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
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 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 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 PlacementConfiguration ¶
type PlacementConfiguration struct { // Enables // [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). // Only `"smart"` is currently supported Mode PlacementConfigurationMode `json:"mode"` JSON placementConfigurationJSON `json:"-"` }
func (*PlacementConfiguration) UnmarshalJSON ¶
func (r *PlacementConfiguration) UnmarshalJSON(data []byte) (err error)
type PlacementConfigurationMode ¶
type PlacementConfigurationMode string
Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported
const (
PlacementConfigurationModeSmart PlacementConfigurationMode = "smart"
)
func (PlacementConfigurationMode) IsKnown ¶
func (r PlacementConfigurationMode) IsKnown() bool
type PlacementConfigurationParam ¶
type PlacementConfigurationParam struct { // Enables // [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). // Only `"smart"` is currently supported Mode param.Field[PlacementConfigurationMode] `json:"mode"` }
func (PlacementConfigurationParam) MarshalJSON ¶
func (r PlacementConfigurationParam) MarshalJSON() (data []byte, err error)
type R2Binding ¶
type R2Binding struct { // R2 bucket to bind to BucketName string `json:"bucket_name,required"` // A JavaScript variable name for the binding. Name string `json:"name,required"` // The class of resource that the binding provides. Type R2BindingType `json:"type,required"` JSON r2BindingJSON `json:"-"` }
func (*R2Binding) UnmarshalJSON ¶
type R2BindingParam ¶
type R2BindingParam struct { // R2 bucket to bind to BucketName param.Field[string] `json:"bucket_name,required"` // The class of resource that the binding provides. Type param.Field[R2BindingType] `json:"type,required"` }
func (R2BindingParam) MarshalJSON ¶
func (r R2BindingParam) MarshalJSON() (data []byte, err error)
type R2BindingType ¶
type R2BindingType string
The class of resource that the binding provides.
const (
R2BindingTypeR2Bucket R2BindingType = "r2_bucket"
)
func (R2BindingType) IsKnown ¶
func (r R2BindingType) IsKnown() bool
type Schedule ¶
type Schedule struct { CreatedOn interface{} `json:"created_on"` Cron interface{} `json:"cron"` ModifiedOn interface{} `json:"modified_on"` JSON scheduleJSON `json:"-"` }
func (*Schedule) UnmarshalJSON ¶
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 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"` // Specifies the placement mode for the Worker (e.g. 'smart'). PlacementMode string `json:"placement_mode"` // List of Workers that will consume logs from the attached Worker. TailConsumers []ConsumerScript `json:"tail_consumers"` // Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound'). UsageModel string `json:"usage_model"` JSON scriptJSON `json:"-"` }
func (*Script) UnmarshalJSON ¶
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"` // A module comprising a Worker script, often a javascript file. Multiple modules // may be provided as separate named parts, but at least one module must be // present. This should be referenced either in the metadata as `main_module` // (esm)/`body_part` (service worker) or as a header `CF-WORKER-MAIN-MODULE-PART` // (esm) /`CF-WORKER-BODY-PART` (service worker) by part name. Source maps may also // be included using the `application/source-map` content type. AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"` // JSON encoded metadata about the uploaded parts and Worker configuration. Metadata param.Field[WorkerMetadataParam] `json:"metadata"` 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 { ID string `json:"id"` Annotations Deployment `json:"annotations"` AuthorEmail string `json:"author_email"` CreatedOn string `json:"created_on"` Source string `json:"source"` Strategy string `json:"strategy"` JSON scriptDeploymentGetResponseDeploymentJSON `json:"-"` }
func (*ScriptDeploymentGetResponseDeployment) UnmarshalJSON ¶
func (r *ScriptDeploymentGetResponseDeployment) 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"` Annotations param.Field[DeploymentParam] `json:"annotations"` Strategy param.Field[string] `json:"strategy"` }
func (ScriptDeploymentNewParams) MarshalJSON ¶
func (r ScriptDeploymentNewParams) MarshalJSON() (data []byte, err error)
type ScriptDeploymentNewResponse ¶
type ScriptDeploymentNewResponse struct { ID string `json:"id"` Annotations Deployment `json:"annotations"` AuthorEmail string `json:"author_email"` CreatedOn string `json:"created_on"` Source string `json:"source"` Strategy string `json:"strategy"` 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 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 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 string `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 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 *http.Response, 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 *Script, err error)
Upload a worker module.
type ScriptSetting ¶
type ScriptSetting struct { // Whether Logpush is turned on for the Worker. Logpush bool `json:"logpush"` // 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 ScriptSettingParam ¶
type ScriptSettingParam struct { // Whether Logpush is turned on for the Worker. Logpush param.Field[bool] `json:"logpush"` // 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). Includes 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 ScriptTailDeleteParams ¶
type ScriptTailDeleteResponse ¶ added in v2.1.0
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 ¶ added in v2.1.0
func (r *ScriptTailDeleteResponse) UnmarshalJSON(data []byte) (err error)
type ScriptTailDeleteResponseSuccess ¶ added in v2.1.0
type ScriptTailDeleteResponseSuccess bool
Whether the API call was successful
const (
ScriptTailDeleteResponseSuccessTrue ScriptTailDeleteResponseSuccess = true
)
func (ScriptTailDeleteResponseSuccess) IsKnown ¶ added in v2.1.0
func (r ScriptTailDeleteResponseSuccess) IsKnown() bool
type ScriptTailGetParams ¶
type ScriptTailGetResponse ¶
type ScriptTailGetResponse struct { ID interface{} `json:"id"` ExpiresAt interface{} `json:"expires_at"` URL interface{} `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 interface{} `json:"id"` ExpiresAt interface{} `json:"expires_at"` URL interface{} `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"` Body ScriptUpdateParamsBodyUnion `json:"body,required"` // Rollback to provided deployment based on deployment ID. Request body will only // parse a "message" part. You can learn more about deployments // [here](https://developers.cloudflare.com/workers/platform/deployments/). RollbackTo param.Field[string] `query:"rollback_to"` }
func (ScriptUpdateParams) MarshalMultipart ¶
func (r ScriptUpdateParams) MarshalMultipart() (data []byte, contentType string, err error)
func (ScriptUpdateParams) URLQuery ¶
func (r ScriptUpdateParams) URLQuery() (v url.Values)
URLQuery serializes ScriptUpdateParams's query parameters as `url.Values`.
type ScriptUpdateParamsBody ¶
type ScriptUpdateParamsBody struct { AnyPartName param.Field[interface{}] `json:"<any part name>,required"` Metadata param.Field[interface{}] `json:"metadata,required"` // Rollback message to be associated with this deployment. Only parsed when query // param `"rollback_to"` is present. Message param.Field[string] `json:"message"` }
func (ScriptUpdateParamsBody) MarshalJSON ¶
func (r ScriptUpdateParamsBody) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsBodyObject ¶
type ScriptUpdateParamsBodyObject struct { // A module comprising a Worker script, often a javascript file. Multiple modules // may be provided as separate named parts, but at least one module must be present // and referenced in the metadata as `main_module` or `body_part` by part name. // Source maps may also be included using the `application/source-map` content // type. AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"` // JSON encoded metadata about the uploaded parts and Worker configuration. Metadata param.Field[ScriptUpdateParamsBodyObjectMetadata] `json:"metadata"` }
func (ScriptUpdateParamsBodyObject) MarshalJSON ¶
func (r ScriptUpdateParamsBodyObject) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsBodyObjectMetadata ¶
type ScriptUpdateParamsBodyObjectMetadata struct { // List of bindings available to the worker. Bindings param.Field[[]interface{}] `json:"bindings"` // Name of the part in the multipart request that contains the script (e.g. the // file adding a listener to the `fetch` event). Indicates a // `service worker syntax` Worker. BodyPart param.Field[string] `json:"body_part"` // Date indicating targeted support in the Workers runtime. Backwards incompatible // fixes to the runtime following this date will not affect this Worker. CompatibilityDate param.Field[string] `json:"compatibility_date"` // Flags that enable or disable certain features in the Workers runtime. Used to // enable upcoming features or opt in or out of specific changes not included in a // `compatibility_date`. CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"` // List of binding types to keep from previous_upload. KeepBindings param.Field[[]string] `json:"keep_bindings"` // Whether Logpush is turned on for the Worker. Logpush param.Field[bool] `json:"logpush"` // Name of the part in the multipart request that contains the main module (e.g. // the file exporting a `fetch` handler). Indicates a `module syntax` Worker. MainModule param.Field[string] `json:"main_module"` // Migrations to apply for Durable Objects associated with this Worker. Migrations param.Field[ScriptUpdateParamsBodyObjectMetadataMigrationsUnion] `json:"migrations"` Placement param.Field[PlacementConfigurationParam] `json:"placement"` // List of strings to use as tags for this Worker Tags param.Field[[]string] `json:"tags"` // List of Workers that will consume logs from the attached Worker. TailConsumers param.Field[[]ConsumerScriptParam] `json:"tail_consumers"` // Usage model to apply to invocations. UsageModel param.Field[ScriptUpdateParamsBodyObjectMetadataUsageModel] `json:"usage_model"` // Key-value pairs to use as tags for this version of this Worker VersionTags param.Field[interface{}] `json:"version_tags"` }
JSON encoded metadata about the uploaded parts and Worker configuration.
func (ScriptUpdateParamsBodyObjectMetadata) MarshalJSON ¶
func (r ScriptUpdateParamsBodyObjectMetadata) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsBodyObjectMetadataMigrations ¶
type ScriptUpdateParamsBodyObjectMetadataMigrations struct { // Tag to set as the latest migration tag. NewTag param.Field[string] `json:"new_tag"` // Tag used to verify against the latest migration tag for this Worker. If they // don't match, the upload is rejected. OldTag param.Field[string] `json:"old_tag"` DeletedClasses param.Field[interface{}] `json:"deleted_classes,required"` NewClasses param.Field[interface{}] `json:"new_classes,required"` RenamedClasses param.Field[interface{}] `json:"renamed_classes,required"` TransferredClasses param.Field[interface{}] `json:"transferred_classes,required"` Steps param.Field[interface{}] `json:"steps,required"` }
Migrations to apply for Durable Objects associated with this Worker.
func (ScriptUpdateParamsBodyObjectMetadataMigrations) MarshalJSON ¶
func (r ScriptUpdateParamsBodyObjectMetadataMigrations) MarshalJSON() (data []byte, err error)
type ScriptUpdateParamsBodyObjectMetadataMigrationsUnion ¶
type ScriptUpdateParamsBodyObjectMetadataMigrationsUnion interface {
// contains filtered or unexported methods
}
Migrations to apply for Durable Objects associated with this Worker.
Satisfied by workers.SingleStepMigrationParam, workers.SteppedMigrationParam, ScriptUpdateParamsBodyObjectMetadataMigrations.
type ScriptUpdateParamsBodyObjectMetadataUsageModel ¶
type ScriptUpdateParamsBodyObjectMetadataUsageModel string
Usage model to apply to invocations.
const ( ScriptUpdateParamsBodyObjectMetadataUsageModelBundled ScriptUpdateParamsBodyObjectMetadataUsageModel = "bundled" ScriptUpdateParamsBodyObjectMetadataUsageModelUnbound ScriptUpdateParamsBodyObjectMetadataUsageModel = "unbound" )
func (ScriptUpdateParamsBodyObjectMetadataUsageModel) IsKnown ¶
func (r ScriptUpdateParamsBodyObjectMetadataUsageModel) IsKnown() bool
type ScriptUpdateParamsBodyUnion ¶
type ScriptUpdateParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by workers.ScriptUpdateParamsBodyObject, workers.ScriptUpdateParamsBodyObject, ScriptUpdateParamsBody.
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 Script `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 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 ¶ added in v2.3.0
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"` // A module comprising a Worker script, often a javascript file. Multiple modules // may be provided as separate named parts, but at least one module must be present // and referenced in the metadata as `main_module`. AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"` // JSON encoded metadata about the uploaded parts and Worker configuration. Metadata param.Field[ScriptVersionNewParamsMetadata] `json:"metadata"` }
func (ScriptVersionNewParams) MarshalMultipart ¶
func (r ScriptVersionNewParams) MarshalMultipart() (data []byte, contentType string, err error)
type ScriptVersionNewParamsMetadata ¶
type ScriptVersionNewParamsMetadata struct { Annotations param.Field[ScriptVersionNewParamsMetadataAnnotations] `json:"annotations"` // List of bindings available to the worker. Bindings param.Field[[]interface{}] `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"` // 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"` // Usage model to apply to 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. 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 ScriptVersionNewParamsMetadataUsageModel ¶
type ScriptVersionNewParamsMetadataUsageModel string
Usage model to apply to 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"` 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 ¶ added in v2.3.0
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.
type ServiceBinding ¶
type ServiceBinding struct { // Optional environment if the Worker utilizes one. Environment string `json:"environment,required"` // A JavaScript variable name for the binding. Name string `json:"name,required"` // Name of Worker to bind to Service string `json:"service,required"` // The class of resource that the binding provides. Type ServiceBindingType `json:"type,required"` JSON serviceBindingJSON `json:"-"` }
func (*ServiceBinding) UnmarshalJSON ¶
func (r *ServiceBinding) UnmarshalJSON(data []byte) (err error)
type ServiceBindingParam ¶
type ServiceBindingParam struct { // Optional environment if the Worker utilizes one. Environment param.Field[string] `json:"environment,required"` // Name of Worker to bind to Service param.Field[string] `json:"service,required"` // The class of resource that the binding provides. Type param.Field[ServiceBindingType] `json:"type,required"` }
func (ServiceBindingParam) MarshalJSON ¶
func (r ServiceBindingParam) MarshalJSON() (data []byte, err error)
type ServiceBindingType ¶
type ServiceBindingType string
The class of resource that the binding provides.
const (
ServiceBindingTypeService ServiceBindingType = "service"
)
func (ServiceBindingType) IsKnown ¶
func (r ServiceBindingType) IsKnown() bool
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"` // 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 ¶ added in v2.2.0
func (r SingleStepMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations()
func (SingleStepMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations ¶ added in v2.2.0
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"` // 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 ¶ added in v2.2.0
func (r SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion()
func (SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion ¶ added in v2.2.0
func (r SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion()
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 ¶ added in v2.2.0
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type SteppedMigration ¶
type SteppedMigration struct { // Tag to set as the latest migration tag. NewTag string `json:"new_tag"` // Tag used to verify against the latest migration tag for this Worker. If they // don't match, the upload is rejected. OldTag string `json:"old_tag"` // Migrations to apply in order. Steps []MigrationStep `json:"steps"` JSON steppedMigrationJSON `json:"-"` }
func (SteppedMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations ¶ added in v2.2.0
func (r SteppedMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations()
func (SteppedMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations ¶ added in v2.2.0
func (r SteppedMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations()
func (*SteppedMigration) UnmarshalJSON ¶
func (r *SteppedMigration) UnmarshalJSON(data []byte) (err error)
type SteppedMigrationParam ¶
type SteppedMigrationParam 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 (SteppedMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion ¶ added in v2.2.0
func (r SteppedMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion()
func (SteppedMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion ¶ added in v2.2.0
func (r SteppedMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion()
func (SteppedMigrationParam) MarshalJSON ¶
func (r SteppedMigrationParam) MarshalJSON() (data []byte, err error)
type SubdomainGetParams ¶
type SubdomainGetResponse ¶
type SubdomainGetResponse struct { Name interface{} `json:"name"` 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"` Body string `json:"body,required"` }
func (SubdomainUpdateParams) MarshalJSON ¶
func (r SubdomainUpdateParams) MarshalJSON() (data []byte, err error)
type SubdomainUpdateResponse ¶
type SubdomainUpdateResponse struct { Name interface{} `json:"name"` 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 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 AI *AIService 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.