queues

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const RatePlanIDBusiness = shared.RatePlanIDBusiness

This is an alias to an internal value.

View Source
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDFree = shared.RatePlanIDFree

This is an alias to an internal value.

View Source
const RatePlanIDLite = shared.RatePlanIDLite

This is an alias to an internal value.

View Source
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness

This is an alias to an internal value.

View Source
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree

This is an alias to an internal value.

View Source
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro

This is an alias to an internal value.

View Source
const RatePlanIDPro = shared.RatePlanIDPro

This is an alias to an internal value.

View Source
const RatePlanIDProPlus = shared.RatePlanIDProPlus

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

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

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType

type CertificateRequestType = shared.CertificateRequestType

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

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

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

This is an alias to an internal type.

type CloudflareTunnelConfigSrc

type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc

Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.

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 Consumer

type Consumer struct {
	// A Resource identifier.
	ConsumerID string `json:"consumer_id"`
	CreatedOn  string `json:"created_on"`
	// A Resource identifier.
	QueueID string `json:"queue_id"`
	// Name of a Worker
	Script string `json:"script"`
	// This field can have the runtime type of [ConsumerMqWorkerConsumerSettings],
	// [ConsumerMqHTTPConsumerSettings].
	Settings interface{}  `json:"settings"`
	Type     ConsumerType `json:"type"`
	JSON     consumerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (Consumer) AsUnion

func (r Consumer) AsUnion() ConsumerUnion

AsUnion returns a ConsumerUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are ConsumerMqWorkerConsumer, ConsumerMqHTTPConsumer.

func (*Consumer) UnmarshalJSON

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

type ConsumerDeleteParams

type ConsumerDeleteParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
}

type ConsumerDeleteResponse

type ConsumerDeleteResponse struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	// Indicates if the API call was successful or not.
	Success ConsumerDeleteResponseSuccess `json:"success"`
	JSON    consumerDeleteResponseJSON    `json:"-"`
}

func (*ConsumerDeleteResponse) UnmarshalJSON

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

type ConsumerDeleteResponseSuccess

type ConsumerDeleteResponseSuccess bool

Indicates if the API call was successful or not.

const (
	ConsumerDeleteResponseSuccessTrue ConsumerDeleteResponseSuccess = true
)

func (ConsumerDeleteResponseSuccess) IsKnown

func (r ConsumerDeleteResponseSuccess) IsKnown() bool

type ConsumerGetParams

type ConsumerGetParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
}

type ConsumerGetResponseEnvelope

type ConsumerGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	Result   Consumer              `json:"result"`
	// Indicates if the API call was successful or not.
	Success ConsumerGetResponseEnvelopeSuccess `json:"success"`
	JSON    consumerGetResponseEnvelopeJSON    `json:"-"`
}

func (*ConsumerGetResponseEnvelope) UnmarshalJSON

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

type ConsumerGetResponseEnvelopeSuccess

type ConsumerGetResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	ConsumerGetResponseEnvelopeSuccessTrue ConsumerGetResponseEnvelopeSuccess = true
)

func (ConsumerGetResponseEnvelopeSuccess) IsKnown

type ConsumerListParams

type ConsumerListParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
}

type ConsumerMqHTTPConsumer

type ConsumerMqHTTPConsumer struct {
	// A Resource identifier.
	ConsumerID string `json:"consumer_id"`
	CreatedOn  string `json:"created_on"`
	// A Resource identifier.
	QueueID  string                         `json:"queue_id"`
	Settings ConsumerMqHTTPConsumerSettings `json:"settings"`
	Type     ConsumerMqHTTPConsumerType     `json:"type"`
	JSON     consumerMqHTTPConsumerJSON     `json:"-"`
}

func (*ConsumerMqHTTPConsumer) UnmarshalJSON

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

type ConsumerMqHTTPConsumerParam

type ConsumerMqHTTPConsumerParam struct {
	Settings param.Field[ConsumerMqHTTPConsumerSettingsParam] `json:"settings"`
	Type     param.Field[ConsumerMqHTTPConsumerType]          `json:"type"`
}

func (ConsumerMqHTTPConsumerParam) MarshalJSON

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

type ConsumerMqHTTPConsumerSettings

type ConsumerMqHTTPConsumerSettings struct {
	// The maximum number of messages to include in a batch.
	BatchSize float64 `json:"batch_size"`
	// The maximum number of retries
	MaxRetries float64 `json:"max_retries"`
	// The number of seconds to delay before making the message available for another
	// attempt.
	RetryDelay float64 `json:"retry_delay"`
	// The number of milliseconds that a message is exclusively leased. After the
	// timeout, the message becomes available for another attempt.
	VisibilityTimeoutMs float64                            `json:"visibility_timeout_ms"`
	JSON                consumerMqHTTPConsumerSettingsJSON `json:"-"`
}

func (*ConsumerMqHTTPConsumerSettings) UnmarshalJSON

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

type ConsumerMqHTTPConsumerSettingsParam

type ConsumerMqHTTPConsumerSettingsParam struct {
	// The maximum number of messages to include in a batch.
	BatchSize param.Field[float64] `json:"batch_size"`
	// The maximum number of retries
	MaxRetries param.Field[float64] `json:"max_retries"`
	// The number of seconds to delay before making the message available for another
	// attempt.
	RetryDelay param.Field[float64] `json:"retry_delay"`
	// The number of milliseconds that a message is exclusively leased. After the
	// timeout, the message becomes available for another attempt.
	VisibilityTimeoutMs param.Field[float64] `json:"visibility_timeout_ms"`
}

func (ConsumerMqHTTPConsumerSettingsParam) MarshalJSON

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

type ConsumerMqHTTPConsumerType

type ConsumerMqHTTPConsumerType string
const (
	ConsumerMqHTTPConsumerTypeHTTPPull ConsumerMqHTTPConsumerType = "http_pull"
)

func (ConsumerMqHTTPConsumerType) IsKnown

func (r ConsumerMqHTTPConsumerType) IsKnown() bool

type ConsumerMqWorkerConsumer

type ConsumerMqWorkerConsumer struct {
	// A Resource identifier.
	ConsumerID string `json:"consumer_id"`
	CreatedOn  string `json:"created_on"`
	// A Resource identifier.
	QueueID string `json:"queue_id"`
	// Name of a Worker
	Script   string                           `json:"script"`
	Settings ConsumerMqWorkerConsumerSettings `json:"settings"`
	Type     ConsumerMqWorkerConsumerType     `json:"type"`
	JSON     consumerMqWorkerConsumerJSON     `json:"-"`
}

func (*ConsumerMqWorkerConsumer) UnmarshalJSON

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

type ConsumerMqWorkerConsumerParam

type ConsumerMqWorkerConsumerParam struct {
	// Name of a Worker
	ScriptName param.Field[string]                                `json:"script_name"`
	Settings   param.Field[ConsumerMqWorkerConsumerSettingsParam] `json:"settings"`
	Type       param.Field[ConsumerMqWorkerConsumerType]          `json:"type"`
}

func (ConsumerMqWorkerConsumerParam) MarshalJSON

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

type ConsumerMqWorkerConsumerSettings

type ConsumerMqWorkerConsumerSettings struct {
	// The maximum number of messages to include in a batch.
	BatchSize float64 `json:"batch_size"`
	// Maximum number of concurrent consumers that may consume from this Queue. Set to
	// `null` to automatically opt in to the platform's maximum (recommended).
	MaxConcurrency float64 `json:"max_concurrency"`
	// The maximum number of retries
	MaxRetries float64 `json:"max_retries"`
	// The number of milliseconds to wait for a batch to fill up before attempting to
	// deliver it
	MaxWaitTimeMs float64 `json:"max_wait_time_ms"`
	// The number of seconds to delay before making the message available for another
	// attempt.
	RetryDelay float64                              `json:"retry_delay"`
	JSON       consumerMqWorkerConsumerSettingsJSON `json:"-"`
}

func (*ConsumerMqWorkerConsumerSettings) UnmarshalJSON

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

type ConsumerMqWorkerConsumerSettingsParam

type ConsumerMqWorkerConsumerSettingsParam struct {
	// The maximum number of messages to include in a batch.
	BatchSize param.Field[float64] `json:"batch_size"`
	// Maximum number of concurrent consumers that may consume from this Queue. Set to
	// `null` to automatically opt in to the platform's maximum (recommended).
	MaxConcurrency param.Field[float64] `json:"max_concurrency"`
	// The maximum number of retries
	MaxRetries param.Field[float64] `json:"max_retries"`
	// The number of milliseconds to wait for a batch to fill up before attempting to
	// deliver it
	MaxWaitTimeMs param.Field[float64] `json:"max_wait_time_ms"`
	// The number of seconds to delay before making the message available for another
	// attempt.
	RetryDelay param.Field[float64] `json:"retry_delay"`
}

func (ConsumerMqWorkerConsumerSettingsParam) MarshalJSON

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

type ConsumerMqWorkerConsumerType

type ConsumerMqWorkerConsumerType string
const (
	ConsumerMqWorkerConsumerTypeWorker ConsumerMqWorkerConsumerType = "worker"
)

func (ConsumerMqWorkerConsumerType) IsKnown

func (r ConsumerMqWorkerConsumerType) IsKnown() bool

type ConsumerNewParams

type ConsumerNewParams struct {
	// A Resource identifier.
	AccountID param.Field[string]        `path:"account_id,required"`
	Body      ConsumerNewParamsBodyUnion `json:"body"`
}

func (ConsumerNewParams) MarshalJSON

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

type ConsumerNewParamsBody

type ConsumerNewParamsBody struct {
	DeadLetterQueue param.Field[string] `json:"dead_letter_queue"`
	// Name of a Worker
	ScriptName param.Field[string]                    `json:"script_name"`
	Settings   param.Field[interface{}]               `json:"settings"`
	Type       param.Field[ConsumerNewParamsBodyType] `json:"type"`
}

func (ConsumerNewParamsBody) MarshalJSON

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

type ConsumerNewParamsBodyMqHTTPConsumer

type ConsumerNewParamsBodyMqHTTPConsumer struct {
	DeadLetterQueue param.Field[string]                                      `json:"dead_letter_queue"`
	Settings        param.Field[ConsumerNewParamsBodyMqHTTPConsumerSettings] `json:"settings"`
	Type            param.Field[ConsumerNewParamsBodyMqHTTPConsumerType]     `json:"type"`
}

func (ConsumerNewParamsBodyMqHTTPConsumer) MarshalJSON

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

type ConsumerNewParamsBodyMqHTTPConsumerSettings

type ConsumerNewParamsBodyMqHTTPConsumerSettings struct {
	// The maximum number of messages to include in a batch.
	BatchSize param.Field[float64] `json:"batch_size"`
	// The maximum number of retries
	MaxRetries param.Field[float64] `json:"max_retries"`
	// The number of seconds to delay before making the message available for another
	// attempt.
	RetryDelay param.Field[float64] `json:"retry_delay"`
	// The number of milliseconds that a message is exclusively leased. After the
	// timeout, the message becomes available for another attempt.
	VisibilityTimeoutMs param.Field[float64] `json:"visibility_timeout_ms"`
}

func (ConsumerNewParamsBodyMqHTTPConsumerSettings) MarshalJSON

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

type ConsumerNewParamsBodyMqHTTPConsumerType

type ConsumerNewParamsBodyMqHTTPConsumerType string
const (
	ConsumerNewParamsBodyMqHTTPConsumerTypeHTTPPull ConsumerNewParamsBodyMqHTTPConsumerType = "http_pull"
)

func (ConsumerNewParamsBodyMqHTTPConsumerType) IsKnown

type ConsumerNewParamsBodyMqWorkerConsumer

type ConsumerNewParamsBodyMqWorkerConsumer struct {
	DeadLetterQueue param.Field[string] `json:"dead_letter_queue"`
	// Name of a Worker
	ScriptName param.Field[string]                                        `json:"script_name"`
	Settings   param.Field[ConsumerNewParamsBodyMqWorkerConsumerSettings] `json:"settings"`
	Type       param.Field[ConsumerNewParamsBodyMqWorkerConsumerType]     `json:"type"`
}

func (ConsumerNewParamsBodyMqWorkerConsumer) MarshalJSON

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

type ConsumerNewParamsBodyMqWorkerConsumerSettings

type ConsumerNewParamsBodyMqWorkerConsumerSettings struct {
	// The maximum number of messages to include in a batch.
	BatchSize param.Field[float64] `json:"batch_size"`
	// Maximum number of concurrent consumers that may consume from this Queue. Set to
	// `null` to automatically opt in to the platform's maximum (recommended).
	MaxConcurrency param.Field[float64] `json:"max_concurrency"`
	// The maximum number of retries
	MaxRetries param.Field[float64] `json:"max_retries"`
	// The number of milliseconds to wait for a batch to fill up before attempting to
	// deliver it
	MaxWaitTimeMs param.Field[float64] `json:"max_wait_time_ms"`
	// The number of seconds to delay before making the message available for another
	// attempt.
	RetryDelay param.Field[float64] `json:"retry_delay"`
}

func (ConsumerNewParamsBodyMqWorkerConsumerSettings) MarshalJSON

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

type ConsumerNewParamsBodyMqWorkerConsumerType

type ConsumerNewParamsBodyMqWorkerConsumerType string
const (
	ConsumerNewParamsBodyMqWorkerConsumerTypeWorker ConsumerNewParamsBodyMqWorkerConsumerType = "worker"
)

func (ConsumerNewParamsBodyMqWorkerConsumerType) IsKnown

type ConsumerNewParamsBodyType

type ConsumerNewParamsBodyType string
const (
	ConsumerNewParamsBodyTypeWorker   ConsumerNewParamsBodyType = "worker"
	ConsumerNewParamsBodyTypeHTTPPull ConsumerNewParamsBodyType = "http_pull"
)

func (ConsumerNewParamsBodyType) IsKnown

func (r ConsumerNewParamsBodyType) IsKnown() bool

type ConsumerNewParamsBodyUnion

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

Satisfied by queues.ConsumerNewParamsBodyMqWorkerConsumer, queues.ConsumerNewParamsBodyMqHTTPConsumer, ConsumerNewParamsBody.

type ConsumerNewResponseEnvelope

type ConsumerNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	Result   Consumer              `json:"result"`
	// Indicates if the API call was successful or not.
	Success ConsumerNewResponseEnvelopeSuccess `json:"success"`
	JSON    consumerNewResponseEnvelopeJSON    `json:"-"`
}

func (*ConsumerNewResponseEnvelope) UnmarshalJSON

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

type ConsumerNewResponseEnvelopeSuccess

type ConsumerNewResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	ConsumerNewResponseEnvelopeSuccessTrue ConsumerNewResponseEnvelopeSuccess = true
)

func (ConsumerNewResponseEnvelopeSuccess) IsKnown

type ConsumerParam

type ConsumerParam struct {
	// Name of a Worker
	ScriptName param.Field[string]       `json:"script_name"`
	Settings   param.Field[interface{}]  `json:"settings"`
	Type       param.Field[ConsumerType] `json:"type"`
}

func (ConsumerParam) MarshalJSON

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

type ConsumerService

type ConsumerService struct {
	Options []option.RequestOption
}

ConsumerService 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 NewConsumerService method instead.

func NewConsumerService

func NewConsumerService(opts ...option.RequestOption) (r *ConsumerService)

NewConsumerService 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 (*ConsumerService) Delete

func (r *ConsumerService) Delete(ctx context.Context, queueID string, consumerID string, body ConsumerDeleteParams, opts ...option.RequestOption) (res *ConsumerDeleteResponse, err error)

Deletes the consumer for a queue.

func (*ConsumerService) Get

func (r *ConsumerService) Get(ctx context.Context, queueID string, consumerID string, query ConsumerGetParams, opts ...option.RequestOption) (res *Consumer, err error)

Fetches the consumer for a queue by consumer id

func (*ConsumerService) List

func (r *ConsumerService) List(ctx context.Context, queueID string, query ConsumerListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Consumer], err error)

Returns the consumers for a Queue

func (*ConsumerService) ListAutoPaging

Returns the consumers for a Queue

func (*ConsumerService) New

func (r *ConsumerService) New(ctx context.Context, queueID string, params ConsumerNewParams, opts ...option.RequestOption) (res *Consumer, err error)

Creates a new consumer for a Queue

func (*ConsumerService) Update

func (r *ConsumerService) Update(ctx context.Context, queueID string, consumerID string, params ConsumerUpdateParams, opts ...option.RequestOption) (res *Consumer, err error)

Updates the consumer for a queue, or creates one if it does not exist.

type ConsumerType

type ConsumerType string
const (
	ConsumerTypeWorker   ConsumerType = "worker"
	ConsumerTypeHTTPPull ConsumerType = "http_pull"
)

func (ConsumerType) IsKnown

func (r ConsumerType) IsKnown() bool

type ConsumerUnion

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

Union satisfied by ConsumerMqWorkerConsumer or ConsumerMqHTTPConsumer.

type ConsumerUnionParam

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

Satisfied by queues.ConsumerMqWorkerConsumerParam, queues.ConsumerMqHTTPConsumerParam, ConsumerParam.

type ConsumerUpdateParams

type ConsumerUpdateParams struct {
	// A Resource identifier.
	AccountID param.Field[string]           `path:"account_id,required"`
	Body      ConsumerUpdateParamsBodyUnion `json:"body,required"`
}

func (ConsumerUpdateParams) MarshalJSON

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

type ConsumerUpdateParamsBody

type ConsumerUpdateParamsBody struct {
	DeadLetterQueue param.Field[string] `json:"dead_letter_queue"`
	// Name of a Worker
	ScriptName param.Field[string]                       `json:"script_name"`
	Settings   param.Field[interface{}]                  `json:"settings"`
	Type       param.Field[ConsumerUpdateParamsBodyType] `json:"type"`
}

func (ConsumerUpdateParamsBody) MarshalJSON

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

type ConsumerUpdateParamsBodyMqHTTPConsumer

type ConsumerUpdateParamsBodyMqHTTPConsumer struct {
	DeadLetterQueue param.Field[string]                                         `json:"dead_letter_queue"`
	Settings        param.Field[ConsumerUpdateParamsBodyMqHTTPConsumerSettings] `json:"settings"`
	Type            param.Field[ConsumerUpdateParamsBodyMqHTTPConsumerType]     `json:"type"`
}

func (ConsumerUpdateParamsBodyMqHTTPConsumer) MarshalJSON

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

type ConsumerUpdateParamsBodyMqHTTPConsumerSettings

type ConsumerUpdateParamsBodyMqHTTPConsumerSettings struct {
	// The maximum number of messages to include in a batch.
	BatchSize param.Field[float64] `json:"batch_size"`
	// The maximum number of retries
	MaxRetries param.Field[float64] `json:"max_retries"`
	// The number of seconds to delay before making the message available for another
	// attempt.
	RetryDelay param.Field[float64] `json:"retry_delay"`
	// The number of milliseconds that a message is exclusively leased. After the
	// timeout, the message becomes available for another attempt.
	VisibilityTimeoutMs param.Field[float64] `json:"visibility_timeout_ms"`
}

func (ConsumerUpdateParamsBodyMqHTTPConsumerSettings) MarshalJSON

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

type ConsumerUpdateParamsBodyMqHTTPConsumerType

type ConsumerUpdateParamsBodyMqHTTPConsumerType string
const (
	ConsumerUpdateParamsBodyMqHTTPConsumerTypeHTTPPull ConsumerUpdateParamsBodyMqHTTPConsumerType = "http_pull"
)

func (ConsumerUpdateParamsBodyMqHTTPConsumerType) IsKnown

type ConsumerUpdateParamsBodyMqWorkerConsumer

type ConsumerUpdateParamsBodyMqWorkerConsumer struct {
	DeadLetterQueue param.Field[string] `json:"dead_letter_queue"`
	// Name of a Worker
	ScriptName param.Field[string]                                           `json:"script_name"`
	Settings   param.Field[ConsumerUpdateParamsBodyMqWorkerConsumerSettings] `json:"settings"`
	Type       param.Field[ConsumerUpdateParamsBodyMqWorkerConsumerType]     `json:"type"`
}

func (ConsumerUpdateParamsBodyMqWorkerConsumer) MarshalJSON

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

type ConsumerUpdateParamsBodyMqWorkerConsumerSettings

type ConsumerUpdateParamsBodyMqWorkerConsumerSettings struct {
	// The maximum number of messages to include in a batch.
	BatchSize param.Field[float64] `json:"batch_size"`
	// Maximum number of concurrent consumers that may consume from this Queue. Set to
	// `null` to automatically opt in to the platform's maximum (recommended).
	MaxConcurrency param.Field[float64] `json:"max_concurrency"`
	// The maximum number of retries
	MaxRetries param.Field[float64] `json:"max_retries"`
	// The number of milliseconds to wait for a batch to fill up before attempting to
	// deliver it
	MaxWaitTimeMs param.Field[float64] `json:"max_wait_time_ms"`
	// The number of seconds to delay before making the message available for another
	// attempt.
	RetryDelay param.Field[float64] `json:"retry_delay"`
}

func (ConsumerUpdateParamsBodyMqWorkerConsumerSettings) MarshalJSON

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

type ConsumerUpdateParamsBodyMqWorkerConsumerType

type ConsumerUpdateParamsBodyMqWorkerConsumerType string
const (
	ConsumerUpdateParamsBodyMqWorkerConsumerTypeWorker ConsumerUpdateParamsBodyMqWorkerConsumerType = "worker"
)

func (ConsumerUpdateParamsBodyMqWorkerConsumerType) IsKnown

type ConsumerUpdateParamsBodyType

type ConsumerUpdateParamsBodyType string
const (
	ConsumerUpdateParamsBodyTypeWorker   ConsumerUpdateParamsBodyType = "worker"
	ConsumerUpdateParamsBodyTypeHTTPPull ConsumerUpdateParamsBodyType = "http_pull"
)

func (ConsumerUpdateParamsBodyType) IsKnown

func (r ConsumerUpdateParamsBodyType) IsKnown() bool

type ConsumerUpdateParamsBodyUnion

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

Satisfied by queues.ConsumerUpdateParamsBodyMqWorkerConsumer, queues.ConsumerUpdateParamsBodyMqHTTPConsumer, ConsumerUpdateParamsBody.

type ConsumerUpdateResponseEnvelope

type ConsumerUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	Result   Consumer              `json:"result"`
	// Indicates if the API call was successful or not.
	Success ConsumerUpdateResponseEnvelopeSuccess `json:"success"`
	JSON    consumerUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*ConsumerUpdateResponseEnvelope) UnmarshalJSON

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

type ConsumerUpdateResponseEnvelopeSuccess

type ConsumerUpdateResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	ConsumerUpdateResponseEnvelopeSuccessTrue ConsumerUpdateResponseEnvelopeSuccess = true
)

func (ConsumerUpdateResponseEnvelopeSuccess) IsKnown

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type ErrorDataSource

type ErrorDataSource = shared.ErrorDataSource

This is an alias to an internal type.

type Member

type Member = shared.Member

This is an alias to an internal type.

type MemberPoliciesAccess

type MemberPoliciesAccess = shared.MemberPoliciesAccess

Allow or deny operations against the resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroup

type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup

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

This is an alias to an internal type.

type MemberPoliciesPermissionGroupsMeta

type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type MemberPoliciesResourceGroup

type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup

A group of scoped resources.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsMeta

type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta

Attributes associated to the resource group.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScope

type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope

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

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScopeObject

type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject

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

This is an alias to an internal type.

type MemberPolicy

type MemberPolicy = shared.MemberPolicy

This is an alias to an internal type.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUser

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

type MessageAckParams

type MessageAckParams struct {
	// A Resource identifier.
	AccountID param.Field[string]                  `path:"account_id,required"`
	Acks      param.Field[[]MessageAckParamsAck]   `json:"acks"`
	Retries   param.Field[[]MessageAckParamsRetry] `json:"retries"`
}

func (MessageAckParams) MarshalJSON

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

type MessageAckParamsAck

type MessageAckParamsAck struct {
	// An ID that represents an "in-flight" message that has been pulled from a Queue.
	// You must hold on to this ID and use it to acknowledge this message.
	LeaseID param.Field[string] `json:"lease_id"`
}

func (MessageAckParamsAck) MarshalJSON

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

type MessageAckParamsRetry

type MessageAckParamsRetry struct {
	// The number of seconds to delay before making the message available for another
	// attempt.
	DelaySeconds param.Field[float64] `json:"delay_seconds"`
	// An ID that represents an "in-flight" message that has been pulled from a Queue.
	// You must hold on to this ID and use it to acknowledge this message.
	LeaseID param.Field[string] `json:"lease_id"`
}

func (MessageAckParamsRetry) MarshalJSON

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

type MessageAckResponse

type MessageAckResponse struct {
	// The number of messages that were succesfully acknowledged.
	AckCount float64 `json:"ackCount"`
	// The number of messages that were succesfully retried.
	RetryCount float64                `json:"retryCount"`
	Warnings   []string               `json:"warnings"`
	JSON       messageAckResponseJSON `json:"-"`
}

func (*MessageAckResponse) UnmarshalJSON

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

type MessageAckResponseEnvelope

type MessageAckResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	Result   MessageAckResponse    `json:"result"`
	// Indicates if the API call was successful or not.
	Success MessageAckResponseEnvelopeSuccess `json:"success"`
	JSON    messageAckResponseEnvelopeJSON    `json:"-"`
}

func (*MessageAckResponseEnvelope) UnmarshalJSON

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

type MessageAckResponseEnvelopeSuccess

type MessageAckResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	MessageAckResponseEnvelopeSuccessTrue MessageAckResponseEnvelopeSuccess = true
)

func (MessageAckResponseEnvelopeSuccess) IsKnown

type MessageBulkPushParams

type MessageBulkPushParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// The number of seconds to wait for attempting to deliver this batch to consumers
	DelaySeconds param.Field[float64]                             `json:"delay_seconds"`
	Messages     param.Field[[]MessageBulkPushParamsMessageUnion] `json:"messages"`
}

func (MessageBulkPushParams) MarshalJSON

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

type MessageBulkPushParamsMessage

type MessageBulkPushParamsMessage struct {
	Body        param.Field[interface{}]                              `json:"body"`
	ContentType param.Field[MessageBulkPushParamsMessagesContentType] `json:"content_type"`
	// The number of seconds to wait for attempting to deliver this message to
	// consumers
	DelaySeconds param.Field[float64] `json:"delay_seconds"`
}

func (MessageBulkPushParamsMessage) MarshalJSON

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

type MessageBulkPushParamsMessageUnion

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

Satisfied by queues.MessageBulkPushParamsMessagesMqQueueMessageText, queues.MessageBulkPushParamsMessagesMqQueueMessageJson, MessageBulkPushParamsMessage.

type MessageBulkPushParamsMessagesContentType

type MessageBulkPushParamsMessagesContentType string
const (
	MessageBulkPushParamsMessagesContentTypeText MessageBulkPushParamsMessagesContentType = "text"
	MessageBulkPushParamsMessagesContentTypeJson MessageBulkPushParamsMessagesContentType = "json"
)

func (MessageBulkPushParamsMessagesContentType) IsKnown

type MessageBulkPushParamsMessagesMqQueueMessageJson

type MessageBulkPushParamsMessagesMqQueueMessageJson struct {
	Body        param.Field[interface{}]                                                `json:"body"`
	ContentType param.Field[MessageBulkPushParamsMessagesMqQueueMessageJsonContentType] `json:"content_type"`
	// The number of seconds to wait for attempting to deliver this message to
	// consumers
	DelaySeconds param.Field[float64] `json:"delay_seconds"`
}

func (MessageBulkPushParamsMessagesMqQueueMessageJson) MarshalJSON

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

type MessageBulkPushParamsMessagesMqQueueMessageJsonContentType

type MessageBulkPushParamsMessagesMqQueueMessageJsonContentType string
const (
	MessageBulkPushParamsMessagesMqQueueMessageJsonContentTypeJson MessageBulkPushParamsMessagesMqQueueMessageJsonContentType = "json"
)

func (MessageBulkPushParamsMessagesMqQueueMessageJsonContentType) IsKnown

type MessageBulkPushParamsMessagesMqQueueMessageText

type MessageBulkPushParamsMessagesMqQueueMessageText struct {
	Body        param.Field[string]                                                     `json:"body"`
	ContentType param.Field[MessageBulkPushParamsMessagesMqQueueMessageTextContentType] `json:"content_type"`
	// The number of seconds to wait for attempting to deliver this message to
	// consumers
	DelaySeconds param.Field[float64] `json:"delay_seconds"`
}

func (MessageBulkPushParamsMessagesMqQueueMessageText) MarshalJSON

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

type MessageBulkPushParamsMessagesMqQueueMessageTextContentType

type MessageBulkPushParamsMessagesMqQueueMessageTextContentType string
const (
	MessageBulkPushParamsMessagesMqQueueMessageTextContentTypeText MessageBulkPushParamsMessagesMqQueueMessageTextContentType = "text"
)

func (MessageBulkPushParamsMessagesMqQueueMessageTextContentType) IsKnown

type MessageBulkPushResponse

type MessageBulkPushResponse struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	// Indicates if the API call was successful or not.
	Success MessageBulkPushResponseSuccess `json:"success"`
	JSON    messageBulkPushResponseJSON    `json:"-"`
}

func (*MessageBulkPushResponse) UnmarshalJSON

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

type MessageBulkPushResponseSuccess

type MessageBulkPushResponseSuccess bool

Indicates if the API call was successful or not.

const (
	MessageBulkPushResponseSuccessTrue MessageBulkPushResponseSuccess = true
)

func (MessageBulkPushResponseSuccess) IsKnown

type MessagePullParams

type MessagePullParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// The maximum number of messages to include in a batch.
	BatchSize param.Field[float64] `json:"batch_size"`
	// The number of milliseconds that a message is exclusively leased. After the
	// timeout, the message becomes available for another attempt.
	VisibilityTimeoutMs param.Field[float64] `json:"visibility_timeout_ms"`
}

func (MessagePullParams) MarshalJSON

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

type MessagePullResponse

type MessagePullResponse struct {
	// The number of unacknowledged messages in the queue
	MessageBacklogCount float64                      `json:"message_backlog_count"`
	Messages            []MessagePullResponseMessage `json:"messages"`
	JSON                messagePullResponseJSON      `json:"-"`
}

func (*MessagePullResponse) UnmarshalJSON

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

type MessagePullResponseEnvelope

type MessagePullResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	Result   MessagePullResponse   `json:"result"`
	// Indicates if the API call was successful or not.
	Success MessagePullResponseEnvelopeSuccess `json:"success"`
	JSON    messagePullResponseEnvelopeJSON    `json:"-"`
}

func (*MessagePullResponseEnvelope) UnmarshalJSON

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

type MessagePullResponseEnvelopeSuccess

type MessagePullResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	MessagePullResponseEnvelopeSuccessTrue MessagePullResponseEnvelopeSuccess = true
)

func (MessagePullResponseEnvelopeSuccess) IsKnown

type MessagePullResponseMessage

type MessagePullResponseMessage struct {
	ID       string  `json:"id"`
	Attempts float64 `json:"attempts"`
	Body     string  `json:"body"`
	// An ID that represents an "in-flight" message that has been pulled from a Queue.
	// You must hold on to this ID and use it to acknowledge this message.
	LeaseID     string                         `json:"lease_id"`
	Metadata    interface{}                    `json:"metadata"`
	TimestampMs float64                        `json:"timestamp_ms"`
	JSON        messagePullResponseMessageJSON `json:"-"`
}

func (*MessagePullResponseMessage) UnmarshalJSON

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

type MessagePushParams

type MessagePushParams struct {
	// A Resource identifier.
	AccountID param.Field[string]        `path:"account_id,required"`
	Body      MessagePushParamsBodyUnion `json:"body"`
}

func (MessagePushParams) MarshalJSON

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

type MessagePushParamsBody

type MessagePushParamsBody struct {
	Body        param.Field[interface{}]                      `json:"body"`
	ContentType param.Field[MessagePushParamsBodyContentType] `json:"content_type"`
	// The number of seconds to wait for attempting to deliver this message to
	// consumers
	DelaySeconds param.Field[float64] `json:"delay_seconds"`
}

func (MessagePushParamsBody) MarshalJSON

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

type MessagePushParamsBodyContentType

type MessagePushParamsBodyContentType string
const (
	MessagePushParamsBodyContentTypeText MessagePushParamsBodyContentType = "text"
	MessagePushParamsBodyContentTypeJson MessagePushParamsBodyContentType = "json"
)

func (MessagePushParamsBodyContentType) IsKnown

type MessagePushParamsBodyMqQueueMessageJson

type MessagePushParamsBodyMqQueueMessageJson struct {
	Body        param.Field[interface{}]                                        `json:"body"`
	ContentType param.Field[MessagePushParamsBodyMqQueueMessageJsonContentType] `json:"content_type"`
	// The number of seconds to wait for attempting to deliver this message to
	// consumers
	DelaySeconds param.Field[float64] `json:"delay_seconds"`
}

func (MessagePushParamsBodyMqQueueMessageJson) MarshalJSON

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

type MessagePushParamsBodyMqQueueMessageJsonContentType

type MessagePushParamsBodyMqQueueMessageJsonContentType string
const (
	MessagePushParamsBodyMqQueueMessageJsonContentTypeJson MessagePushParamsBodyMqQueueMessageJsonContentType = "json"
)

func (MessagePushParamsBodyMqQueueMessageJsonContentType) IsKnown

type MessagePushParamsBodyMqQueueMessageText

type MessagePushParamsBodyMqQueueMessageText struct {
	Body        param.Field[string]                                             `json:"body"`
	ContentType param.Field[MessagePushParamsBodyMqQueueMessageTextContentType] `json:"content_type"`
	// The number of seconds to wait for attempting to deliver this message to
	// consumers
	DelaySeconds param.Field[float64] `json:"delay_seconds"`
}

func (MessagePushParamsBodyMqQueueMessageText) MarshalJSON

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

type MessagePushParamsBodyMqQueueMessageTextContentType

type MessagePushParamsBodyMqQueueMessageTextContentType string
const (
	MessagePushParamsBodyMqQueueMessageTextContentTypeText MessagePushParamsBodyMqQueueMessageTextContentType = "text"
)

func (MessagePushParamsBodyMqQueueMessageTextContentType) IsKnown

type MessagePushParamsBodyUnion

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

Satisfied by queues.MessagePushParamsBodyMqQueueMessageText, queues.MessagePushParamsBodyMqQueueMessageJson, MessagePushParamsBody.

type MessagePushResponse

type MessagePushResponse struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	// Indicates if the API call was successful or not.
	Success MessagePushResponseSuccess `json:"success"`
	JSON    messagePushResponseJSON    `json:"-"`
}

func (*MessagePushResponse) UnmarshalJSON

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

type MessagePushResponseSuccess

type MessagePushResponseSuccess bool

Indicates if the API call was successful or not.

const (
	MessagePushResponseSuccessTrue MessagePushResponseSuccess = true
)

func (MessagePushResponseSuccess) IsKnown

func (r MessagePushResponseSuccess) IsKnown() bool

type MessageService

type MessageService struct {
	Options []option.RequestOption
}

MessageService 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 NewMessageService method instead.

func NewMessageService

func NewMessageService(opts ...option.RequestOption) (r *MessageService)

NewMessageService 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 (*MessageService) Ack

func (r *MessageService) Ack(ctx context.Context, queueID string, params MessageAckParams, opts ...option.RequestOption) (res *MessageAckResponse, err error)

Acknowledge + Retry messages from a Queue

func (*MessageService) BulkPush

func (r *MessageService) BulkPush(ctx context.Context, queueID string, params MessageBulkPushParams, opts ...option.RequestOption) (res *MessageBulkPushResponse, err error)

Push a batch of message to a Queue

func (*MessageService) Pull

func (r *MessageService) Pull(ctx context.Context, queueID string, params MessagePullParams, opts ...option.RequestOption) (res *MessagePullResponse, err error)

Pull a batch of messages from a Queue

func (*MessageService) Push

func (r *MessageService) Push(ctx context.Context, queueID string, params MessagePushParams, opts ...option.RequestOption) (res *MessagePushResponse, err error)

Push a message to a Queue

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type PurgeService

type PurgeService struct {
	Options []option.RequestOption
}

PurgeService 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 NewPurgeService method instead.

func NewPurgeService

func NewPurgeService(opts ...option.RequestOption) (r *PurgeService)

NewPurgeService 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 (*PurgeService) Start

func (r *PurgeService) Start(ctx context.Context, queueID string, params PurgeStartParams, opts ...option.RequestOption) (res *Queue, err error)

Deletes all messages from the Queue.

func (*PurgeService) Status

func (r *PurgeService) Status(ctx context.Context, queueID string, query PurgeStatusParams, opts ...option.RequestOption) (res *PurgeStatusResponse, err error)

Get details about a Queue's purge status.

type PurgeStartParams

type PurgeStartParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// Confimation that all messages will be deleted permanently.
	DeleteMessagesPermanently param.Field[bool] `json:"delete_messages_permanently"`
}

func (PurgeStartParams) MarshalJSON

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

type PurgeStartResponseEnvelope

type PurgeStartResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	Result   Queue                 `json:"result"`
	// Indicates if the API call was successful or not.
	Success PurgeStartResponseEnvelopeSuccess `json:"success"`
	JSON    purgeStartResponseEnvelopeJSON    `json:"-"`
}

func (*PurgeStartResponseEnvelope) UnmarshalJSON

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

type PurgeStartResponseEnvelopeSuccess

type PurgeStartResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	PurgeStartResponseEnvelopeSuccessTrue PurgeStartResponseEnvelopeSuccess = true
)

func (PurgeStartResponseEnvelopeSuccess) IsKnown

type PurgeStatusParams

type PurgeStatusParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
}

type PurgeStatusResponse

type PurgeStatusResponse struct {
	// Indicates if the last purge operation completed successfully.
	Completed string `json:"completed"`
	// Timestamp when the last purge operation started.
	StartedAt string                  `json:"started_at"`
	JSON      purgeStatusResponseJSON `json:"-"`
}

func (*PurgeStatusResponse) UnmarshalJSON

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

type PurgeStatusResponseEnvelope

type PurgeStatusResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	Result   PurgeStatusResponse   `json:"result"`
	// Indicates if the API call was successful or not.
	Success PurgeStatusResponseEnvelopeSuccess `json:"success"`
	JSON    purgeStatusResponseEnvelopeJSON    `json:"-"`
}

func (*PurgeStatusResponseEnvelope) UnmarshalJSON

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

type PurgeStatusResponseEnvelopeSuccess

type PurgeStatusResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	PurgeStatusResponseEnvelopeSuccessTrue PurgeStatusResponseEnvelopeSuccess = true
)

func (PurgeStatusResponseEnvelopeSuccess) IsKnown

type Queue

type Queue struct {
	Consumers           []Consumer      `json:"consumers"`
	ConsumersTotalCount float64         `json:"consumers_total_count"`
	CreatedOn           string          `json:"created_on"`
	ModifiedOn          string          `json:"modified_on"`
	Producers           []QueueProducer `json:"producers"`
	ProducersTotalCount float64         `json:"producers_total_count"`
	QueueID             string          `json:"queue_id"`
	QueueName           string          `json:"queue_name"`
	Settings            QueueSettings   `json:"settings"`
	JSON                queueJSON       `json:"-"`
}

func (*Queue) UnmarshalJSON

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

type QueueDeleteParams

type QueueDeleteParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
}

type QueueDeleteResponse

type QueueDeleteResponse struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	// Indicates if the API call was successful or not.
	Success QueueDeleteResponseSuccess `json:"success"`
	JSON    queueDeleteResponseJSON    `json:"-"`
}

func (*QueueDeleteResponse) UnmarshalJSON

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

type QueueDeleteResponseSuccess

type QueueDeleteResponseSuccess bool

Indicates if the API call was successful or not.

const (
	QueueDeleteResponseSuccessTrue QueueDeleteResponseSuccess = true
)

func (QueueDeleteResponseSuccess) IsKnown

func (r QueueDeleteResponseSuccess) IsKnown() bool

type QueueEditParams

type QueueEditParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	Queue     QueueParam          `json:"queue"`
}

func (QueueEditParams) MarshalJSON

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

type QueueEditResponseEnvelope

type QueueEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	Result   Queue                 `json:"result"`
	// Indicates if the API call was successful or not.
	Success QueueEditResponseEnvelopeSuccess `json:"success"`
	JSON    queueEditResponseEnvelopeJSON    `json:"-"`
}

func (*QueueEditResponseEnvelope) UnmarshalJSON

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

type QueueEditResponseEnvelopeSuccess

type QueueEditResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	QueueEditResponseEnvelopeSuccessTrue QueueEditResponseEnvelopeSuccess = true
)

func (QueueEditResponseEnvelopeSuccess) IsKnown

type QueueGetParams

type QueueGetParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
}

type QueueGetResponseEnvelope

type QueueGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	Result   Queue                 `json:"result"`
	// Indicates if the API call was successful or not.
	Success QueueGetResponseEnvelopeSuccess `json:"success"`
	JSON    queueGetResponseEnvelopeJSON    `json:"-"`
}

func (*QueueGetResponseEnvelope) UnmarshalJSON

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

type QueueGetResponseEnvelopeSuccess

type QueueGetResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	QueueGetResponseEnvelopeSuccessTrue QueueGetResponseEnvelopeSuccess = true
)

func (QueueGetResponseEnvelopeSuccess) IsKnown

type QueueListParams

type QueueListParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
}

type QueueNewParams

type QueueNewParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	QueueName param.Field[string] `json:"queue_name,required"`
}

func (QueueNewParams) MarshalJSON

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

type QueueNewResponseEnvelope

type QueueNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	Result   Queue                 `json:"result"`
	// Indicates if the API call was successful or not.
	Success QueueNewResponseEnvelopeSuccess `json:"success"`
	JSON    queueNewResponseEnvelopeJSON    `json:"-"`
}

func (*QueueNewResponseEnvelope) UnmarshalJSON

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

type QueueNewResponseEnvelopeSuccess

type QueueNewResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	QueueNewResponseEnvelopeSuccessTrue QueueNewResponseEnvelopeSuccess = true
)

func (QueueNewResponseEnvelopeSuccess) IsKnown

type QueueParam

type QueueParam struct {
	QueueName param.Field[string]             `json:"queue_name"`
	Settings  param.Field[QueueSettingsParam] `json:"settings"`
}

func (QueueParam) MarshalJSON

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

type QueueProducer

type QueueProducer struct {
	BucketName string             `json:"bucket_name"`
	Script     string             `json:"script"`
	Type       QueueProducersType `json:"type"`
	JSON       queueProducerJSON  `json:"-"`
	// contains filtered or unexported fields
}

func (QueueProducer) AsUnion

func (r QueueProducer) AsUnion() QueueProducersUnion

AsUnion returns a QueueProducersUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are QueueProducersMqWorkerProducer, QueueProducersMqR2Producer.

func (*QueueProducer) UnmarshalJSON

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

type QueueProducerParam

type QueueProducerParam struct {
	BucketName param.Field[string]             `json:"bucket_name"`
	Script     param.Field[string]             `json:"script"`
	Type       param.Field[QueueProducersType] `json:"type"`
}

func (QueueProducerParam) MarshalJSON

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

type QueueProducersMqR2Producer

type QueueProducersMqR2Producer struct {
	BucketName string                         `json:"bucket_name"`
	Type       QueueProducersMqR2ProducerType `json:"type"`
	JSON       queueProducersMqR2ProducerJSON `json:"-"`
}

func (*QueueProducersMqR2Producer) UnmarshalJSON

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

type QueueProducersMqR2ProducerParam

type QueueProducersMqR2ProducerParam struct {
	BucketName param.Field[string]                         `json:"bucket_name"`
	Type       param.Field[QueueProducersMqR2ProducerType] `json:"type"`
}

func (QueueProducersMqR2ProducerParam) MarshalJSON

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

type QueueProducersMqR2ProducerType

type QueueProducersMqR2ProducerType string
const (
	QueueProducersMqR2ProducerTypeR2Bucket QueueProducersMqR2ProducerType = "r2_bucket"
)

func (QueueProducersMqR2ProducerType) IsKnown

type QueueProducersMqWorkerProducer

type QueueProducersMqWorkerProducer struct {
	Script string                             `json:"script"`
	Type   QueueProducersMqWorkerProducerType `json:"type"`
	JSON   queueProducersMqWorkerProducerJSON `json:"-"`
}

func (*QueueProducersMqWorkerProducer) UnmarshalJSON

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

type QueueProducersMqWorkerProducerParam

type QueueProducersMqWorkerProducerParam struct {
	Script param.Field[string]                             `json:"script"`
	Type   param.Field[QueueProducersMqWorkerProducerType] `json:"type"`
}

func (QueueProducersMqWorkerProducerParam) MarshalJSON

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

type QueueProducersMqWorkerProducerType

type QueueProducersMqWorkerProducerType string
const (
	QueueProducersMqWorkerProducerTypeWorker QueueProducersMqWorkerProducerType = "worker"
)

func (QueueProducersMqWorkerProducerType) IsKnown

type QueueProducersType

type QueueProducersType string
const (
	QueueProducersTypeWorker   QueueProducersType = "worker"
	QueueProducersTypeR2Bucket QueueProducersType = "r2_bucket"
)

func (QueueProducersType) IsKnown

func (r QueueProducersType) IsKnown() bool

type QueueProducersUnion

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

Union satisfied by QueueProducersMqWorkerProducer or QueueProducersMqR2Producer.

type QueueProducersUnionParam

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

Satisfied by queues.QueueProducersMqWorkerProducerParam, queues.QueueProducersMqR2ProducerParam, QueueProducerParam.

type QueueService

type QueueService struct {
	Options       []option.RequestOption
	Messages      *MessageService
	Purge         *PurgeService
	Consumers     *ConsumerService
	Subscriptions *SubscriptionService
}

QueueService 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 NewQueueService method instead.

func NewQueueService

func NewQueueService(opts ...option.RequestOption) (r *QueueService)

NewQueueService 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 (*QueueService) Delete

func (r *QueueService) Delete(ctx context.Context, queueID string, body QueueDeleteParams, opts ...option.RequestOption) (res *QueueDeleteResponse, err error)

Deletes a queue

func (*QueueService) Edit

func (r *QueueService) Edit(ctx context.Context, queueID string, params QueueEditParams, opts ...option.RequestOption) (res *Queue, err error)

Updates a Queue.

func (*QueueService) Get

func (r *QueueService) Get(ctx context.Context, queueID string, query QueueGetParams, opts ...option.RequestOption) (res *Queue, err error)

Get details about a specific queue.

func (*QueueService) List

func (r *QueueService) List(ctx context.Context, query QueueListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Queue], err error)

Returns the queues owned by an account.

func (*QueueService) ListAutoPaging

Returns the queues owned by an account.

func (*QueueService) New

func (r *QueueService) New(ctx context.Context, params QueueNewParams, opts ...option.RequestOption) (res *Queue, err error)

Create a new queue

func (*QueueService) Update

func (r *QueueService) Update(ctx context.Context, queueID string, params QueueUpdateParams, opts ...option.RequestOption) (res *Queue, err error)

Updates a Queue. Note that this endpoint does not support partial updates. If successful, the Queue's configuration is overwritten with the supplied configuration.

type QueueSettings

type QueueSettings struct {
	// Number of seconds to delay delivery of all messages to consumers.
	DeliveryDelay float64 `json:"delivery_delay"`
	// Indicates if message delivery to consumers is currently paused.
	DeliveryPaused bool `json:"delivery_paused"`
	// Number of seconds after which an unconsumed message will be delayed.
	MessageRetentionPeriod float64           `json:"message_retention_period"`
	JSON                   queueSettingsJSON `json:"-"`
}

func (*QueueSettings) UnmarshalJSON

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

type QueueSettingsParam

type QueueSettingsParam struct {
	// Number of seconds to delay delivery of all messages to consumers.
	DeliveryDelay param.Field[float64] `json:"delivery_delay"`
	// Indicates if message delivery to consumers is currently paused.
	DeliveryPaused param.Field[bool] `json:"delivery_paused"`
	// Number of seconds after which an unconsumed message will be delayed.
	MessageRetentionPeriod param.Field[float64] `json:"message_retention_period"`
}

func (QueueSettingsParam) MarshalJSON

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

type QueueUpdateParams

type QueueUpdateParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	Queue     QueueParam          `json:"queue"`
}

func (QueueUpdateParams) MarshalJSON

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

type QueueUpdateResponseEnvelope

type QueueUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors"`
	Messages []string              `json:"messages"`
	Result   Queue                 `json:"result"`
	// Indicates if the API call was successful or not.
	Success QueueUpdateResponseEnvelopeSuccess `json:"success"`
	JSON    queueUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*QueueUpdateResponseEnvelope) UnmarshalJSON

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

type QueueUpdateResponseEnvelopeSuccess

type QueueUpdateResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	QueueUpdateResponseEnvelopeSuccessTrue QueueUpdateResponseEnvelopeSuccess = true
)

func (QueueUpdateResponseEnvelopeSuccess) IsKnown

type RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

type RatePlanID

type RatePlanID = shared.RatePlanID

The ID of the rate plan.

This is an alias to an internal type.

type RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ResponseInfoSource

type ResponseInfoSource = shared.ResponseInfoSource

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

This is an alias to an internal type.

type RolePermissions

type RolePermissions = shared.RolePermissions

This is an alias to an internal type.

type RolePermissionsParam

type RolePermissionsParam = shared.RolePermissionsParam

This is an alias to an internal type.

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionDeleteParams

type SubscriptionDeleteParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
}

type SubscriptionDeleteResponse

type SubscriptionDeleteResponse struct {
	// Unique identifier for the subscription
	ID string `json:"id,required"`
	// When the subscription was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Destination configuration for the subscription
	Destination SubscriptionDeleteResponseDestination `json:"destination,required"`
	// Whether the subscription is active
	Enabled bool `json:"enabled,required"`
	// List of event types this subscription handles
	Events []string `json:"events,required"`
	// When the subscription was last modified
	ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
	// Name of the subscription
	Name string `json:"name,required"`
	// Source configuration for the subscription
	Source SubscriptionDeleteResponseSource `json:"source,required"`
	JSON   subscriptionDeleteResponseJSON   `json:"-"`
}

func (*SubscriptionDeleteResponse) UnmarshalJSON

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

type SubscriptionDeleteResponseDestination

type SubscriptionDeleteResponseDestination struct {
	// ID of the target queue
	QueueID string `json:"queue_id,required"`
	// Type of destination
	Type SubscriptionDeleteResponseDestinationType `json:"type,required"`
	JSON subscriptionDeleteResponseDestinationJSON `json:"-"`
}

Destination configuration for the subscription

func (*SubscriptionDeleteResponseDestination) UnmarshalJSON

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

type SubscriptionDeleteResponseDestinationType

type SubscriptionDeleteResponseDestinationType string

Type of destination

const (
	SubscriptionDeleteResponseDestinationTypeQueuesQueue SubscriptionDeleteResponseDestinationType = "queues.queue"
)

func (SubscriptionDeleteResponseDestinationType) IsKnown

type SubscriptionDeleteResponseEnvelope

type SubscriptionDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo      `json:"errors"`
	Messages []string                   `json:"messages"`
	Result   SubscriptionDeleteResponse `json:"result"`
	// Indicates if the API call was successful or not.
	Success SubscriptionDeleteResponseEnvelopeSuccess `json:"success"`
	JSON    subscriptionDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*SubscriptionDeleteResponseEnvelope) UnmarshalJSON

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

type SubscriptionDeleteResponseEnvelopeSuccess

type SubscriptionDeleteResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	SubscriptionDeleteResponseEnvelopeSuccessTrue SubscriptionDeleteResponseEnvelopeSuccess = true
)

func (SubscriptionDeleteResponseEnvelopeSuccess) IsKnown

type SubscriptionDeleteResponseSource

type SubscriptionDeleteResponseSource struct {
	// Name of the Workers AI model
	ModelName string `json:"model_name"`
	// Type of source
	Type SubscriptionDeleteResponseSourceType `json:"type"`
	// Name of the worker
	WorkerName string `json:"worker_name"`
	// Name of the workflow
	WorkflowName string                               `json:"workflow_name"`
	JSON         subscriptionDeleteResponseSourceJSON `json:"-"`
	// contains filtered or unexported fields
}

Source configuration for the subscription

func (*SubscriptionDeleteResponseSource) UnmarshalJSON

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

type SubscriptionDeleteResponseSourceMqEventSourceImages

type SubscriptionDeleteResponseSourceMqEventSourceImages struct {
	// Type of source
	Type SubscriptionDeleteResponseSourceMqEventSourceImagesType `json:"type"`
	JSON subscriptionDeleteResponseSourceMqEventSourceImagesJSON `json:"-"`
}

func (*SubscriptionDeleteResponseSourceMqEventSourceImages) UnmarshalJSON

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

type SubscriptionDeleteResponseSourceMqEventSourceImagesType

type SubscriptionDeleteResponseSourceMqEventSourceImagesType string

Type of source

const (
	SubscriptionDeleteResponseSourceMqEventSourceImagesTypeImages SubscriptionDeleteResponseSourceMqEventSourceImagesType = "images"
)

func (SubscriptionDeleteResponseSourceMqEventSourceImagesType) IsKnown

type SubscriptionDeleteResponseSourceMqEventSourceKV

type SubscriptionDeleteResponseSourceMqEventSourceKV struct {
	// Type of source
	Type SubscriptionDeleteResponseSourceMqEventSourceKVType `json:"type"`
	JSON subscriptionDeleteResponseSourceMqEventSourceKVJSON `json:"-"`
}

func (*SubscriptionDeleteResponseSourceMqEventSourceKV) UnmarshalJSON

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

type SubscriptionDeleteResponseSourceMqEventSourceKVType

type SubscriptionDeleteResponseSourceMqEventSourceKVType string

Type of source

const (
	SubscriptionDeleteResponseSourceMqEventSourceKVTypeKV SubscriptionDeleteResponseSourceMqEventSourceKVType = "kv"
)

func (SubscriptionDeleteResponseSourceMqEventSourceKVType) IsKnown

type SubscriptionDeleteResponseSourceMqEventSourceR2

type SubscriptionDeleteResponseSourceMqEventSourceR2 struct {
	// Type of source
	Type SubscriptionDeleteResponseSourceMqEventSourceR2Type `json:"type"`
	JSON subscriptionDeleteResponseSourceMqEventSourceR2JSON `json:"-"`
}

func (*SubscriptionDeleteResponseSourceMqEventSourceR2) UnmarshalJSON

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

type SubscriptionDeleteResponseSourceMqEventSourceR2Type

type SubscriptionDeleteResponseSourceMqEventSourceR2Type string

Type of source

const (
	SubscriptionDeleteResponseSourceMqEventSourceR2TypeR2 SubscriptionDeleteResponseSourceMqEventSourceR2Type = "r2"
)

func (SubscriptionDeleteResponseSourceMqEventSourceR2Type) IsKnown

type SubscriptionDeleteResponseSourceMqEventSourceSuperSlurper

type SubscriptionDeleteResponseSourceMqEventSourceSuperSlurper struct {
	// Type of source
	Type SubscriptionDeleteResponseSourceMqEventSourceSuperSlurperType `json:"type"`
	JSON subscriptionDeleteResponseSourceMqEventSourceSuperSlurperJSON `json:"-"`
}

func (*SubscriptionDeleteResponseSourceMqEventSourceSuperSlurper) UnmarshalJSON

type SubscriptionDeleteResponseSourceMqEventSourceSuperSlurperType

type SubscriptionDeleteResponseSourceMqEventSourceSuperSlurperType string

Type of source

const (
	SubscriptionDeleteResponseSourceMqEventSourceSuperSlurperTypeSuperSlurper SubscriptionDeleteResponseSourceMqEventSourceSuperSlurperType = "superSlurper"
)

func (SubscriptionDeleteResponseSourceMqEventSourceSuperSlurperType) IsKnown

type SubscriptionDeleteResponseSourceMqEventSourceVectorize

type SubscriptionDeleteResponseSourceMqEventSourceVectorize struct {
	// Type of source
	Type SubscriptionDeleteResponseSourceMqEventSourceVectorizeType `json:"type"`
	JSON subscriptionDeleteResponseSourceMqEventSourceVectorizeJSON `json:"-"`
}

func (*SubscriptionDeleteResponseSourceMqEventSourceVectorize) UnmarshalJSON

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

type SubscriptionDeleteResponseSourceMqEventSourceVectorizeType

type SubscriptionDeleteResponseSourceMqEventSourceVectorizeType string

Type of source

const (
	SubscriptionDeleteResponseSourceMqEventSourceVectorizeTypeVectorize SubscriptionDeleteResponseSourceMqEventSourceVectorizeType = "vectorize"
)

func (SubscriptionDeleteResponseSourceMqEventSourceVectorizeType) IsKnown

type SubscriptionDeleteResponseSourceMqEventSourceWorkersAIModel

type SubscriptionDeleteResponseSourceMqEventSourceWorkersAIModel struct {
	// Name of the Workers AI model
	ModelName string `json:"model_name"`
	// Type of source
	Type SubscriptionDeleteResponseSourceMqEventSourceWorkersAIModelType `json:"type"`
	JSON subscriptionDeleteResponseSourceMqEventSourceWorkersAIModelJSON `json:"-"`
}

func (*SubscriptionDeleteResponseSourceMqEventSourceWorkersAIModel) UnmarshalJSON

type SubscriptionDeleteResponseSourceMqEventSourceWorkersAIModelType

type SubscriptionDeleteResponseSourceMqEventSourceWorkersAIModelType string

Type of source

const (
	SubscriptionDeleteResponseSourceMqEventSourceWorkersAIModelTypeWorkersAIModel SubscriptionDeleteResponseSourceMqEventSourceWorkersAIModelType = "workersAi.model"
)

func (SubscriptionDeleteResponseSourceMqEventSourceWorkersAIModelType) IsKnown

type SubscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorker

type SubscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorker struct {
	// Type of source
	Type SubscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorkerType `json:"type"`
	// Name of the worker
	WorkerName string                                                               `json:"worker_name"`
	JSON       subscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorkerJSON `json:"-"`
}

func (*SubscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorker) UnmarshalJSON

type SubscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorkerType

type SubscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorkerType string

Type of source

const (
	SubscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorkerTypeWorkersBuildsWorker SubscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorkerType = "workersBuilds.worker"
)

func (SubscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorkerType) IsKnown

type SubscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflow

type SubscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflow struct {
	// Type of source
	Type SubscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflowType `json:"type"`
	// Name of the workflow
	WorkflowName string                                                             `json:"workflow_name"`
	JSON         subscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflowJSON `json:"-"`
}

func (*SubscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflow) UnmarshalJSON

type SubscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflowType

type SubscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflowType string

Type of source

const (
	SubscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflowTypeWorkflowsWorkflow SubscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflowType = "workflows.workflow"
)

func (SubscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflowType) IsKnown

type SubscriptionDeleteResponseSourceType

type SubscriptionDeleteResponseSourceType string

Type of source

const (
	SubscriptionDeleteResponseSourceTypeImages              SubscriptionDeleteResponseSourceType = "images"
	SubscriptionDeleteResponseSourceTypeKV                  SubscriptionDeleteResponseSourceType = "kv"
	SubscriptionDeleteResponseSourceTypeR2                  SubscriptionDeleteResponseSourceType = "r2"
	SubscriptionDeleteResponseSourceTypeSuperSlurper        SubscriptionDeleteResponseSourceType = "superSlurper"
	SubscriptionDeleteResponseSourceTypeVectorize           SubscriptionDeleteResponseSourceType = "vectorize"
	SubscriptionDeleteResponseSourceTypeWorkersAIModel      SubscriptionDeleteResponseSourceType = "workersAi.model"
	SubscriptionDeleteResponseSourceTypeWorkersBuildsWorker SubscriptionDeleteResponseSourceType = "workersBuilds.worker"
	SubscriptionDeleteResponseSourceTypeWorkflowsWorkflow   SubscriptionDeleteResponseSourceType = "workflows.workflow"
)

func (SubscriptionDeleteResponseSourceType) IsKnown

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionListParams

type SubscriptionListParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// Sort direction
	Direction param.Field[SubscriptionListParamsDirection] `query:"direction"`
	// Field to sort by
	Order param.Field[SubscriptionListParamsOrder] `query:"order"`
	// Page number for pagination
	Page param.Field[int64] `query:"page"`
	// Number of items per page
	PerPage param.Field[int64] `query:"per_page"`
}

func (SubscriptionListParams) URLQuery

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

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

type SubscriptionListParamsDirection

type SubscriptionListParamsDirection string

Sort direction

const (
	SubscriptionListParamsDirectionAsc  SubscriptionListParamsDirection = "asc"
	SubscriptionListParamsDirectionDesc SubscriptionListParamsDirection = "desc"
)

func (SubscriptionListParamsDirection) IsKnown

type SubscriptionListParamsOrder

type SubscriptionListParamsOrder string

Field to sort by

const (
	SubscriptionListParamsOrderCreatedAt SubscriptionListParamsOrder = "created_at"
	SubscriptionListParamsOrderName      SubscriptionListParamsOrder = "name"
	SubscriptionListParamsOrderEnabled   SubscriptionListParamsOrder = "enabled"
	SubscriptionListParamsOrderSource    SubscriptionListParamsOrder = "source"
)

func (SubscriptionListParamsOrder) IsKnown

func (r SubscriptionListParamsOrder) IsKnown() bool

type SubscriptionListResponse

type SubscriptionListResponse struct {
	// Unique identifier for the subscription
	ID string `json:"id,required"`
	// When the subscription was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Destination configuration for the subscription
	Destination SubscriptionListResponseDestination `json:"destination,required"`
	// Whether the subscription is active
	Enabled bool `json:"enabled,required"`
	// List of event types this subscription handles
	Events []string `json:"events,required"`
	// When the subscription was last modified
	ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
	// Name of the subscription
	Name string `json:"name,required"`
	// Source configuration for the subscription
	Source SubscriptionListResponseSource `json:"source,required"`
	JSON   subscriptionListResponseJSON   `json:"-"`
}

func (*SubscriptionListResponse) UnmarshalJSON

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

type SubscriptionListResponseDestination

type SubscriptionListResponseDestination struct {
	// ID of the target queue
	QueueID string `json:"queue_id,required"`
	// Type of destination
	Type SubscriptionListResponseDestinationType `json:"type,required"`
	JSON subscriptionListResponseDestinationJSON `json:"-"`
}

Destination configuration for the subscription

func (*SubscriptionListResponseDestination) UnmarshalJSON

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

type SubscriptionListResponseDestinationType

type SubscriptionListResponseDestinationType string

Type of destination

const (
	SubscriptionListResponseDestinationTypeQueuesQueue SubscriptionListResponseDestinationType = "queues.queue"
)

func (SubscriptionListResponseDestinationType) IsKnown

type SubscriptionListResponseSource

type SubscriptionListResponseSource struct {
	// Name of the Workers AI model
	ModelName string `json:"model_name"`
	// Type of source
	Type SubscriptionListResponseSourceType `json:"type"`
	// Name of the worker
	WorkerName string `json:"worker_name"`
	// Name of the workflow
	WorkflowName string                             `json:"workflow_name"`
	JSON         subscriptionListResponseSourceJSON `json:"-"`
	// contains filtered or unexported fields
}

Source configuration for the subscription

func (*SubscriptionListResponseSource) UnmarshalJSON

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

type SubscriptionListResponseSourceMqEventSourceImages

type SubscriptionListResponseSourceMqEventSourceImages struct {
	// Type of source
	Type SubscriptionListResponseSourceMqEventSourceImagesType `json:"type"`
	JSON subscriptionListResponseSourceMqEventSourceImagesJSON `json:"-"`
}

func (*SubscriptionListResponseSourceMqEventSourceImages) UnmarshalJSON

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

type SubscriptionListResponseSourceMqEventSourceImagesType

type SubscriptionListResponseSourceMqEventSourceImagesType string

Type of source

const (
	SubscriptionListResponseSourceMqEventSourceImagesTypeImages SubscriptionListResponseSourceMqEventSourceImagesType = "images"
)

func (SubscriptionListResponseSourceMqEventSourceImagesType) IsKnown

type SubscriptionListResponseSourceMqEventSourceKV

type SubscriptionListResponseSourceMqEventSourceKV struct {
	// Type of source
	Type SubscriptionListResponseSourceMqEventSourceKVType `json:"type"`
	JSON subscriptionListResponseSourceMqEventSourceKVJSON `json:"-"`
}

func (*SubscriptionListResponseSourceMqEventSourceKV) UnmarshalJSON

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

type SubscriptionListResponseSourceMqEventSourceKVType

type SubscriptionListResponseSourceMqEventSourceKVType string

Type of source

const (
	SubscriptionListResponseSourceMqEventSourceKVTypeKV SubscriptionListResponseSourceMqEventSourceKVType = "kv"
)

func (SubscriptionListResponseSourceMqEventSourceKVType) IsKnown

type SubscriptionListResponseSourceMqEventSourceR2

type SubscriptionListResponseSourceMqEventSourceR2 struct {
	// Type of source
	Type SubscriptionListResponseSourceMqEventSourceR2Type `json:"type"`
	JSON subscriptionListResponseSourceMqEventSourceR2JSON `json:"-"`
}

func (*SubscriptionListResponseSourceMqEventSourceR2) UnmarshalJSON

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

type SubscriptionListResponseSourceMqEventSourceR2Type

type SubscriptionListResponseSourceMqEventSourceR2Type string

Type of source

const (
	SubscriptionListResponseSourceMqEventSourceR2TypeR2 SubscriptionListResponseSourceMqEventSourceR2Type = "r2"
)

func (SubscriptionListResponseSourceMqEventSourceR2Type) IsKnown

type SubscriptionListResponseSourceMqEventSourceSuperSlurper

type SubscriptionListResponseSourceMqEventSourceSuperSlurper struct {
	// Type of source
	Type SubscriptionListResponseSourceMqEventSourceSuperSlurperType `json:"type"`
	JSON subscriptionListResponseSourceMqEventSourceSuperSlurperJSON `json:"-"`
}

func (*SubscriptionListResponseSourceMqEventSourceSuperSlurper) UnmarshalJSON

type SubscriptionListResponseSourceMqEventSourceSuperSlurperType

type SubscriptionListResponseSourceMqEventSourceSuperSlurperType string

Type of source

const (
	SubscriptionListResponseSourceMqEventSourceSuperSlurperTypeSuperSlurper SubscriptionListResponseSourceMqEventSourceSuperSlurperType = "superSlurper"
)

func (SubscriptionListResponseSourceMqEventSourceSuperSlurperType) IsKnown

type SubscriptionListResponseSourceMqEventSourceVectorize

type SubscriptionListResponseSourceMqEventSourceVectorize struct {
	// Type of source
	Type SubscriptionListResponseSourceMqEventSourceVectorizeType `json:"type"`
	JSON subscriptionListResponseSourceMqEventSourceVectorizeJSON `json:"-"`
}

func (*SubscriptionListResponseSourceMqEventSourceVectorize) UnmarshalJSON

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

type SubscriptionListResponseSourceMqEventSourceVectorizeType

type SubscriptionListResponseSourceMqEventSourceVectorizeType string

Type of source

const (
	SubscriptionListResponseSourceMqEventSourceVectorizeTypeVectorize SubscriptionListResponseSourceMqEventSourceVectorizeType = "vectorize"
)

func (SubscriptionListResponseSourceMqEventSourceVectorizeType) IsKnown

type SubscriptionListResponseSourceMqEventSourceWorkersAIModel

type SubscriptionListResponseSourceMqEventSourceWorkersAIModel struct {
	// Name of the Workers AI model
	ModelName string `json:"model_name"`
	// Type of source
	Type SubscriptionListResponseSourceMqEventSourceWorkersAIModelType `json:"type"`
	JSON subscriptionListResponseSourceMqEventSourceWorkersAIModelJSON `json:"-"`
}

func (*SubscriptionListResponseSourceMqEventSourceWorkersAIModel) UnmarshalJSON

type SubscriptionListResponseSourceMqEventSourceWorkersAIModelType

type SubscriptionListResponseSourceMqEventSourceWorkersAIModelType string

Type of source

const (
	SubscriptionListResponseSourceMqEventSourceWorkersAIModelTypeWorkersAIModel SubscriptionListResponseSourceMqEventSourceWorkersAIModelType = "workersAi.model"
)

func (SubscriptionListResponseSourceMqEventSourceWorkersAIModelType) IsKnown

type SubscriptionListResponseSourceMqEventSourceWorkersBuildsWorker

type SubscriptionListResponseSourceMqEventSourceWorkersBuildsWorker struct {
	// Type of source
	Type SubscriptionListResponseSourceMqEventSourceWorkersBuildsWorkerType `json:"type"`
	// Name of the worker
	WorkerName string                                                             `json:"worker_name"`
	JSON       subscriptionListResponseSourceMqEventSourceWorkersBuildsWorkerJSON `json:"-"`
}

func (*SubscriptionListResponseSourceMqEventSourceWorkersBuildsWorker) UnmarshalJSON

type SubscriptionListResponseSourceMqEventSourceWorkersBuildsWorkerType

type SubscriptionListResponseSourceMqEventSourceWorkersBuildsWorkerType string

Type of source

const (
	SubscriptionListResponseSourceMqEventSourceWorkersBuildsWorkerTypeWorkersBuildsWorker SubscriptionListResponseSourceMqEventSourceWorkersBuildsWorkerType = "workersBuilds.worker"
)

func (SubscriptionListResponseSourceMqEventSourceWorkersBuildsWorkerType) IsKnown

type SubscriptionListResponseSourceMqEventSourceWorkflowsWorkflow

type SubscriptionListResponseSourceMqEventSourceWorkflowsWorkflow struct {
	// Type of source
	Type SubscriptionListResponseSourceMqEventSourceWorkflowsWorkflowType `json:"type"`
	// Name of the workflow
	WorkflowName string                                                           `json:"workflow_name"`
	JSON         subscriptionListResponseSourceMqEventSourceWorkflowsWorkflowJSON `json:"-"`
}

func (*SubscriptionListResponseSourceMqEventSourceWorkflowsWorkflow) UnmarshalJSON

type SubscriptionListResponseSourceMqEventSourceWorkflowsWorkflowType

type SubscriptionListResponseSourceMqEventSourceWorkflowsWorkflowType string

Type of source

const (
	SubscriptionListResponseSourceMqEventSourceWorkflowsWorkflowTypeWorkflowsWorkflow SubscriptionListResponseSourceMqEventSourceWorkflowsWorkflowType = "workflows.workflow"
)

func (SubscriptionListResponseSourceMqEventSourceWorkflowsWorkflowType) IsKnown

type SubscriptionListResponseSourceType

type SubscriptionListResponseSourceType string

Type of source

const (
	SubscriptionListResponseSourceTypeImages              SubscriptionListResponseSourceType = "images"
	SubscriptionListResponseSourceTypeKV                  SubscriptionListResponseSourceType = "kv"
	SubscriptionListResponseSourceTypeR2                  SubscriptionListResponseSourceType = "r2"
	SubscriptionListResponseSourceTypeSuperSlurper        SubscriptionListResponseSourceType = "superSlurper"
	SubscriptionListResponseSourceTypeVectorize           SubscriptionListResponseSourceType = "vectorize"
	SubscriptionListResponseSourceTypeWorkersAIModel      SubscriptionListResponseSourceType = "workersAi.model"
	SubscriptionListResponseSourceTypeWorkersBuildsWorker SubscriptionListResponseSourceType = "workersBuilds.worker"
	SubscriptionListResponseSourceTypeWorkflowsWorkflow   SubscriptionListResponseSourceType = "workflows.workflow"
)

func (SubscriptionListResponseSourceType) IsKnown

type SubscriptionNewParams

type SubscriptionNewParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// Destination configuration for the subscription
	Destination param.Field[SubscriptionNewParamsDestination] `json:"destination"`
	// Whether the subscription is active
	Enabled param.Field[bool] `json:"enabled"`
	// List of event types this subscription handles
	Events param.Field[[]string] `json:"events"`
	// Name of the subscription
	Name param.Field[string] `json:"name"`
	// Source configuration for the subscription
	Source param.Field[SubscriptionNewParamsSourceUnion] `json:"source"`
}

func (SubscriptionNewParams) MarshalJSON

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

type SubscriptionNewParamsDestination

type SubscriptionNewParamsDestination struct {
	// ID of the target queue
	QueueID param.Field[string] `json:"queue_id,required"`
	// Type of destination
	Type param.Field[SubscriptionNewParamsDestinationType] `json:"type,required"`
}

Destination configuration for the subscription

func (SubscriptionNewParamsDestination) MarshalJSON

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

type SubscriptionNewParamsDestinationType

type SubscriptionNewParamsDestinationType string

Type of destination

const (
	SubscriptionNewParamsDestinationTypeQueuesQueue SubscriptionNewParamsDestinationType = "queues.queue"
)

func (SubscriptionNewParamsDestinationType) IsKnown

type SubscriptionNewParamsSource

type SubscriptionNewParamsSource struct {
	// Name of the Workers AI model
	ModelName param.Field[string] `json:"model_name"`
	// Type of source
	Type param.Field[SubscriptionNewParamsSourceType] `json:"type"`
	// Name of the worker
	WorkerName param.Field[string] `json:"worker_name"`
	// Name of the workflow
	WorkflowName param.Field[string] `json:"workflow_name"`
}

Source configuration for the subscription

func (SubscriptionNewParamsSource) MarshalJSON

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

type SubscriptionNewParamsSourceMqEventSourceImages

type SubscriptionNewParamsSourceMqEventSourceImages struct {
	// Type of source
	Type param.Field[SubscriptionNewParamsSourceMqEventSourceImagesType] `json:"type"`
}

func (SubscriptionNewParamsSourceMqEventSourceImages) MarshalJSON

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

type SubscriptionNewParamsSourceMqEventSourceImagesType

type SubscriptionNewParamsSourceMqEventSourceImagesType string

Type of source

const (
	SubscriptionNewParamsSourceMqEventSourceImagesTypeImages SubscriptionNewParamsSourceMqEventSourceImagesType = "images"
)

func (SubscriptionNewParamsSourceMqEventSourceImagesType) IsKnown

type SubscriptionNewParamsSourceMqEventSourceKV

type SubscriptionNewParamsSourceMqEventSourceKV struct {
	// Type of source
	Type param.Field[SubscriptionNewParamsSourceMqEventSourceKVType] `json:"type"`
}

func (SubscriptionNewParamsSourceMqEventSourceKV) MarshalJSON

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

type SubscriptionNewParamsSourceMqEventSourceKVType

type SubscriptionNewParamsSourceMqEventSourceKVType string

Type of source

const (
	SubscriptionNewParamsSourceMqEventSourceKVTypeKV SubscriptionNewParamsSourceMqEventSourceKVType = "kv"
)

func (SubscriptionNewParamsSourceMqEventSourceKVType) IsKnown

type SubscriptionNewParamsSourceMqEventSourceR2

type SubscriptionNewParamsSourceMqEventSourceR2 struct {
	// Type of source
	Type param.Field[SubscriptionNewParamsSourceMqEventSourceR2Type] `json:"type"`
}

func (SubscriptionNewParamsSourceMqEventSourceR2) MarshalJSON

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

type SubscriptionNewParamsSourceMqEventSourceR2Type

type SubscriptionNewParamsSourceMqEventSourceR2Type string

Type of source

const (
	SubscriptionNewParamsSourceMqEventSourceR2TypeR2 SubscriptionNewParamsSourceMqEventSourceR2Type = "r2"
)

func (SubscriptionNewParamsSourceMqEventSourceR2Type) IsKnown

type SubscriptionNewParamsSourceMqEventSourceSuperSlurper

type SubscriptionNewParamsSourceMqEventSourceSuperSlurper struct {
	// Type of source
	Type param.Field[SubscriptionNewParamsSourceMqEventSourceSuperSlurperType] `json:"type"`
}

func (SubscriptionNewParamsSourceMqEventSourceSuperSlurper) MarshalJSON

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

type SubscriptionNewParamsSourceMqEventSourceSuperSlurperType

type SubscriptionNewParamsSourceMqEventSourceSuperSlurperType string

Type of source

const (
	SubscriptionNewParamsSourceMqEventSourceSuperSlurperTypeSuperSlurper SubscriptionNewParamsSourceMqEventSourceSuperSlurperType = "superSlurper"
)

func (SubscriptionNewParamsSourceMqEventSourceSuperSlurperType) IsKnown

type SubscriptionNewParamsSourceMqEventSourceVectorize

type SubscriptionNewParamsSourceMqEventSourceVectorize struct {
	// Type of source
	Type param.Field[SubscriptionNewParamsSourceMqEventSourceVectorizeType] `json:"type"`
}

func (SubscriptionNewParamsSourceMqEventSourceVectorize) MarshalJSON

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

type SubscriptionNewParamsSourceMqEventSourceVectorizeType

type SubscriptionNewParamsSourceMqEventSourceVectorizeType string

Type of source

const (
	SubscriptionNewParamsSourceMqEventSourceVectorizeTypeVectorize SubscriptionNewParamsSourceMqEventSourceVectorizeType = "vectorize"
)

func (SubscriptionNewParamsSourceMqEventSourceVectorizeType) IsKnown

type SubscriptionNewParamsSourceMqEventSourceWorkersAIModel

type SubscriptionNewParamsSourceMqEventSourceWorkersAIModel struct {
	// Name of the Workers AI model
	ModelName param.Field[string] `json:"model_name"`
	// Type of source
	Type param.Field[SubscriptionNewParamsSourceMqEventSourceWorkersAIModelType] `json:"type"`
}

func (SubscriptionNewParamsSourceMqEventSourceWorkersAIModel) MarshalJSON

type SubscriptionNewParamsSourceMqEventSourceWorkersAIModelType

type SubscriptionNewParamsSourceMqEventSourceWorkersAIModelType string

Type of source

const (
	SubscriptionNewParamsSourceMqEventSourceWorkersAIModelTypeWorkersAIModel SubscriptionNewParamsSourceMqEventSourceWorkersAIModelType = "workersAi.model"
)

func (SubscriptionNewParamsSourceMqEventSourceWorkersAIModelType) IsKnown

type SubscriptionNewParamsSourceMqEventSourceWorkersBuildsWorker

type SubscriptionNewParamsSourceMqEventSourceWorkersBuildsWorker struct {
	// Type of source
	Type param.Field[SubscriptionNewParamsSourceMqEventSourceWorkersBuildsWorkerType] `json:"type"`
	// Name of the worker
	WorkerName param.Field[string] `json:"worker_name"`
}

func (SubscriptionNewParamsSourceMqEventSourceWorkersBuildsWorker) MarshalJSON

type SubscriptionNewParamsSourceMqEventSourceWorkersBuildsWorkerType

type SubscriptionNewParamsSourceMqEventSourceWorkersBuildsWorkerType string

Type of source

const (
	SubscriptionNewParamsSourceMqEventSourceWorkersBuildsWorkerTypeWorkersBuildsWorker SubscriptionNewParamsSourceMqEventSourceWorkersBuildsWorkerType = "workersBuilds.worker"
)

func (SubscriptionNewParamsSourceMqEventSourceWorkersBuildsWorkerType) IsKnown

type SubscriptionNewParamsSourceMqEventSourceWorkflowsWorkflow

type SubscriptionNewParamsSourceMqEventSourceWorkflowsWorkflow struct {
	// Type of source
	Type param.Field[SubscriptionNewParamsSourceMqEventSourceWorkflowsWorkflowType] `json:"type"`
	// Name of the workflow
	WorkflowName param.Field[string] `json:"workflow_name"`
}

func (SubscriptionNewParamsSourceMqEventSourceWorkflowsWorkflow) MarshalJSON

type SubscriptionNewParamsSourceMqEventSourceWorkflowsWorkflowType

type SubscriptionNewParamsSourceMqEventSourceWorkflowsWorkflowType string

Type of source

const (
	SubscriptionNewParamsSourceMqEventSourceWorkflowsWorkflowTypeWorkflowsWorkflow SubscriptionNewParamsSourceMqEventSourceWorkflowsWorkflowType = "workflows.workflow"
)

func (SubscriptionNewParamsSourceMqEventSourceWorkflowsWorkflowType) IsKnown

type SubscriptionNewParamsSourceType

type SubscriptionNewParamsSourceType string

Type of source

const (
	SubscriptionNewParamsSourceTypeImages              SubscriptionNewParamsSourceType = "images"
	SubscriptionNewParamsSourceTypeKV                  SubscriptionNewParamsSourceType = "kv"
	SubscriptionNewParamsSourceTypeR2                  SubscriptionNewParamsSourceType = "r2"
	SubscriptionNewParamsSourceTypeSuperSlurper        SubscriptionNewParamsSourceType = "superSlurper"
	SubscriptionNewParamsSourceTypeVectorize           SubscriptionNewParamsSourceType = "vectorize"
	SubscriptionNewParamsSourceTypeWorkersAIModel      SubscriptionNewParamsSourceType = "workersAi.model"
	SubscriptionNewParamsSourceTypeWorkersBuildsWorker SubscriptionNewParamsSourceType = "workersBuilds.worker"
	SubscriptionNewParamsSourceTypeWorkflowsWorkflow   SubscriptionNewParamsSourceType = "workflows.workflow"
)

func (SubscriptionNewParamsSourceType) IsKnown

type SubscriptionNewResponse

type SubscriptionNewResponse struct {
	// Unique identifier for the subscription
	ID string `json:"id,required"`
	// When the subscription was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Destination configuration for the subscription
	Destination SubscriptionNewResponseDestination `json:"destination,required"`
	// Whether the subscription is active
	Enabled bool `json:"enabled,required"`
	// List of event types this subscription handles
	Events []string `json:"events,required"`
	// When the subscription was last modified
	ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
	// Name of the subscription
	Name string `json:"name,required"`
	// Source configuration for the subscription
	Source SubscriptionNewResponseSource `json:"source,required"`
	JSON   subscriptionNewResponseJSON   `json:"-"`
}

func (*SubscriptionNewResponse) UnmarshalJSON

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

type SubscriptionNewResponseDestination

type SubscriptionNewResponseDestination struct {
	// ID of the target queue
	QueueID string `json:"queue_id,required"`
	// Type of destination
	Type SubscriptionNewResponseDestinationType `json:"type,required"`
	JSON subscriptionNewResponseDestinationJSON `json:"-"`
}

Destination configuration for the subscription

func (*SubscriptionNewResponseDestination) UnmarshalJSON

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

type SubscriptionNewResponseDestinationType

type SubscriptionNewResponseDestinationType string

Type of destination

const (
	SubscriptionNewResponseDestinationTypeQueuesQueue SubscriptionNewResponseDestinationType = "queues.queue"
)

func (SubscriptionNewResponseDestinationType) IsKnown

type SubscriptionNewResponseEnvelope

type SubscriptionNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo   `json:"errors"`
	Messages []string                `json:"messages"`
	Result   SubscriptionNewResponse `json:"result"`
	// Indicates if the API call was successful or not.
	Success SubscriptionNewResponseEnvelopeSuccess `json:"success"`
	JSON    subscriptionNewResponseEnvelopeJSON    `json:"-"`
}

func (*SubscriptionNewResponseEnvelope) UnmarshalJSON

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

type SubscriptionNewResponseEnvelopeSuccess

type SubscriptionNewResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	SubscriptionNewResponseEnvelopeSuccessTrue SubscriptionNewResponseEnvelopeSuccess = true
)

func (SubscriptionNewResponseEnvelopeSuccess) IsKnown

type SubscriptionNewResponseSource

type SubscriptionNewResponseSource struct {
	// Name of the Workers AI model
	ModelName string `json:"model_name"`
	// Type of source
	Type SubscriptionNewResponseSourceType `json:"type"`
	// Name of the worker
	WorkerName string `json:"worker_name"`
	// Name of the workflow
	WorkflowName string                            `json:"workflow_name"`
	JSON         subscriptionNewResponseSourceJSON `json:"-"`
	// contains filtered or unexported fields
}

Source configuration for the subscription

func (*SubscriptionNewResponseSource) UnmarshalJSON

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

type SubscriptionNewResponseSourceMqEventSourceImages

type SubscriptionNewResponseSourceMqEventSourceImages struct {
	// Type of source
	Type SubscriptionNewResponseSourceMqEventSourceImagesType `json:"type"`
	JSON subscriptionNewResponseSourceMqEventSourceImagesJSON `json:"-"`
}

func (*SubscriptionNewResponseSourceMqEventSourceImages) UnmarshalJSON

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

type SubscriptionNewResponseSourceMqEventSourceImagesType

type SubscriptionNewResponseSourceMqEventSourceImagesType string

Type of source

const (
	SubscriptionNewResponseSourceMqEventSourceImagesTypeImages SubscriptionNewResponseSourceMqEventSourceImagesType = "images"
)

func (SubscriptionNewResponseSourceMqEventSourceImagesType) IsKnown

type SubscriptionNewResponseSourceMqEventSourceKV

type SubscriptionNewResponseSourceMqEventSourceKV struct {
	// Type of source
	Type SubscriptionNewResponseSourceMqEventSourceKVType `json:"type"`
	JSON subscriptionNewResponseSourceMqEventSourceKVJSON `json:"-"`
}

func (*SubscriptionNewResponseSourceMqEventSourceKV) UnmarshalJSON

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

type SubscriptionNewResponseSourceMqEventSourceKVType

type SubscriptionNewResponseSourceMqEventSourceKVType string

Type of source

const (
	SubscriptionNewResponseSourceMqEventSourceKVTypeKV SubscriptionNewResponseSourceMqEventSourceKVType = "kv"
)

func (SubscriptionNewResponseSourceMqEventSourceKVType) IsKnown

type SubscriptionNewResponseSourceMqEventSourceR2

type SubscriptionNewResponseSourceMqEventSourceR2 struct {
	// Type of source
	Type SubscriptionNewResponseSourceMqEventSourceR2Type `json:"type"`
	JSON subscriptionNewResponseSourceMqEventSourceR2JSON `json:"-"`
}

func (*SubscriptionNewResponseSourceMqEventSourceR2) UnmarshalJSON

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

type SubscriptionNewResponseSourceMqEventSourceR2Type

type SubscriptionNewResponseSourceMqEventSourceR2Type string

Type of source

const (
	SubscriptionNewResponseSourceMqEventSourceR2TypeR2 SubscriptionNewResponseSourceMqEventSourceR2Type = "r2"
)

func (SubscriptionNewResponseSourceMqEventSourceR2Type) IsKnown

type SubscriptionNewResponseSourceMqEventSourceSuperSlurper

type SubscriptionNewResponseSourceMqEventSourceSuperSlurper struct {
	// Type of source
	Type SubscriptionNewResponseSourceMqEventSourceSuperSlurperType `json:"type"`
	JSON subscriptionNewResponseSourceMqEventSourceSuperSlurperJSON `json:"-"`
}

func (*SubscriptionNewResponseSourceMqEventSourceSuperSlurper) UnmarshalJSON

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

type SubscriptionNewResponseSourceMqEventSourceSuperSlurperType

type SubscriptionNewResponseSourceMqEventSourceSuperSlurperType string

Type of source

const (
	SubscriptionNewResponseSourceMqEventSourceSuperSlurperTypeSuperSlurper SubscriptionNewResponseSourceMqEventSourceSuperSlurperType = "superSlurper"
)

func (SubscriptionNewResponseSourceMqEventSourceSuperSlurperType) IsKnown

type SubscriptionNewResponseSourceMqEventSourceVectorize

type SubscriptionNewResponseSourceMqEventSourceVectorize struct {
	// Type of source
	Type SubscriptionNewResponseSourceMqEventSourceVectorizeType `json:"type"`
	JSON subscriptionNewResponseSourceMqEventSourceVectorizeJSON `json:"-"`
}

func (*SubscriptionNewResponseSourceMqEventSourceVectorize) UnmarshalJSON

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

type SubscriptionNewResponseSourceMqEventSourceVectorizeType

type SubscriptionNewResponseSourceMqEventSourceVectorizeType string

Type of source

const (
	SubscriptionNewResponseSourceMqEventSourceVectorizeTypeVectorize SubscriptionNewResponseSourceMqEventSourceVectorizeType = "vectorize"
)

func (SubscriptionNewResponseSourceMqEventSourceVectorizeType) IsKnown

type SubscriptionNewResponseSourceMqEventSourceWorkersAIModel

type SubscriptionNewResponseSourceMqEventSourceWorkersAIModel struct {
	// Name of the Workers AI model
	ModelName string `json:"model_name"`
	// Type of source
	Type SubscriptionNewResponseSourceMqEventSourceWorkersAIModelType `json:"type"`
	JSON subscriptionNewResponseSourceMqEventSourceWorkersAIModelJSON `json:"-"`
}

func (*SubscriptionNewResponseSourceMqEventSourceWorkersAIModel) UnmarshalJSON

type SubscriptionNewResponseSourceMqEventSourceWorkersAIModelType

type SubscriptionNewResponseSourceMqEventSourceWorkersAIModelType string

Type of source

const (
	SubscriptionNewResponseSourceMqEventSourceWorkersAIModelTypeWorkersAIModel SubscriptionNewResponseSourceMqEventSourceWorkersAIModelType = "workersAi.model"
)

func (SubscriptionNewResponseSourceMqEventSourceWorkersAIModelType) IsKnown

type SubscriptionNewResponseSourceMqEventSourceWorkersBuildsWorker

type SubscriptionNewResponseSourceMqEventSourceWorkersBuildsWorker struct {
	// Type of source
	Type SubscriptionNewResponseSourceMqEventSourceWorkersBuildsWorkerType `json:"type"`
	// Name of the worker
	WorkerName string                                                            `json:"worker_name"`
	JSON       subscriptionNewResponseSourceMqEventSourceWorkersBuildsWorkerJSON `json:"-"`
}

func (*SubscriptionNewResponseSourceMqEventSourceWorkersBuildsWorker) UnmarshalJSON

type SubscriptionNewResponseSourceMqEventSourceWorkersBuildsWorkerType

type SubscriptionNewResponseSourceMqEventSourceWorkersBuildsWorkerType string

Type of source

const (
	SubscriptionNewResponseSourceMqEventSourceWorkersBuildsWorkerTypeWorkersBuildsWorker SubscriptionNewResponseSourceMqEventSourceWorkersBuildsWorkerType = "workersBuilds.worker"
)

func (SubscriptionNewResponseSourceMqEventSourceWorkersBuildsWorkerType) IsKnown

type SubscriptionNewResponseSourceMqEventSourceWorkflowsWorkflow

type SubscriptionNewResponseSourceMqEventSourceWorkflowsWorkflow struct {
	// Type of source
	Type SubscriptionNewResponseSourceMqEventSourceWorkflowsWorkflowType `json:"type"`
	// Name of the workflow
	WorkflowName string                                                          `json:"workflow_name"`
	JSON         subscriptionNewResponseSourceMqEventSourceWorkflowsWorkflowJSON `json:"-"`
}

func (*SubscriptionNewResponseSourceMqEventSourceWorkflowsWorkflow) UnmarshalJSON

type SubscriptionNewResponseSourceMqEventSourceWorkflowsWorkflowType

type SubscriptionNewResponseSourceMqEventSourceWorkflowsWorkflowType string

Type of source

const (
	SubscriptionNewResponseSourceMqEventSourceWorkflowsWorkflowTypeWorkflowsWorkflow SubscriptionNewResponseSourceMqEventSourceWorkflowsWorkflowType = "workflows.workflow"
)

func (SubscriptionNewResponseSourceMqEventSourceWorkflowsWorkflowType) IsKnown

type SubscriptionNewResponseSourceType

type SubscriptionNewResponseSourceType string

Type of source

const (
	SubscriptionNewResponseSourceTypeImages              SubscriptionNewResponseSourceType = "images"
	SubscriptionNewResponseSourceTypeKV                  SubscriptionNewResponseSourceType = "kv"
	SubscriptionNewResponseSourceTypeR2                  SubscriptionNewResponseSourceType = "r2"
	SubscriptionNewResponseSourceTypeSuperSlurper        SubscriptionNewResponseSourceType = "superSlurper"
	SubscriptionNewResponseSourceTypeVectorize           SubscriptionNewResponseSourceType = "vectorize"
	SubscriptionNewResponseSourceTypeWorkersAIModel      SubscriptionNewResponseSourceType = "workersAi.model"
	SubscriptionNewResponseSourceTypeWorkersBuildsWorker SubscriptionNewResponseSourceType = "workersBuilds.worker"
	SubscriptionNewResponseSourceTypeWorkflowsWorkflow   SubscriptionNewResponseSourceType = "workflows.workflow"
)

func (SubscriptionNewResponseSourceType) IsKnown

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionService

type SubscriptionService struct {
	Options []option.RequestOption
}

SubscriptionService 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 NewSubscriptionService method instead.

func NewSubscriptionService

func NewSubscriptionService(opts ...option.RequestOption) (r *SubscriptionService)

NewSubscriptionService 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 (*SubscriptionService) Delete

Delete an existing event subscription

func (*SubscriptionService) List

Get a paginated list of event subscriptions with optional sorting and filtering

func (*SubscriptionService) ListAutoPaging

Get a paginated list of event subscriptions with optional sorting and filtering

func (*SubscriptionService) New

Create a new event subscription for a queue

func (*SubscriptionService) Update

func (r *SubscriptionService) Update(ctx context.Context, subscriptionID string, params SubscriptionUpdateParams, opts ...option.RequestOption) (res *SubscriptionUpdateResponse, err error)

Update an existing event subscription

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type SubscriptionUpdateParams

type SubscriptionUpdateParams struct {
	// A Resource identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// Destination configuration for the subscription
	Destination param.Field[SubscriptionUpdateParamsDestination] `json:"destination"`
	// Whether the subscription is active
	Enabled param.Field[bool] `json:"enabled"`
	// List of event types this subscription handles
	Events param.Field[[]string] `json:"events"`
	// Name of the subscription
	Name param.Field[string] `json:"name"`
}

func (SubscriptionUpdateParams) MarshalJSON

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

type SubscriptionUpdateParamsDestination

type SubscriptionUpdateParamsDestination struct {
	// ID of the target queue
	QueueID param.Field[string] `json:"queue_id,required"`
	// Type of destination
	Type param.Field[SubscriptionUpdateParamsDestinationType] `json:"type,required"`
}

Destination configuration for the subscription

func (SubscriptionUpdateParamsDestination) MarshalJSON

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

type SubscriptionUpdateParamsDestinationType

type SubscriptionUpdateParamsDestinationType string

Type of destination

const (
	SubscriptionUpdateParamsDestinationTypeQueuesQueue SubscriptionUpdateParamsDestinationType = "queues.queue"
)

func (SubscriptionUpdateParamsDestinationType) IsKnown

type SubscriptionUpdateResponse

type SubscriptionUpdateResponse struct {
	// Unique identifier for the subscription
	ID string `json:"id,required"`
	// When the subscription was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Destination configuration for the subscription
	Destination SubscriptionUpdateResponseDestination `json:"destination,required"`
	// Whether the subscription is active
	Enabled bool `json:"enabled,required"`
	// List of event types this subscription handles
	Events []string `json:"events,required"`
	// When the subscription was last modified
	ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
	// Name of the subscription
	Name string `json:"name,required"`
	// Source configuration for the subscription
	Source SubscriptionUpdateResponseSource `json:"source,required"`
	JSON   subscriptionUpdateResponseJSON   `json:"-"`
}

func (*SubscriptionUpdateResponse) UnmarshalJSON

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

type SubscriptionUpdateResponseDestination

type SubscriptionUpdateResponseDestination struct {
	// ID of the target queue
	QueueID string `json:"queue_id,required"`
	// Type of destination
	Type SubscriptionUpdateResponseDestinationType `json:"type,required"`
	JSON subscriptionUpdateResponseDestinationJSON `json:"-"`
}

Destination configuration for the subscription

func (*SubscriptionUpdateResponseDestination) UnmarshalJSON

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

type SubscriptionUpdateResponseDestinationType

type SubscriptionUpdateResponseDestinationType string

Type of destination

const (
	SubscriptionUpdateResponseDestinationTypeQueuesQueue SubscriptionUpdateResponseDestinationType = "queues.queue"
)

func (SubscriptionUpdateResponseDestinationType) IsKnown

type SubscriptionUpdateResponseEnvelope

type SubscriptionUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo      `json:"errors"`
	Messages []string                   `json:"messages"`
	Result   SubscriptionUpdateResponse `json:"result"`
	// Indicates if the API call was successful or not.
	Success SubscriptionUpdateResponseEnvelopeSuccess `json:"success"`
	JSON    subscriptionUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*SubscriptionUpdateResponseEnvelope) UnmarshalJSON

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

type SubscriptionUpdateResponseEnvelopeSuccess

type SubscriptionUpdateResponseEnvelopeSuccess bool

Indicates if the API call was successful or not.

const (
	SubscriptionUpdateResponseEnvelopeSuccessTrue SubscriptionUpdateResponseEnvelopeSuccess = true
)

func (SubscriptionUpdateResponseEnvelopeSuccess) IsKnown

type SubscriptionUpdateResponseSource

type SubscriptionUpdateResponseSource struct {
	// Name of the Workers AI model
	ModelName string `json:"model_name"`
	// Type of source
	Type SubscriptionUpdateResponseSourceType `json:"type"`
	// Name of the worker
	WorkerName string `json:"worker_name"`
	// Name of the workflow
	WorkflowName string                               `json:"workflow_name"`
	JSON         subscriptionUpdateResponseSourceJSON `json:"-"`
	// contains filtered or unexported fields
}

Source configuration for the subscription

func (*SubscriptionUpdateResponseSource) UnmarshalJSON

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

type SubscriptionUpdateResponseSourceMqEventSourceImages

type SubscriptionUpdateResponseSourceMqEventSourceImages struct {
	// Type of source
	Type SubscriptionUpdateResponseSourceMqEventSourceImagesType `json:"type"`
	JSON subscriptionUpdateResponseSourceMqEventSourceImagesJSON `json:"-"`
}

func (*SubscriptionUpdateResponseSourceMqEventSourceImages) UnmarshalJSON

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

type SubscriptionUpdateResponseSourceMqEventSourceImagesType

type SubscriptionUpdateResponseSourceMqEventSourceImagesType string

Type of source

const (
	SubscriptionUpdateResponseSourceMqEventSourceImagesTypeImages SubscriptionUpdateResponseSourceMqEventSourceImagesType = "images"
)

func (SubscriptionUpdateResponseSourceMqEventSourceImagesType) IsKnown

type SubscriptionUpdateResponseSourceMqEventSourceKV

type SubscriptionUpdateResponseSourceMqEventSourceKV struct {
	// Type of source
	Type SubscriptionUpdateResponseSourceMqEventSourceKVType `json:"type"`
	JSON subscriptionUpdateResponseSourceMqEventSourceKVJSON `json:"-"`
}

func (*SubscriptionUpdateResponseSourceMqEventSourceKV) UnmarshalJSON

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

type SubscriptionUpdateResponseSourceMqEventSourceKVType

type SubscriptionUpdateResponseSourceMqEventSourceKVType string

Type of source

const (
	SubscriptionUpdateResponseSourceMqEventSourceKVTypeKV SubscriptionUpdateResponseSourceMqEventSourceKVType = "kv"
)

func (SubscriptionUpdateResponseSourceMqEventSourceKVType) IsKnown

type SubscriptionUpdateResponseSourceMqEventSourceR2

type SubscriptionUpdateResponseSourceMqEventSourceR2 struct {
	// Type of source
	Type SubscriptionUpdateResponseSourceMqEventSourceR2Type `json:"type"`
	JSON subscriptionUpdateResponseSourceMqEventSourceR2JSON `json:"-"`
}

func (*SubscriptionUpdateResponseSourceMqEventSourceR2) UnmarshalJSON

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

type SubscriptionUpdateResponseSourceMqEventSourceR2Type

type SubscriptionUpdateResponseSourceMqEventSourceR2Type string

Type of source

const (
	SubscriptionUpdateResponseSourceMqEventSourceR2TypeR2 SubscriptionUpdateResponseSourceMqEventSourceR2Type = "r2"
)

func (SubscriptionUpdateResponseSourceMqEventSourceR2Type) IsKnown

type SubscriptionUpdateResponseSourceMqEventSourceSuperSlurper

type SubscriptionUpdateResponseSourceMqEventSourceSuperSlurper struct {
	// Type of source
	Type SubscriptionUpdateResponseSourceMqEventSourceSuperSlurperType `json:"type"`
	JSON subscriptionUpdateResponseSourceMqEventSourceSuperSlurperJSON `json:"-"`
}

func (*SubscriptionUpdateResponseSourceMqEventSourceSuperSlurper) UnmarshalJSON

type SubscriptionUpdateResponseSourceMqEventSourceSuperSlurperType

type SubscriptionUpdateResponseSourceMqEventSourceSuperSlurperType string

Type of source

const (
	SubscriptionUpdateResponseSourceMqEventSourceSuperSlurperTypeSuperSlurper SubscriptionUpdateResponseSourceMqEventSourceSuperSlurperType = "superSlurper"
)

func (SubscriptionUpdateResponseSourceMqEventSourceSuperSlurperType) IsKnown

type SubscriptionUpdateResponseSourceMqEventSourceVectorize

type SubscriptionUpdateResponseSourceMqEventSourceVectorize struct {
	// Type of source
	Type SubscriptionUpdateResponseSourceMqEventSourceVectorizeType `json:"type"`
	JSON subscriptionUpdateResponseSourceMqEventSourceVectorizeJSON `json:"-"`
}

func (*SubscriptionUpdateResponseSourceMqEventSourceVectorize) UnmarshalJSON

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

type SubscriptionUpdateResponseSourceMqEventSourceVectorizeType

type SubscriptionUpdateResponseSourceMqEventSourceVectorizeType string

Type of source

const (
	SubscriptionUpdateResponseSourceMqEventSourceVectorizeTypeVectorize SubscriptionUpdateResponseSourceMqEventSourceVectorizeType = "vectorize"
)

func (SubscriptionUpdateResponseSourceMqEventSourceVectorizeType) IsKnown

type SubscriptionUpdateResponseSourceMqEventSourceWorkersAIModel

type SubscriptionUpdateResponseSourceMqEventSourceWorkersAIModel struct {
	// Name of the Workers AI model
	ModelName string `json:"model_name"`
	// Type of source
	Type SubscriptionUpdateResponseSourceMqEventSourceWorkersAIModelType `json:"type"`
	JSON subscriptionUpdateResponseSourceMqEventSourceWorkersAIModelJSON `json:"-"`
}

func (*SubscriptionUpdateResponseSourceMqEventSourceWorkersAIModel) UnmarshalJSON

type SubscriptionUpdateResponseSourceMqEventSourceWorkersAIModelType

type SubscriptionUpdateResponseSourceMqEventSourceWorkersAIModelType string

Type of source

const (
	SubscriptionUpdateResponseSourceMqEventSourceWorkersAIModelTypeWorkersAIModel SubscriptionUpdateResponseSourceMqEventSourceWorkersAIModelType = "workersAi.model"
)

func (SubscriptionUpdateResponseSourceMqEventSourceWorkersAIModelType) IsKnown

type SubscriptionUpdateResponseSourceMqEventSourceWorkersBuildsWorker

type SubscriptionUpdateResponseSourceMqEventSourceWorkersBuildsWorker struct {
	// Type of source
	Type SubscriptionUpdateResponseSourceMqEventSourceWorkersBuildsWorkerType `json:"type"`
	// Name of the worker
	WorkerName string                                                               `json:"worker_name"`
	JSON       subscriptionUpdateResponseSourceMqEventSourceWorkersBuildsWorkerJSON `json:"-"`
}

func (*SubscriptionUpdateResponseSourceMqEventSourceWorkersBuildsWorker) UnmarshalJSON

type SubscriptionUpdateResponseSourceMqEventSourceWorkersBuildsWorkerType

type SubscriptionUpdateResponseSourceMqEventSourceWorkersBuildsWorkerType string

Type of source

const (
	SubscriptionUpdateResponseSourceMqEventSourceWorkersBuildsWorkerTypeWorkersBuildsWorker SubscriptionUpdateResponseSourceMqEventSourceWorkersBuildsWorkerType = "workersBuilds.worker"
)

func (SubscriptionUpdateResponseSourceMqEventSourceWorkersBuildsWorkerType) IsKnown

type SubscriptionUpdateResponseSourceMqEventSourceWorkflowsWorkflow

type SubscriptionUpdateResponseSourceMqEventSourceWorkflowsWorkflow struct {
	// Type of source
	Type SubscriptionUpdateResponseSourceMqEventSourceWorkflowsWorkflowType `json:"type"`
	// Name of the workflow
	WorkflowName string                                                             `json:"workflow_name"`
	JSON         subscriptionUpdateResponseSourceMqEventSourceWorkflowsWorkflowJSON `json:"-"`
}

func (*SubscriptionUpdateResponseSourceMqEventSourceWorkflowsWorkflow) UnmarshalJSON

type SubscriptionUpdateResponseSourceMqEventSourceWorkflowsWorkflowType

type SubscriptionUpdateResponseSourceMqEventSourceWorkflowsWorkflowType string

Type of source

const (
	SubscriptionUpdateResponseSourceMqEventSourceWorkflowsWorkflowTypeWorkflowsWorkflow SubscriptionUpdateResponseSourceMqEventSourceWorkflowsWorkflowType = "workflows.workflow"
)

func (SubscriptionUpdateResponseSourceMqEventSourceWorkflowsWorkflowType) IsKnown

type SubscriptionUpdateResponseSourceType

type SubscriptionUpdateResponseSourceType string

Type of source

const (
	SubscriptionUpdateResponseSourceTypeImages              SubscriptionUpdateResponseSourceType = "images"
	SubscriptionUpdateResponseSourceTypeKV                  SubscriptionUpdateResponseSourceType = "kv"
	SubscriptionUpdateResponseSourceTypeR2                  SubscriptionUpdateResponseSourceType = "r2"
	SubscriptionUpdateResponseSourceTypeSuperSlurper        SubscriptionUpdateResponseSourceType = "superSlurper"
	SubscriptionUpdateResponseSourceTypeVectorize           SubscriptionUpdateResponseSourceType = "vectorize"
	SubscriptionUpdateResponseSourceTypeWorkersAIModel      SubscriptionUpdateResponseSourceType = "workersAi.model"
	SubscriptionUpdateResponseSourceTypeWorkersBuildsWorker SubscriptionUpdateResponseSourceType = "workersBuilds.worker"
	SubscriptionUpdateResponseSourceTypeWorkflowsWorkflow   SubscriptionUpdateResponseSourceType = "workflows.workflow"
)

func (SubscriptionUpdateResponseSourceType) IsKnown

type Token

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

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

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

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

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNested

type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectString

type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesUnion

type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenPolicyResourcesUnionParam

type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenStatus

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenValue

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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