Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type DispatchNamespaceDeleteResponse
- type DispatchNamespaceDeleteResponseEnvelope
- type DispatchNamespaceDeleteResponseEnvelopeSuccess
- type DispatchNamespaceGetResponse
- type DispatchNamespaceGetResponseEnvelope
- type DispatchNamespaceGetResponseEnvelopeSuccess
- type DispatchNamespaceListResponse
- type DispatchNamespaceNewParams
- type DispatchNamespaceNewResponse
- type DispatchNamespaceNewResponseEnvelope
- type DispatchNamespaceNewResponseEnvelopeSuccess
- type DispatchNamespaceScriptBindingGetResponseEnvelope
- type DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess
- type DispatchNamespaceScriptBindingService
- type DispatchNamespaceScriptContentService
- func (r *DispatchNamespaceScriptContentService) Get(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *http.Response, err error)
- func (r *DispatchNamespaceScriptContentService) Update(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *workers.Script, err error)
- type DispatchNamespaceScriptContentUpdateParams
- type DispatchNamespaceScriptContentUpdateResponseEnvelope
- type DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess
- type DispatchNamespaceScriptDeleteParams
- type DispatchNamespaceScriptGetResponseEnvelope
- type DispatchNamespaceScriptGetResponseEnvelopeSuccess
- type DispatchNamespaceScriptSecretListResponse
- type DispatchNamespaceScriptSecretListResponseType
- type DispatchNamespaceScriptSecretService
- func (r *DispatchNamespaceScriptSecretService) List(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *pagination.SinglePage[DispatchNamespaceScriptSecretListResponse], ...)
- func (r *DispatchNamespaceScriptSecretService) ListAutoPaging(ctx context.Context, accountID string, dispatchNamespace string, ...) *pagination.SinglePageAutoPager[DispatchNamespaceScriptSecretListResponse]
- func (r *DispatchNamespaceScriptSecretService) Update(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *DispatchNamespaceScriptSecretUpdateResponse, err error)
- type DispatchNamespaceScriptSecretUpdateParams
- type DispatchNamespaceScriptSecretUpdateParamsType
- type DispatchNamespaceScriptSecretUpdateResponse
- type DispatchNamespaceScriptSecretUpdateResponseEnvelope
- type DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess
- type DispatchNamespaceScriptSecretUpdateResponseType
- type DispatchNamespaceScriptService
- func (r *DispatchNamespaceScriptService) Delete(ctx context.Context, accountID string, dispatchNamespace string, ...) (err error)
- func (r *DispatchNamespaceScriptService) Get(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *Script, err error)
- func (r *DispatchNamespaceScriptService) Update(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *workers.Script, err error)
- type DispatchNamespaceScriptSettingEditParams
- type DispatchNamespaceScriptSettingEditParamsSettings
- type DispatchNamespaceScriptSettingEditParamsSettingsLimits
- type DispatchNamespaceScriptSettingEditParamsSettingsMigrations
- type DispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion
- type DispatchNamespaceScriptSettingEditResponse
- type DispatchNamespaceScriptSettingEditResponseEnvelope
- type DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess
- type DispatchNamespaceScriptSettingEditResponseLimits
- type DispatchNamespaceScriptSettingEditResponseMigrations
- type DispatchNamespaceScriptSettingEditResponseMigrationsUnion
- type DispatchNamespaceScriptSettingGetResponse
- type DispatchNamespaceScriptSettingGetResponseEnvelope
- type DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess
- type DispatchNamespaceScriptSettingGetResponseLimits
- type DispatchNamespaceScriptSettingGetResponseMigrations
- type DispatchNamespaceScriptSettingGetResponseMigrationsUnion
- type DispatchNamespaceScriptSettingService
- func (r *DispatchNamespaceScriptSettingService) Edit(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *DispatchNamespaceScriptSettingEditResponse, err error)
- func (r *DispatchNamespaceScriptSettingService) Get(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *DispatchNamespaceScriptSettingGetResponse, err error)
- type DispatchNamespaceScriptTagDeleteResponse
- type DispatchNamespaceScriptTagDeleteResponseEnvelope
- type DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess
- type DispatchNamespaceScriptTagService
- func (r *DispatchNamespaceScriptTagService) Delete(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *DispatchNamespaceScriptTagDeleteResponse, err error)
- func (r *DispatchNamespaceScriptTagService) List(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *pagination.SinglePage[string], err error)
- func (r *DispatchNamespaceScriptTagService) ListAutoPaging(ctx context.Context, accountID string, dispatchNamespace string, ...) *pagination.SinglePageAutoPager[string]
- func (r *DispatchNamespaceScriptTagService) Update(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *[]string, err error)
- type DispatchNamespaceScriptTagUpdateParams
- type DispatchNamespaceScriptTagUpdateResponseEnvelope
- type DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess
- type DispatchNamespaceScriptUpdateParams
- type DispatchNamespaceScriptUpdateParamsBody
- type DispatchNamespaceScriptUpdateParamsBodyMessage
- type DispatchNamespaceScriptUpdateParamsBodyObject
- type DispatchNamespaceScriptUpdateParamsBodyObjectMetadata
- type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations
- type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion
- type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel
- type DispatchNamespaceScriptUpdateParamsBodyUnion
- type DispatchNamespaceScriptUpdateResponseEnvelope
- type DispatchNamespaceScriptUpdateResponseEnvelopeSuccess
- type DispatchNamespaceService
- func (r *DispatchNamespaceService) Delete(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *DispatchNamespaceDeleteResponse, err error)
- func (r *DispatchNamespaceService) Get(ctx context.Context, accountID string, dispatchNamespace string, ...) (res *DispatchNamespaceGetResponse, err error)
- func (r *DispatchNamespaceService) List(ctx context.Context, accountID string, opts ...option.RequestOption) (res *pagination.SinglePage[DispatchNamespaceListResponse], err error)
- func (r *DispatchNamespaceService) ListAutoPaging(ctx context.Context, accountID string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[DispatchNamespaceListResponse]
- func (r *DispatchNamespaceService) New(ctx context.Context, accountID string, body DispatchNamespaceNewParams, ...) (res *DispatchNamespaceNewResponse, err error)
- type DispatchService
- type Error
- type ErrorData
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type ResponseInfo
- type Role
- type Script
- type SortDirection
- type WorkersForPlatformService
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 AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type CertificateCA ¶
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
This is an alias to an internal type.
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelStatus ¶
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type DispatchNamespaceDeleteResponse ¶
type DispatchNamespaceDeleteResponse = interface{}
type DispatchNamespaceDeleteResponseEnvelope ¶
type DispatchNamespaceDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceDeleteResponseEnvelopeSuccess `json:"success,required"` Result DispatchNamespaceDeleteResponse `json:"result,nullable"` JSON dispatchNamespaceDeleteResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceDeleteResponseEnvelopeSuccess ¶
type DispatchNamespaceDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceDeleteResponseEnvelopeSuccessTrue DispatchNamespaceDeleteResponseEnvelopeSuccess = true
)
func (DispatchNamespaceDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceDeleteResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceGetResponse ¶
type DispatchNamespaceGetResponse struct { // Identifier CreatedBy string `json:"created_by"` // When the script was created. CreatedOn time.Time `json:"created_on" format:"date-time"` // Identifier ModifiedBy string `json:"modified_by"` // When the script was last modified. ModifiedOn time.Time `json:"modified_on" format:"date-time"` // API Resource UUID tag. NamespaceID string `json:"namespace_id"` // Name of the Workers for Platforms dispatch namespace. NamespaceName string `json:"namespace_name"` // The current number of scripts in this Dispatch Namespace ScriptCount int64 `json:"script_count"` JSON dispatchNamespaceGetResponseJSON `json:"-"` }
func (*DispatchNamespaceGetResponse) UnmarshalJSON ¶
func (r *DispatchNamespaceGetResponse) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceGetResponseEnvelope ¶
type DispatchNamespaceGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceGetResponseEnvelopeSuccess `json:"success,required"` Result DispatchNamespaceGetResponse `json:"result"` JSON dispatchNamespaceGetResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceGetResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceGetResponseEnvelopeSuccess ¶
type DispatchNamespaceGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceGetResponseEnvelopeSuccessTrue DispatchNamespaceGetResponseEnvelopeSuccess = true
)
func (DispatchNamespaceGetResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceGetResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceListResponse ¶
type DispatchNamespaceListResponse struct { // Identifier CreatedBy string `json:"created_by"` // When the script was created. CreatedOn time.Time `json:"created_on" format:"date-time"` // Identifier ModifiedBy string `json:"modified_by"` // When the script was last modified. ModifiedOn time.Time `json:"modified_on" format:"date-time"` // API Resource UUID tag. NamespaceID string `json:"namespace_id"` // Name of the Workers for Platforms dispatch namespace. NamespaceName string `json:"namespace_name"` // The current number of scripts in this Dispatch Namespace ScriptCount int64 `json:"script_count"` JSON dispatchNamespaceListResponseJSON `json:"-"` }
func (*DispatchNamespaceListResponse) UnmarshalJSON ¶
func (r *DispatchNamespaceListResponse) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceNewParams ¶
type DispatchNamespaceNewParams struct { // The name of the dispatch namespace Name param.Field[string] `json:"name"` }
func (DispatchNamespaceNewParams) MarshalJSON ¶
func (r DispatchNamespaceNewParams) MarshalJSON() (data []byte, err error)
type DispatchNamespaceNewResponse ¶
type DispatchNamespaceNewResponse struct { // Identifier CreatedBy string `json:"created_by"` // When the script was created. CreatedOn time.Time `json:"created_on" format:"date-time"` // Identifier ModifiedBy string `json:"modified_by"` // When the script was last modified. ModifiedOn time.Time `json:"modified_on" format:"date-time"` // API Resource UUID tag. NamespaceID string `json:"namespace_id"` // Name of the Workers for Platforms dispatch namespace. NamespaceName string `json:"namespace_name"` // The current number of scripts in this Dispatch Namespace ScriptCount int64 `json:"script_count"` JSON dispatchNamespaceNewResponseJSON `json:"-"` }
func (*DispatchNamespaceNewResponse) UnmarshalJSON ¶
func (r *DispatchNamespaceNewResponse) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceNewResponseEnvelope ¶
type DispatchNamespaceNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceNewResponseEnvelopeSuccess `json:"success,required"` Result DispatchNamespaceNewResponse `json:"result"` JSON dispatchNamespaceNewResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceNewResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceNewResponseEnvelopeSuccess ¶
type DispatchNamespaceNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceNewResponseEnvelopeSuccessTrue DispatchNamespaceNewResponseEnvelopeSuccess = true
)
func (DispatchNamespaceNewResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceNewResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceScriptBindingGetResponseEnvelope ¶
type DispatchNamespaceScriptBindingGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess `json:"success,required"` // List of bindings attached to this Worker Result []workers.Binding `json:"result"` JSON dispatchNamespaceScriptBindingGetResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceScriptBindingGetResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptBindingGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess ¶
type DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceScriptBindingGetResponseEnvelopeSuccessTrue DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess = true
)
func (DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceScriptBindingGetResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceScriptBindingService ¶
type DispatchNamespaceScriptBindingService struct {
Options []option.RequestOption
}
DispatchNamespaceScriptBindingService contains methods and other services that help with interacting with the testcloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDispatchNamespaceScriptBindingService method instead.
func NewDispatchNamespaceScriptBindingService ¶
func NewDispatchNamespaceScriptBindingService(opts ...option.RequestOption) (r *DispatchNamespaceScriptBindingService)
NewDispatchNamespaceScriptBindingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DispatchNamespaceScriptBindingService) Get ¶
func (r *DispatchNamespaceScriptBindingService) Get(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, opts ...option.RequestOption) (res *[]workers.Binding, err error)
Fetch script bindings from a script uploaded to a Workers for Platforms namespace.
type DispatchNamespaceScriptContentService ¶
type DispatchNamespaceScriptContentService struct {
Options []option.RequestOption
}
DispatchNamespaceScriptContentService contains methods and other services that help with interacting with the testcloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDispatchNamespaceScriptContentService method instead.
func NewDispatchNamespaceScriptContentService ¶
func NewDispatchNamespaceScriptContentService(opts ...option.RequestOption) (r *DispatchNamespaceScriptContentService)
NewDispatchNamespaceScriptContentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DispatchNamespaceScriptContentService) Get ¶
func (r *DispatchNamespaceScriptContentService) Get(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, opts ...option.RequestOption) (res *http.Response, err error)
Fetch script content from a script uploaded to a Workers for Platforms namespace.
func (*DispatchNamespaceScriptContentService) Update ¶
func (r *DispatchNamespaceScriptContentService) Update(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, params DispatchNamespaceScriptContentUpdateParams, opts ...option.RequestOption) (res *workers.Script, err error)
Put script content for a script uploaded to a Workers for Platforms namespace.
type DispatchNamespaceScriptContentUpdateParams ¶
type DispatchNamespaceScriptContentUpdateParams 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. This should be referenced either in the metadata as `main_module` // (esm)/`body_part` (service worker) or as a header `CF-WORKER-MAIN-MODULE-PART` // (esm) /`CF-WORKER-BODY-PART` (service worker) by part name. Source maps may also // be included using the `application/source-map` content type. AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"` // JSON encoded metadata about the uploaded parts and Worker configuration. Metadata param.Field[workers.WorkerMetadataParam] `json:"metadata"` CfWorkerBodyPart param.Field[string] `header:"CF-WORKER-BODY-PART"` CfWorkerMainModulePart param.Field[string] `header:"CF-WORKER-MAIN-MODULE-PART"` }
func (DispatchNamespaceScriptContentUpdateParams) MarshalMultipart ¶
func (r DispatchNamespaceScriptContentUpdateParams) MarshalMultipart() (data []byte, contentType string, err error)
type DispatchNamespaceScriptContentUpdateResponseEnvelope ¶
type DispatchNamespaceScriptContentUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess `json:"success,required"` Result workers.Script `json:"result"` JSON dispatchNamespaceScriptContentUpdateResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceScriptContentUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptContentUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess ¶
type DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccessTrue DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess = true
)
func (DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceScriptContentUpdateResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceScriptDeleteParams ¶
type DispatchNamespaceScriptDeleteParams struct { // If set to true, delete will not be stopped by associated service binding, // durable object, or other binding. Any of these associated bindings/durable // objects will be deleted along with the script. Force param.Field[bool] `query:"force"` }
func (DispatchNamespaceScriptDeleteParams) URLQuery ¶
func (r DispatchNamespaceScriptDeleteParams) URLQuery() (v url.Values)
URLQuery serializes DispatchNamespaceScriptDeleteParams's query parameters as `url.Values`.
type DispatchNamespaceScriptGetResponseEnvelope ¶
type DispatchNamespaceScriptGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceScriptGetResponseEnvelopeSuccess `json:"success,required"` // Details about a worker uploaded to a Workers for Platforms namespace. Result Script `json:"result"` JSON dispatchNamespaceScriptGetResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceScriptGetResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptGetResponseEnvelopeSuccess ¶
type DispatchNamespaceScriptGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceScriptGetResponseEnvelopeSuccessTrue DispatchNamespaceScriptGetResponseEnvelopeSuccess = true
)
func (DispatchNamespaceScriptGetResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceScriptGetResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceScriptSecretListResponse ¶
type DispatchNamespaceScriptSecretListResponse struct { // The name of this secret, this is what will be to access it inside the Worker. Name string `json:"name"` // The type of secret to put. Type DispatchNamespaceScriptSecretListResponseType `json:"type"` JSON dispatchNamespaceScriptSecretListResponseJSON `json:"-"` }
func (*DispatchNamespaceScriptSecretListResponse) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptSecretListResponse) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptSecretListResponseType ¶
type DispatchNamespaceScriptSecretListResponseType string
The type of secret to put.
const (
DispatchNamespaceScriptSecretListResponseTypeSecretText DispatchNamespaceScriptSecretListResponseType = "secret_text"
)
func (DispatchNamespaceScriptSecretListResponseType) IsKnown ¶
func (r DispatchNamespaceScriptSecretListResponseType) IsKnown() bool
type DispatchNamespaceScriptSecretService ¶
type DispatchNamespaceScriptSecretService struct {
Options []option.RequestOption
}
DispatchNamespaceScriptSecretService contains methods and other services that help with interacting with the testcloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDispatchNamespaceScriptSecretService method instead.
func NewDispatchNamespaceScriptSecretService ¶
func NewDispatchNamespaceScriptSecretService(opts ...option.RequestOption) (r *DispatchNamespaceScriptSecretService)
NewDispatchNamespaceScriptSecretService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DispatchNamespaceScriptSecretService) List ¶
func (r *DispatchNamespaceScriptSecretService) List(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, opts ...option.RequestOption) (res *pagination.SinglePage[DispatchNamespaceScriptSecretListResponse], err error)
Fetch secrets from a script uploaded to a Workers for Platforms namespace.
func (*DispatchNamespaceScriptSecretService) ListAutoPaging ¶
func (r *DispatchNamespaceScriptSecretService) ListAutoPaging(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[DispatchNamespaceScriptSecretListResponse]
Fetch secrets from a script uploaded to a Workers for Platforms namespace.
func (*DispatchNamespaceScriptSecretService) Update ¶
func (r *DispatchNamespaceScriptSecretService) Update(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, body DispatchNamespaceScriptSecretUpdateParams, opts ...option.RequestOption) (res *DispatchNamespaceScriptSecretUpdateResponse, err error)
Put secrets to a script uploaded to a Workers for Platforms namespace.
type DispatchNamespaceScriptSecretUpdateParams ¶
type DispatchNamespaceScriptSecretUpdateParams struct { // The name of this secret, this is what will be to access it inside the Worker. Name param.Field[string] `json:"name"` // The value of the secret. Text param.Field[string] `json:"text"` // The type of secret to put. Type param.Field[DispatchNamespaceScriptSecretUpdateParamsType] `json:"type"` }
func (DispatchNamespaceScriptSecretUpdateParams) MarshalJSON ¶
func (r DispatchNamespaceScriptSecretUpdateParams) MarshalJSON() (data []byte, err error)
type DispatchNamespaceScriptSecretUpdateParamsType ¶
type DispatchNamespaceScriptSecretUpdateParamsType string
The type of secret to put.
const (
DispatchNamespaceScriptSecretUpdateParamsTypeSecretText DispatchNamespaceScriptSecretUpdateParamsType = "secret_text"
)
func (DispatchNamespaceScriptSecretUpdateParamsType) IsKnown ¶
func (r DispatchNamespaceScriptSecretUpdateParamsType) IsKnown() bool
type DispatchNamespaceScriptSecretUpdateResponse ¶
type DispatchNamespaceScriptSecretUpdateResponse struct { // The name of this secret, this is what will be to access it inside the Worker. Name string `json:"name"` // The type of secret to put. Type DispatchNamespaceScriptSecretUpdateResponseType `json:"type"` JSON dispatchNamespaceScriptSecretUpdateResponseJSON `json:"-"` }
func (*DispatchNamespaceScriptSecretUpdateResponse) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptSecretUpdateResponse) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptSecretUpdateResponseEnvelope ¶
type DispatchNamespaceScriptSecretUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess `json:"success,required"` Result DispatchNamespaceScriptSecretUpdateResponse `json:"result"` JSON dispatchNamespaceScriptSecretUpdateResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceScriptSecretUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptSecretUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess ¶
type DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccessTrue DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess = true
)
func (DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceScriptSecretUpdateResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceScriptSecretUpdateResponseType ¶
type DispatchNamespaceScriptSecretUpdateResponseType string
The type of secret to put.
const (
DispatchNamespaceScriptSecretUpdateResponseTypeSecretText DispatchNamespaceScriptSecretUpdateResponseType = "secret_text"
)
func (DispatchNamespaceScriptSecretUpdateResponseType) IsKnown ¶
func (r DispatchNamespaceScriptSecretUpdateResponseType) IsKnown() bool
type DispatchNamespaceScriptService ¶
type DispatchNamespaceScriptService struct { Options []option.RequestOption Content *DispatchNamespaceScriptContentService Settings *DispatchNamespaceScriptSettingService Bindings *DispatchNamespaceScriptBindingService Secrets *DispatchNamespaceScriptSecretService Tags *DispatchNamespaceScriptTagService }
DispatchNamespaceScriptService contains methods and other services that help with interacting with the testcloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDispatchNamespaceScriptService method instead.
func NewDispatchNamespaceScriptService ¶
func NewDispatchNamespaceScriptService(opts ...option.RequestOption) (r *DispatchNamespaceScriptService)
NewDispatchNamespaceScriptService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DispatchNamespaceScriptService) Delete ¶
func (r *DispatchNamespaceScriptService) Delete(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, body DispatchNamespaceScriptDeleteParams, opts ...option.RequestOption) (err error)
Delete a worker from a Workers for Platforms namespace. This call has no response body on a successful delete.
func (*DispatchNamespaceScriptService) Get ¶
func (r *DispatchNamespaceScriptService) Get(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, opts ...option.RequestOption) (res *Script, err error)
Fetch information about a script uploaded to a Workers for Platforms namespace.
func (*DispatchNamespaceScriptService) Update ¶
func (r *DispatchNamespaceScriptService) Update(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, body DispatchNamespaceScriptUpdateParams, opts ...option.RequestOption) (res *workers.Script, err error)
Upload a worker module to a Workers for Platforms namespace. You can find an example of the metadata on our docs: https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/reference/metadata/
type DispatchNamespaceScriptSettingEditParams ¶
type DispatchNamespaceScriptSettingEditParams struct {
Settings param.Field[DispatchNamespaceScriptSettingEditParamsSettings] `json:"settings"`
}
func (DispatchNamespaceScriptSettingEditParams) MarshalMultipart ¶
func (r DispatchNamespaceScriptSettingEditParams) MarshalMultipart() (data []byte, contentType string, err error)
type DispatchNamespaceScriptSettingEditParamsSettings ¶
type DispatchNamespaceScriptSettingEditParamsSettings struct { // List of bindings attached to this Worker Bindings param.Field[[]workers.BindingUnionParam] `json:"bindings"` // Opt your Worker into changes after this date CompatibilityDate param.Field[string] `json:"compatibility_date"` // Opt your Worker into specific changes CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"` // Limits to apply for this Worker. Limits param.Field[DispatchNamespaceScriptSettingEditParamsSettingsLimits] `json:"limits"` // Whether Logpush is turned on for the Worker. Logpush param.Field[bool] `json:"logpush"` // Migrations to apply for Durable Objects associated with this Worker. Migrations param.Field[DispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion] `json:"migrations"` Placement param.Field[workers.PlacementConfigurationParam] `json:"placement"` // Tags to help you manage your Workers Tags param.Field[[]string] `json:"tags"` // List of Workers that will consume logs from the attached Worker. TailConsumers param.Field[[]workers.ConsumerScriptParam] `json:"tail_consumers"` // Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound'). UsageModel param.Field[string] `json:"usage_model"` }
func (DispatchNamespaceScriptSettingEditParamsSettings) MarshalJSON ¶
func (r DispatchNamespaceScriptSettingEditParamsSettings) MarshalJSON() (data []byte, err error)
type DispatchNamespaceScriptSettingEditParamsSettingsLimits ¶
type DispatchNamespaceScriptSettingEditParamsSettingsLimits struct { // The amount of CPU time this Worker can use in milliseconds. CPUMs param.Field[int64] `json:"cpu_ms"` }
Limits to apply for this Worker.
func (DispatchNamespaceScriptSettingEditParamsSettingsLimits) MarshalJSON ¶
func (r DispatchNamespaceScriptSettingEditParamsSettingsLimits) MarshalJSON() (data []byte, err error)
type DispatchNamespaceScriptSettingEditParamsSettingsMigrations ¶
type DispatchNamespaceScriptSettingEditParamsSettingsMigrations struct { // Tag to set as the latest migration tag. NewTag param.Field[string] `json:"new_tag"` // Tag used to verify against the latest migration tag for this Worker. If they // don't match, the upload is rejected. OldTag param.Field[string] `json:"old_tag"` DeletedClasses param.Field[interface{}] `json:"deleted_classes,required"` NewClasses param.Field[interface{}] `json:"new_classes,required"` RenamedClasses param.Field[interface{}] `json:"renamed_classes,required"` TransferredClasses param.Field[interface{}] `json:"transferred_classes,required"` Steps param.Field[interface{}] `json:"steps,required"` }
Migrations to apply for Durable Objects associated with this Worker.
func (DispatchNamespaceScriptSettingEditParamsSettingsMigrations) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion ¶
func (r DispatchNamespaceScriptSettingEditParamsSettingsMigrations) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion()
func (DispatchNamespaceScriptSettingEditParamsSettingsMigrations) MarshalJSON ¶
func (r DispatchNamespaceScriptSettingEditParamsSettingsMigrations) MarshalJSON() (data []byte, err error)
type DispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion ¶
type DispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion interface {
ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion()
}
Migrations to apply for Durable Objects associated with this Worker.
Satisfied by workers.SingleStepMigrationParam, workers.SteppedMigrationParam, DispatchNamespaceScriptSettingEditParamsSettingsMigrations.
type DispatchNamespaceScriptSettingEditResponse ¶
type DispatchNamespaceScriptSettingEditResponse struct { // List of bindings attached to this Worker Bindings []workers.Binding `json:"bindings"` // Opt your Worker into changes after this date CompatibilityDate string `json:"compatibility_date"` // Opt your Worker into specific changes CompatibilityFlags []string `json:"compatibility_flags"` // Limits to apply for this Worker. Limits DispatchNamespaceScriptSettingEditResponseLimits `json:"limits"` // Whether Logpush is turned on for the Worker. Logpush bool `json:"logpush"` // Migrations to apply for Durable Objects associated with this Worker. Migrations DispatchNamespaceScriptSettingEditResponseMigrations `json:"migrations"` Placement workers.PlacementConfiguration `json:"placement"` // Tags to help you manage your Workers Tags []string `json:"tags"` // List of Workers that will consume logs from the attached Worker. TailConsumers []workers.ConsumerScript `json:"tail_consumers"` // Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound'). UsageModel string `json:"usage_model"` JSON dispatchNamespaceScriptSettingEditResponseJSON `json:"-"` }
func (*DispatchNamespaceScriptSettingEditResponse) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptSettingEditResponse) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptSettingEditResponseEnvelope ¶
type DispatchNamespaceScriptSettingEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess `json:"success,required"` Result DispatchNamespaceScriptSettingEditResponse `json:"result"` JSON dispatchNamespaceScriptSettingEditResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceScriptSettingEditResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptSettingEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess ¶
type DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceScriptSettingEditResponseEnvelopeSuccessTrue DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess = true
)
func (DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceScriptSettingEditResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceScriptSettingEditResponseLimits ¶
type DispatchNamespaceScriptSettingEditResponseLimits struct { // The amount of CPU time this Worker can use in milliseconds. CPUMs int64 `json:"cpu_ms"` JSON dispatchNamespaceScriptSettingEditResponseLimitsJSON `json:"-"` }
Limits to apply for this Worker.
func (*DispatchNamespaceScriptSettingEditResponseLimits) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptSettingEditResponseLimits) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptSettingEditResponseMigrations ¶
type DispatchNamespaceScriptSettingEditResponseMigrations struct { // Tag to set as the latest migration tag. NewTag string `json:"new_tag"` // Tag used to verify against the latest migration tag for this Worker. If they // don't match, the upload is rejected. OldTag string `json:"old_tag"` // This field can have the runtime type of [[]string]. DeletedClasses interface{} `json:"deleted_classes,required"` // This field can have the runtime type of [[]string]. NewClasses interface{} `json:"new_classes,required"` // This field can have the runtime type of // [[]workers.SingleStepMigrationRenamedClass]. RenamedClasses interface{} `json:"renamed_classes,required"` // This field can have the runtime type of // [[]workers.SingleStepMigrationTransferredClass]. TransferredClasses interface{} `json:"transferred_classes,required"` // This field can have the runtime type of [[]workers.MigrationStep]. Steps interface{} `json:"steps,required"` JSON dispatchNamespaceScriptSettingEditResponseMigrationsJSON `json:"-"` // contains filtered or unexported fields }
Migrations to apply for Durable Objects associated with this Worker.
func (DispatchNamespaceScriptSettingEditResponseMigrations) AsUnion ¶
func (r DispatchNamespaceScriptSettingEditResponseMigrations) AsUnion() DispatchNamespaceScriptSettingEditResponseMigrationsUnion
AsUnion returns a DispatchNamespaceScriptSettingEditResponseMigrationsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are workers.SingleStepMigration, workers.SteppedMigration.
func (*DispatchNamespaceScriptSettingEditResponseMigrations) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptSettingEditResponseMigrations) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptSettingEditResponseMigrationsUnion ¶
type DispatchNamespaceScriptSettingEditResponseMigrationsUnion interface {
ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations()
}
Migrations to apply for Durable Objects associated with this Worker.
Union satisfied by workers.SingleStepMigration or workers.SteppedMigration.
type DispatchNamespaceScriptSettingGetResponse ¶
type DispatchNamespaceScriptSettingGetResponse struct { // List of bindings attached to this Worker Bindings []workers.Binding `json:"bindings"` // Opt your Worker into changes after this date CompatibilityDate string `json:"compatibility_date"` // Opt your Worker into specific changes CompatibilityFlags []string `json:"compatibility_flags"` // Limits to apply for this Worker. Limits DispatchNamespaceScriptSettingGetResponseLimits `json:"limits"` // Whether Logpush is turned on for the Worker. Logpush bool `json:"logpush"` // Migrations to apply for Durable Objects associated with this Worker. Migrations DispatchNamespaceScriptSettingGetResponseMigrations `json:"migrations"` Placement workers.PlacementConfiguration `json:"placement"` // Tags to help you manage your Workers Tags []string `json:"tags"` // List of Workers that will consume logs from the attached Worker. TailConsumers []workers.ConsumerScript `json:"tail_consumers"` // Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound'). UsageModel string `json:"usage_model"` JSON dispatchNamespaceScriptSettingGetResponseJSON `json:"-"` }
func (*DispatchNamespaceScriptSettingGetResponse) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptSettingGetResponse) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptSettingGetResponseEnvelope ¶
type DispatchNamespaceScriptSettingGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess `json:"success,required"` Result DispatchNamespaceScriptSettingGetResponse `json:"result"` JSON dispatchNamespaceScriptSettingGetResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceScriptSettingGetResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptSettingGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess ¶
type DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceScriptSettingGetResponseEnvelopeSuccessTrue DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess = true
)
func (DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceScriptSettingGetResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceScriptSettingGetResponseLimits ¶
type DispatchNamespaceScriptSettingGetResponseLimits struct { // The amount of CPU time this Worker can use in milliseconds. CPUMs int64 `json:"cpu_ms"` JSON dispatchNamespaceScriptSettingGetResponseLimitsJSON `json:"-"` }
Limits to apply for this Worker.
func (*DispatchNamespaceScriptSettingGetResponseLimits) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptSettingGetResponseLimits) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptSettingGetResponseMigrations ¶
type DispatchNamespaceScriptSettingGetResponseMigrations struct { // Tag to set as the latest migration tag. NewTag string `json:"new_tag"` // Tag used to verify against the latest migration tag for this Worker. If they // don't match, the upload is rejected. OldTag string `json:"old_tag"` // This field can have the runtime type of [[]string]. DeletedClasses interface{} `json:"deleted_classes,required"` // This field can have the runtime type of [[]string]. NewClasses interface{} `json:"new_classes,required"` // This field can have the runtime type of // [[]workers.SingleStepMigrationRenamedClass]. RenamedClasses interface{} `json:"renamed_classes,required"` // This field can have the runtime type of // [[]workers.SingleStepMigrationTransferredClass]. TransferredClasses interface{} `json:"transferred_classes,required"` // This field can have the runtime type of [[]workers.MigrationStep]. Steps interface{} `json:"steps,required"` JSON dispatchNamespaceScriptSettingGetResponseMigrationsJSON `json:"-"` // contains filtered or unexported fields }
Migrations to apply for Durable Objects associated with this Worker.
func (DispatchNamespaceScriptSettingGetResponseMigrations) AsUnion ¶
func (r DispatchNamespaceScriptSettingGetResponseMigrations) AsUnion() DispatchNamespaceScriptSettingGetResponseMigrationsUnion
AsUnion returns a DispatchNamespaceScriptSettingGetResponseMigrationsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are workers.SingleStepMigration, workers.SteppedMigration.
func (*DispatchNamespaceScriptSettingGetResponseMigrations) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptSettingGetResponseMigrations) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptSettingGetResponseMigrationsUnion ¶
type DispatchNamespaceScriptSettingGetResponseMigrationsUnion interface {
ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations()
}
Migrations to apply for Durable Objects associated with this Worker.
Union satisfied by workers.SingleStepMigration or workers.SteppedMigration.
type DispatchNamespaceScriptSettingService ¶
type DispatchNamespaceScriptSettingService struct {
Options []option.RequestOption
}
DispatchNamespaceScriptSettingService contains methods and other services that help with interacting with the testcloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDispatchNamespaceScriptSettingService method instead.
func NewDispatchNamespaceScriptSettingService ¶
func NewDispatchNamespaceScriptSettingService(opts ...option.RequestOption) (r *DispatchNamespaceScriptSettingService)
NewDispatchNamespaceScriptSettingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DispatchNamespaceScriptSettingService) Edit ¶
func (r *DispatchNamespaceScriptSettingService) Edit(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, body DispatchNamespaceScriptSettingEditParams, opts ...option.RequestOption) (res *DispatchNamespaceScriptSettingEditResponse, err error)
Patch script metadata, such as bindings
func (*DispatchNamespaceScriptSettingService) Get ¶
func (r *DispatchNamespaceScriptSettingService) Get(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, opts ...option.RequestOption) (res *DispatchNamespaceScriptSettingGetResponse, err error)
Get script settings from a script uploaded to a Workers for Platforms namespace.
type DispatchNamespaceScriptTagDeleteResponse ¶
type DispatchNamespaceScriptTagDeleteResponse = interface{}
type DispatchNamespaceScriptTagDeleteResponseEnvelope ¶
type DispatchNamespaceScriptTagDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess `json:"success,required"` Result DispatchNamespaceScriptTagDeleteResponse `json:"result,nullable"` JSON dispatchNamespaceScriptTagDeleteResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceScriptTagDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptTagDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess ¶
type DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccessTrue DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess = true
)
func (DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceScriptTagDeleteResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceScriptTagService ¶
type DispatchNamespaceScriptTagService struct {
Options []option.RequestOption
}
DispatchNamespaceScriptTagService contains methods and other services that help with interacting with the testcloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDispatchNamespaceScriptTagService method instead.
func NewDispatchNamespaceScriptTagService ¶
func NewDispatchNamespaceScriptTagService(opts ...option.RequestOption) (r *DispatchNamespaceScriptTagService)
NewDispatchNamespaceScriptTagService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DispatchNamespaceScriptTagService) Delete ¶
func (r *DispatchNamespaceScriptTagService) Delete(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, tag string, opts ...option.RequestOption) (res *DispatchNamespaceScriptTagDeleteResponse, err error)
Delete script tag for a script uploaded to a Workers for Platforms namespace.
func (*DispatchNamespaceScriptTagService) List ¶
func (r *DispatchNamespaceScriptTagService) List(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, opts ...option.RequestOption) (res *pagination.SinglePage[string], err error)
Fetch tags from a script uploaded to a Workers for Platforms namespace.
func (*DispatchNamespaceScriptTagService) ListAutoPaging ¶
func (r *DispatchNamespaceScriptTagService) ListAutoPaging(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[string]
Fetch tags from a script uploaded to a Workers for Platforms namespace.
func (*DispatchNamespaceScriptTagService) Update ¶
func (r *DispatchNamespaceScriptTagService) Update(ctx context.Context, accountID string, dispatchNamespace string, scriptName string, body DispatchNamespaceScriptTagUpdateParams, opts ...option.RequestOption) (res *[]string, err error)
Put script tags for a script uploaded to a Workers for Platforms namespace.
type DispatchNamespaceScriptTagUpdateParams ¶
type DispatchNamespaceScriptTagUpdateParams struct { // Tags to help you manage your Workers Body []string `json:"body,required"` }
func (DispatchNamespaceScriptTagUpdateParams) MarshalJSON ¶
func (r DispatchNamespaceScriptTagUpdateParams) MarshalJSON() (data []byte, err error)
type DispatchNamespaceScriptTagUpdateResponseEnvelope ¶
type DispatchNamespaceScriptTagUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess `json:"success,required"` Result []string `json:"result"` JSON dispatchNamespaceScriptTagUpdateResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceScriptTagUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptTagUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess ¶
type DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccessTrue DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess = true
)
func (DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceScriptTagUpdateResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceScriptUpdateParams ¶
type DispatchNamespaceScriptUpdateParams struct {
Body DispatchNamespaceScriptUpdateParamsBodyUnion `json:"body,required"`
}
func (DispatchNamespaceScriptUpdateParams) MarshalMultipart ¶
func (r DispatchNamespaceScriptUpdateParams) MarshalMultipart() (data []byte, contentType string, err error)
type DispatchNamespaceScriptUpdateParamsBody ¶
type DispatchNamespaceScriptUpdateParamsBody struct { AnyPartName param.Field[interface{}] `json:"<any part name>,required"` Metadata param.Field[interface{}] `json:"metadata,required"` // Rollback message to be associated with this deployment. Only parsed when query // param `"rollback_to"` is present. Message param.Field[string] `json:"message"` }
func (DispatchNamespaceScriptUpdateParamsBody) MarshalJSON ¶
func (r DispatchNamespaceScriptUpdateParamsBody) MarshalJSON() (data []byte, err error)
type DispatchNamespaceScriptUpdateParamsBodyMessage ¶
type DispatchNamespaceScriptUpdateParamsBodyMessage struct { // Rollback message to be associated with this deployment. Only parsed when query // param `"rollback_to"` is present. Message param.Field[string] `json:"message"` }
func (DispatchNamespaceScriptUpdateParamsBodyMessage) MarshalJSON ¶
func (r DispatchNamespaceScriptUpdateParamsBodyMessage) MarshalJSON() (data []byte, err error)
type DispatchNamespaceScriptUpdateParamsBodyObject ¶
type DispatchNamespaceScriptUpdateParamsBodyObject struct { // A module comprising a Worker script, often a javascript file. Multiple modules // may be provided as separate named parts, but at least one module must be present // and referenced in the metadata as `main_module` or `body_part` by part name. // Source maps may also be included using the `application/source-map` content // type. AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"` // JSON encoded metadata about the uploaded parts and Worker configuration. Metadata param.Field[DispatchNamespaceScriptUpdateParamsBodyObjectMetadata] `json:"metadata"` }
func (DispatchNamespaceScriptUpdateParamsBodyObject) MarshalJSON ¶
func (r DispatchNamespaceScriptUpdateParamsBodyObject) MarshalJSON() (data []byte, err error)
type DispatchNamespaceScriptUpdateParamsBodyObjectMetadata ¶
type DispatchNamespaceScriptUpdateParamsBodyObjectMetadata struct { // List of bindings available to the worker. Bindings param.Field[[]interface{}] `json:"bindings"` // Name of the part in the multipart request that contains the script (e.g. the // file adding a listener to the `fetch` event). Indicates a // `service worker syntax` Worker. BodyPart param.Field[string] `json:"body_part"` // Date indicating targeted support in the Workers runtime. Backwards incompatible // fixes to the runtime following this date will not affect this Worker. CompatibilityDate param.Field[string] `json:"compatibility_date"` // Flags that enable or disable certain features in the Workers runtime. Used to // enable upcoming features or opt in or out of specific changes not included in a // `compatibility_date`. CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"` // List of binding types to keep from previous_upload. KeepBindings param.Field[[]string] `json:"keep_bindings"` // Whether Logpush is turned on for the Worker. Logpush param.Field[bool] `json:"logpush"` // Name of the part in the multipart request that contains the main module (e.g. // the file exporting a `fetch` handler). Indicates a `module syntax` Worker. MainModule param.Field[string] `json:"main_module"` // Migrations to apply for Durable Objects associated with this Worker. Migrations param.Field[DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion] `json:"migrations"` Placement param.Field[workers.PlacementConfigurationParam] `json:"placement"` // List of strings to use as tags for this Worker Tags param.Field[[]string] `json:"tags"` // List of Workers that will consume logs from the attached Worker. TailConsumers param.Field[[]workers.ConsumerScriptParam] `json:"tail_consumers"` // Usage model to apply to invocations. UsageModel param.Field[DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel] `json:"usage_model"` // Key-value pairs to use as tags for this version of this Worker VersionTags param.Field[interface{}] `json:"version_tags"` }
JSON encoded metadata about the uploaded parts and Worker configuration.
func (DispatchNamespaceScriptUpdateParamsBodyObjectMetadata) MarshalJSON ¶
func (r DispatchNamespaceScriptUpdateParamsBodyObjectMetadata) MarshalJSON() (data []byte, err error)
type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations ¶
type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations struct { // Tag to set as the latest migration tag. NewTag param.Field[string] `json:"new_tag"` // Tag used to verify against the latest migration tag for this Worker. If they // don't match, the upload is rejected. OldTag param.Field[string] `json:"old_tag"` DeletedClasses param.Field[interface{}] `json:"deleted_classes,required"` NewClasses param.Field[interface{}] `json:"new_classes,required"` RenamedClasses param.Field[interface{}] `json:"renamed_classes,required"` TransferredClasses param.Field[interface{}] `json:"transferred_classes,required"` Steps param.Field[interface{}] `json:"steps,required"` }
Migrations to apply for Durable Objects associated with this Worker.
func (DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion ¶
func (r DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion()
func (DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations) MarshalJSON ¶
func (r DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations) MarshalJSON() (data []byte, err error)
type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion ¶
type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion interface {
ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion()
}
Migrations to apply for Durable Objects associated with this Worker.
Satisfied by workers.SingleStepMigrationParam, workers.SteppedMigrationParam, DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations.
type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel ¶
type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel string
Usage model to apply to invocations.
const ( DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModelBundled DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel = "bundled" DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModelUnbound DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel = "unbound" )
func (DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel) IsKnown ¶
func (r DispatchNamespaceScriptUpdateParamsBodyObjectMetadataUsageModel) IsKnown() bool
type DispatchNamespaceScriptUpdateParamsBodyUnion ¶
type DispatchNamespaceScriptUpdateParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyObject, workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMessage, DispatchNamespaceScriptUpdateParamsBody.
type DispatchNamespaceScriptUpdateResponseEnvelope ¶
type DispatchNamespaceScriptUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DispatchNamespaceScriptUpdateResponseEnvelopeSuccess `json:"success,required"` Result workers.Script `json:"result"` JSON dispatchNamespaceScriptUpdateResponseEnvelopeJSON `json:"-"` }
func (*DispatchNamespaceScriptUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *DispatchNamespaceScriptUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DispatchNamespaceScriptUpdateResponseEnvelopeSuccess ¶
type DispatchNamespaceScriptUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DispatchNamespaceScriptUpdateResponseEnvelopeSuccessTrue DispatchNamespaceScriptUpdateResponseEnvelopeSuccess = true
)
func (DispatchNamespaceScriptUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r DispatchNamespaceScriptUpdateResponseEnvelopeSuccess) IsKnown() bool
type DispatchNamespaceService ¶
type DispatchNamespaceService struct { Options []option.RequestOption Scripts *DispatchNamespaceScriptService }
DispatchNamespaceService contains methods and other services that help with interacting with the testcloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDispatchNamespaceService method instead.
func NewDispatchNamespaceService ¶
func NewDispatchNamespaceService(opts ...option.RequestOption) (r *DispatchNamespaceService)
NewDispatchNamespaceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DispatchNamespaceService) Delete ¶
func (r *DispatchNamespaceService) Delete(ctx context.Context, accountID string, dispatchNamespace string, opts ...option.RequestOption) (res *DispatchNamespaceDeleteResponse, err error)
Delete a Workers for Platforms namespace.
func (*DispatchNamespaceService) Get ¶
func (r *DispatchNamespaceService) Get(ctx context.Context, accountID string, dispatchNamespace string, opts ...option.RequestOption) (res *DispatchNamespaceGetResponse, err error)
Get a Workers for Platforms namespace.
func (*DispatchNamespaceService) List ¶
func (r *DispatchNamespaceService) List(ctx context.Context, accountID string, opts ...option.RequestOption) (res *pagination.SinglePage[DispatchNamespaceListResponse], err error)
Fetch a list of Workers for Platforms namespaces.
func (*DispatchNamespaceService) ListAutoPaging ¶
func (r *DispatchNamespaceService) ListAutoPaging(ctx context.Context, accountID string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[DispatchNamespaceListResponse]
Fetch a list of Workers for Platforms namespaces.
func (*DispatchNamespaceService) New ¶
func (r *DispatchNamespaceService) New(ctx context.Context, accountID string, body DispatchNamespaceNewParams, opts ...option.RequestOption) (res *DispatchNamespaceNewResponse, err error)
Create a new Workers for Platforms namespace.
type DispatchService ¶
type DispatchService struct { Options []option.RequestOption Namespaces *DispatchNamespaceService }
DispatchService contains methods and other services that help with interacting with the testcloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDispatchService method instead.
func NewDispatchService ¶
func NewDispatchService(opts ...option.RequestOption) (r *DispatchService)
NewDispatchService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type MemberRoleParam ¶
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberStatus ¶
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUserParam ¶
type MemberUserParam = shared.MemberUserParam
Details of the user associated to the membership.
This is an alias to an internal type.
type PermissionGrant ¶
type PermissionGrant = shared.PermissionGrant
This is an alias to an internal type.
type PermissionGrantParam ¶
type PermissionGrantParam = shared.PermissionGrantParam
This is an alias to an internal type.
type Script ¶
type Script struct { // When the script was created. CreatedOn time.Time `json:"created_on" format:"date-time"` // Name of the Workers for Platforms dispatch namespace. DispatchNamespace string `json:"dispatch_namespace"` // When the script was last modified. ModifiedOn time.Time `json:"modified_on" format:"date-time"` Script workers.Script `json:"script"` JSON scriptJSON `json:"-"` }
Details about a worker uploaded to a Workers for Platforms namespace.
func (*Script) UnmarshalJSON ¶
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type WorkersForPlatformService ¶
type WorkersForPlatformService struct { Options []option.RequestOption Dispatch *DispatchService }
WorkersForPlatformService contains methods and other services that help with interacting with the testcloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWorkersForPlatformService method instead.
func NewWorkersForPlatformService ¶
func NewWorkersForPlatformService(opts ...option.RequestOption) (r *WorkersForPlatformService)
NewWorkersForPlatformService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.