queues

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 12 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 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.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN added in v2.1.0

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam added in v2.1.0

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

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type Consumer

type Consumer struct {
	CreatedOn   interface{}      `json:"created_on"`
	Environment interface{}      `json:"environment"`
	QueueName   interface{}      `json:"queue_name"`
	Service     interface{}      `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"`
	Body      interface{}         `json:"body,required"`
}

func (ConsumerDeleteParams) MarshalJSON

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

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.ConsumerDeleteResponseUnknown, queues.ConsumerDeleteResponseArray or shared.UnionString.

type ConsumerGetParams

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

type ConsumerGetResponseEnvelope

type ConsumerGetResponseEnvelope struct {
	CreatedOn interface{}           `json:"created_on,required"`
	Errors    []shared.ResponseInfo `json:"errors,required"`
	Messages  []shared.ResponseInfo `json:"messages,required"`
	QueueName interface{}           `json:"queue_name,required"`
	Result    []Consumer            `json:"result,required,nullable"`
	Settings  interface{}           `json:"settings,required"`
	// 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       interface{}                 `json:"created_on"`
	DeadLetterQueue string                      `json:"dead_letter_queue"`
	Environment     interface{}                 `json:"environment"`
	QueueName       interface{}                 `json:"queue_name"`
	ScriptName      interface{}                 `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 {
	CreatedOn       interface{}           `json:"created_on,required"`
	DeadLetterQueue interface{}           `json:"dead_letter_queue,required"`
	Errors          []shared.ResponseInfo `json:"errors,required"`
	Messages        []shared.ResponseInfo `json:"messages,required"`
	QueueName       interface{}           `json:"queue_name,required"`
	Result          ConsumerNewResponse   `json:"result,required,nullable"`
	ScriptName      interface{}           `json:"script_name,required"`
	Settings        interface{}           `json:"settings,required"`
	// 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"`
	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, params 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"`
	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       interface{}                    `json:"created_on"`
	DeadLetterQueue string                         `json:"dead_letter_queue"`
	Environment     interface{}                    `json:"environment"`
	QueueName       interface{}                    `json:"queue_name"`
	ScriptName      interface{}                    `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 {
	CreatedOn       interface{}            `json:"created_on,required"`
	DeadLetterQueue interface{}            `json:"dead_letter_queue,required"`
	Errors          []shared.ResponseInfo  `json:"errors,required"`
	Messages        []shared.ResponseInfo  `json:"messages,required"`
	QueueName       interface{}            `json:"queue_name,required"`
	Result          ConsumerUpdateResponse `json:"result,required,nullable"`
	ScriptName      interface{}            `json:"script_name,required"`
	Settings        interface{}            `json:"settings,required"`
	// 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"`
	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 Member added in v2.1.0

type Member = shared.Member

This is an alias to an internal type.

type MemberParam added in v2.1.0

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRole added in v2.1.0

type MemberRole = shared.MemberRole

This is an alias to an internal type.

type MemberRoleParam added in v2.1.0

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissions added in v2.1.0

type MemberRolesPermissions = shared.MemberRolesPermissions

This is an alias to an internal type.

type MemberRolesPermissionsParam added in v2.1.0

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberUser added in v2.1.0

type MemberUser = shared.MemberUser

This is an alias to an internal type.

type MemberUserParam added in v2.1.0

type MemberUserParam = shared.MemberUserParam

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.
	VisibilityTimeoutMs param.Field[float64] `json:"visibility_timeout_ms"`
}

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           interface{} `json:"consumers"`
	ConsumersTotalCount interface{} `json:"consumers_total_count"`
	CreatedOn           interface{} `json:"created_on"`
	ModifiedOn          interface{} `json:"modified_on"`
	Producers           interface{} `json:"producers"`
	ProducersTotalCount interface{} `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  interface{}      `json:"created_on"`
	ModifiedOn interface{}      `json:"modified_on"`
	QueueID    interface{}      `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"`
	Body      interface{}         `json:"body,required"`
}

func (QueueDeleteParams) MarshalJSON

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

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.QueueDeleteResponseUnknown, queues.QueueDeleteResponseArray or shared.UnionString.

type QueueGetParams

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

type QueueGetResponseEnvelope

type QueueGetResponseEnvelope struct {
	CreatedOn  interface{}           `json:"created_on,required"`
	Errors     []shared.ResponseInfo `json:"errors,required"`
	Messages   []shared.ResponseInfo `json:"messages,required"`
	ModifiedOn interface{}           `json:"modified_on,required"`
	QueueID    interface{}           `json:"queue_id,required"`
	QueueName  interface{}           `json:"queue_name,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"`
	Body      interface{}         `json:"body,required"`
}

func (QueueNewParams) MarshalJSON

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

type QueueNewResponseEnvelope

type QueueNewResponseEnvelope struct {
	CreatedOn  interface{}           `json:"created_on,required"`
	Errors     []shared.ResponseInfo `json:"errors,required"`
	Messages   []shared.ResponseInfo `json:"messages,required"`
	ModifiedOn interface{}           `json:"modified_on,required"`
	QueueID    interface{}           `json:"queue_id,required"`
	QueueName  interface{}           `json:"queue_name,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 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, params 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 {
	CreatedOn  interface{}           `json:"created_on,required"`
	Errors     []shared.ResponseInfo `json:"errors,required"`
	Messages   []shared.ResponseInfo `json:"messages,required"`
	ModifiedOn interface{}           `json:"modified_on,required"`
	QueueID    interface{}           `json:"queue_id,required"`
	QueueName  interface{}           `json:"queue_name,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  interface{}      `json:"created_on"`
	ModifiedOn interface{}      `json:"modified_on"`
	QueueID    interface{}      `json:"queue_id"`
	QueueName  string           `json:"queue_name"`
	JSON       queueUpdatedJSON `json:"-"`
}

func (*QueueUpdated) UnmarshalJSON

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

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.

Jump to

Keyboard shortcuts

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