Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Consumer
- type ConsumerDeleteParams
- type ConsumerDeleteResponse
- type ConsumerDeleteResponseSuccess
- type ConsumerGetParams
- type ConsumerMqHTTPConsumer
- type ConsumerMqHTTPConsumerParam
- type ConsumerMqHTTPConsumerSettings
- type ConsumerMqHTTPConsumerSettingsParam
- type ConsumerMqHTTPConsumerType
- type ConsumerMqWorkerConsumer
- type ConsumerMqWorkerConsumerParam
- type ConsumerMqWorkerConsumerSettings
- type ConsumerMqWorkerConsumerSettingsParam
- type ConsumerMqWorkerConsumerType
- type ConsumerNewParams
- type ConsumerNewParamsBody
- type ConsumerNewParamsBodyMqHTTPConsumer
- type ConsumerNewParamsBodyMqHTTPConsumerSettings
- type ConsumerNewParamsBodyMqHTTPConsumerType
- type ConsumerNewParamsBodyMqWorkerConsumer
- type ConsumerNewParamsBodyMqWorkerConsumerSettings
- type ConsumerNewParamsBodyMqWorkerConsumerType
- type ConsumerNewParamsBodyType
- type ConsumerNewParamsBodyUnion
- type ConsumerNewResponseEnvelope
- type ConsumerNewResponseEnvelopeSuccess
- type ConsumerParam
- type ConsumerService
- func (r *ConsumerService) Delete(ctx context.Context, queueID string, consumerID string, ...) (res *ConsumerDeleteResponse, err error)
- func (r *ConsumerService) Get(ctx context.Context, queueID string, query ConsumerGetParams, ...) (res *pagination.SinglePage[Consumer], err error)
- func (r *ConsumerService) GetAutoPaging(ctx context.Context, queueID string, query ConsumerGetParams, ...) *pagination.SinglePageAutoPager[Consumer]
- func (r *ConsumerService) New(ctx context.Context, queueID string, params ConsumerNewParams, ...) (res *Consumer, err error)
- func (r *ConsumerService) Update(ctx context.Context, queueID string, consumerID string, ...) (res *Consumer, err error)
- type ConsumerType
- type ConsumerUnion
- type ConsumerUnionParam
- type ConsumerUpdateParams
- type ConsumerUpdateParamsBody
- type ConsumerUpdateParamsBodyMqHTTPConsumer
- type ConsumerUpdateParamsBodyMqHTTPConsumerSettings
- type ConsumerUpdateParamsBodyMqHTTPConsumerType
- type ConsumerUpdateParamsBodyMqWorkerConsumer
- type ConsumerUpdateParamsBodyMqWorkerConsumerSettings
- type ConsumerUpdateParamsBodyMqWorkerConsumerType
- type ConsumerUpdateParamsBodyType
- type ConsumerUpdateParamsBodyUnion
- type ConsumerUpdateResponseEnvelope
- type ConsumerUpdateResponseEnvelopeSuccess
- type Error
- type ErrorData
- type ErrorDataSource
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type MessageAckParams
- type MessageAckParamsAck
- type MessageAckParamsRetry
- type MessageAckResponse
- type MessageAckResponseEnvelope
- type MessageAckResponseEnvelopeSuccess
- type MessageBulkPushParams
- type MessageBulkPushParamsMessage
- type MessageBulkPushParamsMessageUnion
- type MessageBulkPushParamsMessagesContentType
- type MessageBulkPushParamsMessagesMqQueueMessageJson
- type MessageBulkPushParamsMessagesMqQueueMessageJsonContentType
- type MessageBulkPushParamsMessagesMqQueueMessageText
- type MessageBulkPushParamsMessagesMqQueueMessageTextContentType
- type MessageBulkPushResponse
- type MessageBulkPushResponseSuccess
- type MessagePullParams
- type MessagePullResponse
- type MessagePullResponseEnvelope
- type MessagePullResponseEnvelopeSuccess
- type MessagePullResponseMessage
- type MessagePushParams
- type MessagePushParamsBody
- type MessagePushParamsBodyContentType
- type MessagePushParamsBodyMqQueueMessageJson
- type MessagePushParamsBodyMqQueueMessageJsonContentType
- type MessagePushParamsBodyMqQueueMessageText
- type MessagePushParamsBodyMqQueueMessageTextContentType
- type MessagePushParamsBodyUnion
- type MessagePushResponse
- type MessagePushResponseSuccess
- type MessageService
- func (r *MessageService) Ack(ctx context.Context, queueID string, params MessageAckParams, ...) (res *MessageAckResponse, err error)
- func (r *MessageService) BulkPush(ctx context.Context, queueID string, params MessageBulkPushParams, ...) (res *MessageBulkPushResponse, err error)
- func (r *MessageService) Pull(ctx context.Context, queueID string, params MessagePullParams, ...) (res *MessagePullResponse, err error)
- func (r *MessageService) Push(ctx context.Context, queueID string, params MessagePushParams, ...) (res *MessagePushResponse, err error)
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type PurgeService
- type PurgeStartParams
- type PurgeStartResponseEnvelope
- type PurgeStartResponseEnvelopeSuccess
- type PurgeStatusParams
- type PurgeStatusResponse
- type PurgeStatusResponseEnvelope
- type PurgeStatusResponseEnvelopeSuccess
- type Queue
- type QueueDeleteParams
- type QueueDeleteResponse
- type QueueDeleteResponseSuccess
- type QueueEditParams
- type QueueEditResponseEnvelope
- type QueueEditResponseEnvelopeSuccess
- type QueueGetParams
- type QueueGetResponseEnvelope
- type QueueGetResponseEnvelopeSuccess
- type QueueListParams
- type QueueNewParams
- type QueueNewResponseEnvelope
- type QueueNewResponseEnvelopeSuccess
- type QueueParam
- type QueueProducer
- type QueueProducerParam
- type QueueProducersMqR2Producer
- type QueueProducersMqR2ProducerParam
- type QueueProducersMqR2ProducerType
- type QueueProducersMqWorkerProducer
- type QueueProducersMqWorkerProducerParam
- type QueueProducersMqWorkerProducerType
- type QueueProducersType
- type QueueProducersUnion
- type QueueProducersUnionParam
- type QueueService
- func (r *QueueService) Delete(ctx context.Context, queueID string, body QueueDeleteParams, ...) (res *QueueDeleteResponse, err error)
- func (r *QueueService) Edit(ctx context.Context, queueID string, params QueueEditParams, ...) (res *Queue, err error)
- func (r *QueueService) Get(ctx context.Context, queueID string, query QueueGetParams, ...) (res *Queue, err error)
- func (r *QueueService) List(ctx context.Context, query QueueListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Queue], err error)
- func (r *QueueService) ListAutoPaging(ctx context.Context, query QueueListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Queue]
- func (r *QueueService) New(ctx context.Context, params QueueNewParams, opts ...option.RequestOption) (res *Queue, err error)
- func (r *QueueService) Update(ctx context.Context, queueID string, params QueueUpdateParams, ...) (res *Queue, err error)
- type QueueSettings
- type QueueSettingsParam
- type QueueUpdateParams
- type QueueUpdateResponseEnvelope
- type QueueUpdateResponseEnvelopeSuccess
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type ResponseInfo
- type ResponseInfoSource
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenPolicyResourcesMap
- type TokenPolicyResourcesMapParam
- type TokenPolicyResourcesUnion
- type TokenPolicyResourcesUnionParam
- type TokenStatus
- type TokenValue
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const RatePlanIDBusiness = shared.RatePlanIDBusiness
This is an alias to an internal value.
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise
This is an alias to an internal value.
const RatePlanIDFree = shared.RatePlanIDFree
This is an alias to an internal value.
const RatePlanIDLite = shared.RatePlanIDLite
This is an alias to an internal value.
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness
This is an alias to an internal value.
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise
This is an alias to an internal value.
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree
This is an alias to an internal value.
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro
This is an alias to an internal value.
const RatePlanIDPro = shared.RatePlanIDPro
This is an alias to an internal value.
const RatePlanIDProPlus = shared.RatePlanIDProPlus
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type CertificateCA ¶
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
This is an alias to an internal type.
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelStatus ¶
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type 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 ¶
type ConsumerDeleteParams ¶
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 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 ¶
func (r ConsumerNewParamsBodyMqHTTPConsumerType) IsKnown() bool
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 ¶
func (r ConsumerNewParamsBodyMqWorkerConsumerType) IsKnown() bool
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 ¶
func (r ConsumerNewResponseEnvelopeSuccess) IsKnown() bool
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, query ConsumerGetParams, opts ...option.RequestOption) (res *pagination.SinglePage[Consumer], err error)
Returns the consumers for a Queue
func (*ConsumerService) GetAutoPaging ¶ added in v4.1.0
func (r *ConsumerService) GetAutoPaging(ctx context.Context, queueID string, query ConsumerGetParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Consumer]
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 ¶
func (r ConsumerUpdateParamsBodyMqHTTPConsumerType) IsKnown() bool
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 ¶
func (r ConsumerUpdateParamsBodyMqWorkerConsumerType) IsKnown() bool
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 ¶
func (r ConsumerUpdateResponseEnvelopeSuccess) IsKnown() bool
type ErrorDataSource ¶ added in v4.2.0
type ErrorDataSource = shared.ErrorDataSource
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 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 ¶
func (r MessageAckResponseEnvelopeSuccess) IsKnown() bool
type MessageBulkPushParams ¶ added in v4.4.0
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 ¶ added in v4.4.0
func (r MessageBulkPushParams) MarshalJSON() (data []byte, err error)
type MessageBulkPushParamsMessage ¶ added in v4.4.0
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 ¶ added in v4.4.0
func (r MessageBulkPushParamsMessage) MarshalJSON() (data []byte, err error)
type MessageBulkPushParamsMessageUnion ¶ added in v4.4.0
type MessageBulkPushParamsMessageUnion interface {
// contains filtered or unexported methods
}
Satisfied by queues.MessageBulkPushParamsMessagesMqQueueMessageText, queues.MessageBulkPushParamsMessagesMqQueueMessageJson, MessageBulkPushParamsMessage.
type MessageBulkPushParamsMessagesContentType ¶ added in v4.4.0
type MessageBulkPushParamsMessagesContentType string
const ( MessageBulkPushParamsMessagesContentTypeText MessageBulkPushParamsMessagesContentType = "text" MessageBulkPushParamsMessagesContentTypeJson MessageBulkPushParamsMessagesContentType = "json" )
func (MessageBulkPushParamsMessagesContentType) IsKnown ¶ added in v4.4.0
func (r MessageBulkPushParamsMessagesContentType) IsKnown() bool
type MessageBulkPushParamsMessagesMqQueueMessageJson ¶ added in v4.4.0
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 ¶ added in v4.4.0
func (r MessageBulkPushParamsMessagesMqQueueMessageJson) MarshalJSON() (data []byte, err error)
type MessageBulkPushParamsMessagesMqQueueMessageJsonContentType ¶ added in v4.4.0
type MessageBulkPushParamsMessagesMqQueueMessageJsonContentType string
const (
MessageBulkPushParamsMessagesMqQueueMessageJsonContentTypeJson MessageBulkPushParamsMessagesMqQueueMessageJsonContentType = "json"
)
func (MessageBulkPushParamsMessagesMqQueueMessageJsonContentType) IsKnown ¶ added in v4.4.0
func (r MessageBulkPushParamsMessagesMqQueueMessageJsonContentType) IsKnown() bool
type MessageBulkPushParamsMessagesMqQueueMessageText ¶ added in v4.4.0
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 ¶ added in v4.4.0
func (r MessageBulkPushParamsMessagesMqQueueMessageText) MarshalJSON() (data []byte, err error)
type MessageBulkPushParamsMessagesMqQueueMessageTextContentType ¶ added in v4.4.0
type MessageBulkPushParamsMessagesMqQueueMessageTextContentType string
const (
MessageBulkPushParamsMessagesMqQueueMessageTextContentTypeText MessageBulkPushParamsMessagesMqQueueMessageTextContentType = "text"
)
func (MessageBulkPushParamsMessagesMqQueueMessageTextContentType) IsKnown ¶ added in v4.4.0
func (r MessageBulkPushParamsMessagesMqQueueMessageTextContentType) IsKnown() bool
type MessageBulkPushResponse ¶ added in v4.4.0
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 ¶ added in v4.4.0
func (r *MessageBulkPushResponse) UnmarshalJSON(data []byte) (err error)
type MessageBulkPushResponseSuccess ¶ added in v4.4.0
type MessageBulkPushResponseSuccess bool
Indicates if the API call was successful or not.
const (
MessageBulkPushResponseSuccessTrue MessageBulkPushResponseSuccess = true
)
func (MessageBulkPushResponseSuccess) IsKnown ¶ added in v4.4.0
func (r MessageBulkPushResponseSuccess) IsKnown() bool
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 ¶
func (r MessagePullResponseEnvelopeSuccess) IsKnown() bool
type MessagePullResponseMessage ¶ added in v4.5.0
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 ¶ added in v4.5.0
func (r *MessagePullResponseMessage) UnmarshalJSON(data []byte) (err error)
type MessagePushParams ¶ added in v4.4.0
type MessagePushParams struct {
// A Resource identifier.
AccountID param.Field[string] `path:"account_id,required"`
Body MessagePushParamsBodyUnion `json:"body"`
}
func (MessagePushParams) MarshalJSON ¶ added in v4.4.0
func (r MessagePushParams) MarshalJSON() (data []byte, err error)
type MessagePushParamsBody ¶ added in v4.4.0
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 ¶ added in v4.4.0
func (r MessagePushParamsBody) MarshalJSON() (data []byte, err error)
type MessagePushParamsBodyContentType ¶ added in v4.4.0
type MessagePushParamsBodyContentType string
const ( MessagePushParamsBodyContentTypeText MessagePushParamsBodyContentType = "text" MessagePushParamsBodyContentTypeJson MessagePushParamsBodyContentType = "json" )
func (MessagePushParamsBodyContentType) IsKnown ¶ added in v4.4.0
func (r MessagePushParamsBodyContentType) IsKnown() bool
type MessagePushParamsBodyMqQueueMessageJson ¶ added in v4.4.0
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 ¶ added in v4.4.0
func (r MessagePushParamsBodyMqQueueMessageJson) MarshalJSON() (data []byte, err error)
type MessagePushParamsBodyMqQueueMessageJsonContentType ¶ added in v4.4.0
type MessagePushParamsBodyMqQueueMessageJsonContentType string
const (
MessagePushParamsBodyMqQueueMessageJsonContentTypeJson MessagePushParamsBodyMqQueueMessageJsonContentType = "json"
)
func (MessagePushParamsBodyMqQueueMessageJsonContentType) IsKnown ¶ added in v4.4.0
func (r MessagePushParamsBodyMqQueueMessageJsonContentType) IsKnown() bool
type MessagePushParamsBodyMqQueueMessageText ¶ added in v4.4.0
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 ¶ added in v4.4.0
func (r MessagePushParamsBodyMqQueueMessageText) MarshalJSON() (data []byte, err error)
type MessagePushParamsBodyMqQueueMessageTextContentType ¶ added in v4.4.0
type MessagePushParamsBodyMqQueueMessageTextContentType string
const (
MessagePushParamsBodyMqQueueMessageTextContentTypeText MessagePushParamsBodyMqQueueMessageTextContentType = "text"
)
func (MessagePushParamsBodyMqQueueMessageTextContentType) IsKnown ¶ added in v4.4.0
func (r MessagePushParamsBodyMqQueueMessageTextContentType) IsKnown() bool
type MessagePushParamsBodyUnion ¶ added in v4.4.0
type MessagePushParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by queues.MessagePushParamsBodyMqQueueMessageText, queues.MessagePushParamsBodyMqQueueMessageJson, MessagePushParamsBody.
type MessagePushResponse ¶ added in v4.4.0
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 ¶ added in v4.4.0
func (r *MessagePushResponse) UnmarshalJSON(data []byte) (err error)
type MessagePushResponseSuccess ¶ added in v4.4.0
type MessagePushResponseSuccess bool
Indicates if the API call was successful or not.
const (
MessagePushResponseSuccessTrue MessagePushResponseSuccess = true
)
func (MessagePushResponseSuccess) IsKnown ¶ added in v4.4.0
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 ¶ added in v4.4.0
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 ¶ added in v4.4.0
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 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 ¶ added in v4.3.0
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 ¶ added in v4.3.0
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 ¶ added in v4.3.0
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 ¶ added in v4.3.0
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 ¶ added in v4.3.0
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 ¶ added in v4.3.0
func (r PurgeStartParams) MarshalJSON() (data []byte, err error)
type PurgeStartResponseEnvelope ¶ added in v4.3.0
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 ¶ added in v4.3.0
func (r *PurgeStartResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PurgeStartResponseEnvelopeSuccess ¶ added in v4.3.0
type PurgeStartResponseEnvelopeSuccess bool
Indicates if the API call was successful or not.
const (
PurgeStartResponseEnvelopeSuccessTrue PurgeStartResponseEnvelopeSuccess = true
)
func (PurgeStartResponseEnvelopeSuccess) IsKnown ¶ added in v4.3.0
func (r PurgeStartResponseEnvelopeSuccess) IsKnown() bool
type PurgeStatusParams ¶ added in v4.3.0
type PurgeStatusResponse ¶ added in v4.3.0
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 ¶ added in v4.3.0
func (r *PurgeStatusResponse) UnmarshalJSON(data []byte) (err error)
type PurgeStatusResponseEnvelope ¶ added in v4.3.0
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 ¶ added in v4.3.0
func (r *PurgeStatusResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PurgeStatusResponseEnvelopeSuccess ¶ added in v4.3.0
type PurgeStatusResponseEnvelopeSuccess bool
Indicates if the API call was successful or not.
const (
PurgeStatusResponseEnvelopeSuccessTrue PurgeStatusResponseEnvelopeSuccess = true
)
func (PurgeStatusResponseEnvelopeSuccess) IsKnown ¶ added in v4.3.0
func (r PurgeStatusResponseEnvelopeSuccess) IsKnown() bool
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 ¶
type QueueDeleteParams ¶
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 ¶ added in v4.3.0
type QueueEditParams struct {
// A Resource identifier.
AccountID param.Field[string] `path:"account_id,required"`
Queue QueueParam `json:"queue"`
}
func (QueueEditParams) MarshalJSON ¶ added in v4.3.0
func (r QueueEditParams) MarshalJSON() (data []byte, err error)
type QueueEditResponseEnvelope ¶ added in v4.3.0
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 ¶ added in v4.3.0
func (r *QueueEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type QueueEditResponseEnvelopeSuccess ¶ added in v4.3.0
type QueueEditResponseEnvelopeSuccess bool
Indicates if the API call was successful or not.
const (
QueueEditResponseEnvelopeSuccessTrue QueueEditResponseEnvelopeSuccess = true
)
func (QueueEditResponseEnvelopeSuccess) IsKnown ¶ added in v4.3.0
func (r QueueEditResponseEnvelopeSuccess) IsKnown() bool
type QueueGetParams ¶
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 ¶
func (r QueueGetResponseEnvelopeSuccess) IsKnown() bool
type QueueListParams ¶
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 ¶
func (r QueueNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r QueueProducersMqR2ProducerType) IsKnown() bool
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 ¶
func (r QueueProducersMqWorkerProducerType) IsKnown() bool
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
Consumers *ConsumerService
Messages *MessageService
Purge *PurgeService
}
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 ¶ added in v4.3.0
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 ¶
func (r *QueueService) ListAutoPaging(ctx context.Context, query QueueListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Queue]
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 ¶
func (r QueueUpdateResponseEnvelopeSuccess) IsKnown() bool
type RatePlanID ¶ added in v4.1.0
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 ResponseInfoSource ¶ added in v4.3.0
type ResponseInfoSource = shared.ResponseInfoSource
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 SubscriptionFrequency ¶
type SubscriptionFrequency = shared.SubscriptionFrequency
How often the subscription is renewed automatically.
This is an alias to an internal type.
type SubscriptionParam ¶
type SubscriptionParam = shared.SubscriptionParam
This is an alias to an internal type.
type SubscriptionState ¶
type SubscriptionState = shared.SubscriptionState
The state that the subscription is in.
This is an alias to an internal type.
type TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyResourcesMap ¶ added in v4.6.0
type TokenPolicyResourcesMap = shared.TokenPolicyResourcesMap
A nested permission grant for further scoping.
This is an alias to an internal type.
type TokenPolicyResourcesMapParam ¶ added in v4.6.0
type TokenPolicyResourcesMapParam = shared.TokenPolicyResourcesMapParam
A nested permission grant for further scoping.
This is an alias to an internal type.
type TokenPolicyResourcesUnion ¶ added in v4.6.0
type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion
A simple wildcard permission, e.g., "\*".
This is an alias to an internal type.
type TokenPolicyResourcesUnionParam ¶ added in v4.6.0
type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam
A simple wildcard permission, e.g., "\*".
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.