queues

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 13 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 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 CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

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 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.

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 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 {
	CreatedOn   string           `json:"created_on"`
	Environment string           `json:"environment"`
	QueueName   string           `json:"queue_name"`
	Service     string           `json:"service"`
	Settings    ConsumerSettings `json:"settings"`
	JSON        consumerJSON     `json:"-"`
}

func (*Consumer) UnmarshalJSON

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

type ConsumerDeleteParams

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

type ConsumerDeleteResponseArray

type ConsumerDeleteResponseArray []interface{}

func (ConsumerDeleteResponseArray) ImplementsQueuesConsumerDeleteResponseUnion

func (r ConsumerDeleteResponseArray) ImplementsQueuesConsumerDeleteResponseUnion()

type ConsumerDeleteResponseEnvelope

type ConsumerDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo       `json:"errors,required"`
	Messages []shared.ResponseInfo       `json:"messages,required"`
	Result   ConsumerDeleteResponseUnion `json:"result,required,nullable"`
	// Whether the API call was successful.
	Success    ConsumerDeleteResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo ConsumerDeleteResponseEnvelopeResultInfo `json:"result_info"`
	JSON       consumerDeleteResponseEnvelopeJSON       `json:"-"`
}

func (*ConsumerDeleteResponseEnvelope) UnmarshalJSON

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

type ConsumerDeleteResponseEnvelopeResultInfo

type ConsumerDeleteResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service.
	Count float64 `json:"count"`
	// Current page within paginated list of results.
	Page float64 `json:"page"`
	// Number of results per page of results.
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters.
	TotalCount float64                                      `json:"total_count"`
	JSON       consumerDeleteResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*ConsumerDeleteResponseEnvelopeResultInfo) UnmarshalJSON

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

type ConsumerDeleteResponseEnvelopeSuccess

type ConsumerDeleteResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	ConsumerDeleteResponseEnvelopeSuccessTrue ConsumerDeleteResponseEnvelopeSuccess = true
)

func (ConsumerDeleteResponseEnvelopeSuccess) IsKnown

type ConsumerDeleteResponseUnion

type ConsumerDeleteResponseUnion interface {
	ImplementsQueuesConsumerDeleteResponseUnion()
}

Union satisfied by queues.ConsumerDeleteResponseArray or shared.UnionString.

type ConsumerGetParams

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

type ConsumerGetResponseEnvelope

type ConsumerGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   []Consumer            `json:"result,required,nullable"`
	// Whether the API call was successful.
	Success    ConsumerGetResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo ConsumerGetResponseEnvelopeResultInfo `json:"result_info"`
	JSON       consumerGetResponseEnvelopeJSON       `json:"-"`
}

func (*ConsumerGetResponseEnvelope) UnmarshalJSON

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

type ConsumerGetResponseEnvelopeResultInfo

type ConsumerGetResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service.
	Count float64 `json:"count"`
	// Current page within paginated list of results.
	Page float64 `json:"page"`
	// Number of results per page of results.
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters.
	TotalCount float64                                   `json:"total_count"`
	TotalPages float64                                   `json:"total_pages"`
	JSON       consumerGetResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*ConsumerGetResponseEnvelopeResultInfo) UnmarshalJSON

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

type ConsumerGetResponseEnvelopeSuccess

type ConsumerGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	ConsumerGetResponseEnvelopeSuccessTrue ConsumerGetResponseEnvelopeSuccess = true
)

func (ConsumerGetResponseEnvelopeSuccess) IsKnown

type ConsumerNewParams

type ConsumerNewParams struct {
	// Identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (ConsumerNewParams) MarshalJSON

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

type ConsumerNewResponse

type ConsumerNewResponse struct {
	CreatedOn string `json:"created_on"`
	// The name of the dead letter queue.
	DeadLetterQueue string                      `json:"dead_letter_queue"`
	Environment     string                      `json:"environment"`
	QueueName       string                      `json:"queue_name"`
	ScriptName      string                      `json:"script_name"`
	Settings        ConsumerNewResponseSettings `json:"settings"`
	JSON            consumerNewResponseJSON     `json:"-"`
}

func (*ConsumerNewResponse) UnmarshalJSON

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

type ConsumerNewResponseEnvelope

type ConsumerNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   ConsumerNewResponse   `json:"result,required,nullable"`
	// Whether the API call was successful.
	Success    ConsumerNewResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo ConsumerNewResponseEnvelopeResultInfo `json:"result_info"`
	JSON       consumerNewResponseEnvelopeJSON       `json:"-"`
}

func (*ConsumerNewResponseEnvelope) UnmarshalJSON

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

type ConsumerNewResponseEnvelopeResultInfo

type ConsumerNewResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service.
	Count float64 `json:"count"`
	// Current page within paginated list of results.
	Page float64 `json:"page"`
	// Number of results per page of results.
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters.
	TotalCount float64                                   `json:"total_count"`
	JSON       consumerNewResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*ConsumerNewResponseEnvelopeResultInfo) UnmarshalJSON

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

type ConsumerNewResponseEnvelopeSuccess

type ConsumerNewResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	ConsumerNewResponseEnvelopeSuccessTrue ConsumerNewResponseEnvelopeSuccess = true
)

func (ConsumerNewResponseEnvelopeSuccess) IsKnown

type ConsumerNewResponseSettings

type ConsumerNewResponseSettings 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"`
	MaxWaitTimeMs float64                         `json:"max_wait_time_ms"`
	JSON          consumerNewResponseSettingsJSON `json:"-"`
}

func (*ConsumerNewResponseSettings) UnmarshalJSON

func (r *ConsumerNewResponseSettings) UnmarshalJSON(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 *ConsumerDeleteResponseUnion, 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 *[]Consumer, err error)

Returns the consumers for a queue.

func (*ConsumerService) New

func (r *ConsumerService) New(ctx context.Context, queueID string, params ConsumerNewParams, opts ...option.RequestOption) (res *ConsumerNewResponse, 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 *ConsumerUpdateResponse, err error)

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

type ConsumerSettings

type ConsumerSettings 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"`
	MaxWaitTimeMs float64              `json:"max_wait_time_ms"`
	JSON          consumerSettingsJSON `json:"-"`
}

func (*ConsumerSettings) UnmarshalJSON

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

type ConsumerUpdateParams

type ConsumerUpdateParams struct {
	// Identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (ConsumerUpdateParams) MarshalJSON

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

type ConsumerUpdateResponse

type ConsumerUpdateResponse struct {
	CreatedOn       string                         `json:"created_on"`
	DeadLetterQueue string                         `json:"dead_letter_queue"`
	Environment     string                         `json:"environment"`
	QueueName       string                         `json:"queue_name"`
	ScriptName      string                         `json:"script_name"`
	Settings        ConsumerUpdateResponseSettings `json:"settings"`
	JSON            consumerUpdateResponseJSON     `json:"-"`
}

func (*ConsumerUpdateResponse) UnmarshalJSON

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

type ConsumerUpdateResponseEnvelope

type ConsumerUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo  `json:"errors,required"`
	Messages []shared.ResponseInfo  `json:"messages,required"`
	Result   ConsumerUpdateResponse `json:"result,required,nullable"`
	// Whether the API call was successful.
	Success    ConsumerUpdateResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo ConsumerUpdateResponseEnvelopeResultInfo `json:"result_info"`
	JSON       consumerUpdateResponseEnvelopeJSON       `json:"-"`
}

func (*ConsumerUpdateResponseEnvelope) UnmarshalJSON

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

type ConsumerUpdateResponseEnvelopeResultInfo

type ConsumerUpdateResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service.
	Count float64 `json:"count"`
	// Current page within paginated list of results.
	Page float64 `json:"page"`
	// Number of results per page of results.
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters.
	TotalCount float64                                      `json:"total_count"`
	JSON       consumerUpdateResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*ConsumerUpdateResponseEnvelopeResultInfo) UnmarshalJSON

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

type ConsumerUpdateResponseEnvelopeSuccess

type ConsumerUpdateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	ConsumerUpdateResponseEnvelopeSuccessTrue ConsumerUpdateResponseEnvelopeSuccess = true
)

func (ConsumerUpdateResponseEnvelopeSuccess) IsKnown

type ConsumerUpdateResponseSettings

type ConsumerUpdateResponseSettings struct {
	BatchSize float64 `json:"batch_size"`
	// The maximum number of retries
	MaxRetries    float64                            `json:"max_retries"`
	MaxWaitTimeMs float64                            `json:"max_wait_time_ms"`
	JSON          consumerUpdateResponseSettingsJSON `json:"-"`
}

func (*ConsumerUpdateResponseSettings) UnmarshalJSON

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

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type MemberParam

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRoleParam

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissionsParam

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUserParam

type MemberUserParam = shared.MemberUserParam

Details of the user associated to the membership.

This is an alias to an internal type.

type MessageAckParams

type MessageAckParams struct {
	// 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 {
	// Lease ID for a message to acknowledge.
	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"`
	// Lease ID for a message to retry.
	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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   MessageAckResponse    `json:"result,required,nullable"`
	// Whether the API call was successful.
	Success    MessageAckResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo MessageAckResponseEnvelopeResultInfo `json:"result_info"`
	JSON       messageAckResponseEnvelopeJSON       `json:"-"`
}

func (*MessageAckResponseEnvelope) UnmarshalJSON

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

type MessageAckResponseEnvelopeResultInfo

type MessageAckResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service.
	Count float64 `json:"count"`
	// Current page within paginated list of results.
	Page float64 `json:"page"`
	// Number of results per page of results.
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters.
	TotalCount float64                                  `json:"total_count"`
	JSON       messageAckResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*MessageAckResponseEnvelopeResultInfo) UnmarshalJSON

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

type MessageAckResponseEnvelopeSuccess

type MessageAckResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	MessageAckResponseEnvelopeSuccessTrue MessageAckResponseEnvelopeSuccess = true
)

func (MessageAckResponseEnvelopeSuccess) IsKnown

type MessagePullParams

type MessagePullParams struct {
	// 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.
	VisibilityTimeout param.Field[float64] `json:"visibility_timeout"`
}

func (MessagePullParams) MarshalJSON

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

type MessagePullResponse

type MessagePullResponse struct {
	ID          string                  `json:"id"`
	Attempts    float64                 `json:"attempts"`
	Body        string                  `json:"body"`
	LeaseID     string                  `json:"lease_id"`
	Metadata    interface{}             `json:"metadata"`
	TimestampMs float64                 `json:"timestamp_ms"`
	JSON        messagePullResponseJSON `json:"-"`
}

func (*MessagePullResponse) UnmarshalJSON

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

type MessagePullResponseEnvelope

type MessagePullResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   []MessagePullResponse `json:"result,required,nullable"`
	// Whether the API call was successful.
	Success    MessagePullResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo MessagePullResponseEnvelopeResultInfo `json:"result_info"`
	JSON       messagePullResponseEnvelopeJSON       `json:"-"`
}

func (*MessagePullResponseEnvelope) UnmarshalJSON

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

type MessagePullResponseEnvelopeResultInfo

type MessagePullResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service.
	Count float64 `json:"count"`
	// Current page within paginated list of results.
	Page float64 `json:"page"`
	// Number of results per page of results.
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters.
	TotalCount float64                                   `json:"total_count"`
	JSON       messagePullResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*MessagePullResponseEnvelopeResultInfo) UnmarshalJSON

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

type MessagePullResponseEnvelopeSuccess

type MessagePullResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	MessagePullResponseEnvelopeSuccessTrue MessagePullResponseEnvelopeSuccess = true
)

func (MessagePullResponseEnvelopeSuccess) IsKnown

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) 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.

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 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"`
	JSON                queueJSON       `json:"-"`
}

func (*Queue) UnmarshalJSON

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

type QueueCreated

type QueueCreated struct {
	CreatedOn  string           `json:"created_on"`
	ModifiedOn string           `json:"modified_on"`
	QueueID    string           `json:"queue_id"`
	QueueName  string           `json:"queue_name"`
	JSON       queueCreatedJSON `json:"-"`
}

func (*QueueCreated) UnmarshalJSON

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

type QueueDeleteParams

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

type QueueDeleteResponseArray

type QueueDeleteResponseArray []interface{}

func (QueueDeleteResponseArray) ImplementsQueuesQueueDeleteResponseUnion

func (r QueueDeleteResponseArray) ImplementsQueuesQueueDeleteResponseUnion()

type QueueDeleteResponseEnvelope

type QueueDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo    `json:"errors,required"`
	Messages []shared.ResponseInfo    `json:"messages,required"`
	Result   QueueDeleteResponseUnion `json:"result,required,nullable"`
	// Whether the API call was successful.
	Success    QueueDeleteResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo QueueDeleteResponseEnvelopeResultInfo `json:"result_info"`
	JSON       queueDeleteResponseEnvelopeJSON       `json:"-"`
}

func (*QueueDeleteResponseEnvelope) UnmarshalJSON

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

type QueueDeleteResponseEnvelopeResultInfo

type QueueDeleteResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service.
	Count float64 `json:"count"`
	// Current page within paginated list of results.
	Page float64 `json:"page"`
	// Number of results per page of results.
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters.
	TotalCount float64                                   `json:"total_count"`
	JSON       queueDeleteResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*QueueDeleteResponseEnvelopeResultInfo) UnmarshalJSON

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

type QueueDeleteResponseEnvelopeSuccess

type QueueDeleteResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	QueueDeleteResponseEnvelopeSuccessTrue QueueDeleteResponseEnvelopeSuccess = true
)

func (QueueDeleteResponseEnvelopeSuccess) IsKnown

type QueueDeleteResponseUnion

type QueueDeleteResponseUnion interface {
	ImplementsQueuesQueueDeleteResponseUnion()
}

Union satisfied by queues.QueueDeleteResponseArray or shared.UnionString.

type QueueGetParams

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

type QueueGetResponseEnvelope

type QueueGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Queue                 `json:"result,required,nullable"`
	// Whether the API call was successful.
	Success    QueueGetResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo QueueGetResponseEnvelopeResultInfo `json:"result_info"`
	JSON       queueGetResponseEnvelopeJSON       `json:"-"`
}

func (*QueueGetResponseEnvelope) UnmarshalJSON

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

type QueueGetResponseEnvelopeResultInfo

type QueueGetResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service.
	Count float64 `json:"count"`
	// Current page within paginated list of results.
	Page float64 `json:"page"`
	// Number of results per page of results.
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters.
	TotalCount float64                                `json:"total_count"`
	JSON       queueGetResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*QueueGetResponseEnvelopeResultInfo) UnmarshalJSON

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

type QueueGetResponseEnvelopeSuccess

type QueueGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	QueueGetResponseEnvelopeSuccessTrue QueueGetResponseEnvelopeSuccess = true
)

func (QueueGetResponseEnvelopeSuccess) IsKnown

type QueueListParams

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

type QueueNewParams

type QueueNewParams struct {
	// 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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   QueueCreated          `json:"result,required,nullable"`
	// Whether the API call was successful.
	Success    QueueNewResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo QueueNewResponseEnvelopeResultInfo `json:"result_info"`
	JSON       queueNewResponseEnvelopeJSON       `json:"-"`
}

func (*QueueNewResponseEnvelope) UnmarshalJSON

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

type QueueNewResponseEnvelopeResultInfo

type QueueNewResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service.
	Count float64 `json:"count"`
	// Current page within paginated list of results.
	Page float64 `json:"page"`
	// Number of results per page of results.
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters.
	TotalCount float64                                `json:"total_count"`
	JSON       queueNewResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*QueueNewResponseEnvelopeResultInfo) UnmarshalJSON

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

type QueueNewResponseEnvelopeSuccess

type QueueNewResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	QueueNewResponseEnvelopeSuccessTrue QueueNewResponseEnvelopeSuccess = true
)

func (QueueNewResponseEnvelopeSuccess) IsKnown

type QueueProducer

type QueueProducer struct {
	Environment string            `json:"environment"`
	Service     string            `json:"service"`
	JSON        queueProducerJSON `json:"-"`
}

func (*QueueProducer) UnmarshalJSON

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

type QueueService

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

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 *QueueDeleteResponseUnion, err error)

Deletes a queue.

func (*QueueService) Get

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

Get information 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 *QueueCreated, err error)

Creates a new queue.

func (*QueueService) Update

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

Updates a queue.

type QueueUpdateParams

type QueueUpdateParams struct {
	// Identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (QueueUpdateParams) MarshalJSON

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

type QueueUpdateResponseEnvelope

type QueueUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   QueueUpdated          `json:"result,required,nullable"`
	// Whether the API call was successful.
	Success    QueueUpdateResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo QueueUpdateResponseEnvelopeResultInfo `json:"result_info"`
	JSON       queueUpdateResponseEnvelopeJSON       `json:"-"`
}

func (*QueueUpdateResponseEnvelope) UnmarshalJSON

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

type QueueUpdateResponseEnvelopeResultInfo

type QueueUpdateResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service.
	Count float64 `json:"count"`
	// Current page within paginated list of results.
	Page float64 `json:"page"`
	// Number of results per page of results.
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters.
	TotalCount float64                                   `json:"total_count"`
	JSON       queueUpdateResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*QueueUpdateResponseEnvelopeResultInfo) UnmarshalJSON

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

type QueueUpdateResponseEnvelopeSuccess

type QueueUpdateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	QueueUpdateResponseEnvelopeSuccessTrue QueueUpdateResponseEnvelopeSuccess = true
)

func (QueueUpdateResponseEnvelopeSuccess) IsKnown

type QueueUpdated

type QueueUpdated struct {
	CreatedOn  string           `json:"created_on"`
	ModifiedOn string           `json:"modified_on"`
	QueueID    string           `json:"queue_id"`
	QueueName  string           `json:"queue_name"`
	JSON       queueUpdatedJSON `json:"-"`
}

func (*QueueUpdated) UnmarshalJSON

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

type RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

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 Role

type Role = shared.Role

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 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.

Jump to

Keyboard shortcuts

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