Documentation
¶
Index ¶
- type ConsumerDeleteParams
- type ConsumerDeleteResponse
- type ConsumerDeleteResponseArray
- type ConsumerDeleteResponseEnvelope
- type ConsumerDeleteResponseEnvelopeErrors
- type ConsumerDeleteResponseEnvelopeMessages
- type ConsumerDeleteResponseEnvelopeResultInfo
- type ConsumerDeleteResponseEnvelopeSuccess
- type ConsumerGetParams
- type ConsumerGetResponse
- type ConsumerGetResponseEnvelope
- type ConsumerGetResponseEnvelopeErrors
- type ConsumerGetResponseEnvelopeMessages
- type ConsumerGetResponseEnvelopeResultInfo
- type ConsumerGetResponseEnvelopeSuccess
- type ConsumerGetResponseSettings
- type ConsumerNewParams
- type ConsumerNewResponse
- type ConsumerNewResponseEnvelope
- type ConsumerNewResponseEnvelopeErrors
- type ConsumerNewResponseEnvelopeMessages
- type ConsumerNewResponseEnvelopeResultInfo
- type ConsumerNewResponseEnvelopeSuccess
- type ConsumerNewResponseSettings
- 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 *[]ConsumerGetResponse, err error)
- func (r *ConsumerService) New(ctx context.Context, queueID string, params ConsumerNewParams, ...) (res *ConsumerNewResponse, err error)
- func (r *ConsumerService) Update(ctx context.Context, queueID string, consumerID string, ...) (res *ConsumerUpdateResponse, err error)
- type ConsumerUpdateParams
- type ConsumerUpdateResponse
- type ConsumerUpdateResponseEnvelope
- type ConsumerUpdateResponseEnvelopeErrors
- type ConsumerUpdateResponseEnvelopeMessages
- type ConsumerUpdateResponseEnvelopeResultInfo
- type ConsumerUpdateResponseEnvelopeSuccess
- type ConsumerUpdateResponseSettings
- type Error
- type ErrorData
- type MessageAckParams
- type MessageAckParamsAck
- type MessageAckParamsRetry
- type MessageAckResponse
- type MessageAckResponseEnvelope
- type MessageAckResponseEnvelopeErrors
- type MessageAckResponseEnvelopeMessages
- type MessageAckResponseEnvelopeResultInfo
- type MessageAckResponseEnvelopeSuccess
- type MessagePullParams
- type MessagePullResponse
- type MessagePullResponseEnvelope
- type MessagePullResponseEnvelopeErrors
- type MessagePullResponseEnvelopeMessages
- type MessagePullResponseEnvelopeResultInfo
- type MessagePullResponseEnvelopeSuccess
- type MessageService
- type QueueDeleteParams
- type QueueDeleteResponse
- type QueueDeleteResponseArray
- type QueueDeleteResponseEnvelope
- type QueueDeleteResponseEnvelopeErrors
- type QueueDeleteResponseEnvelopeMessages
- type QueueDeleteResponseEnvelopeResultInfo
- type QueueDeleteResponseEnvelopeSuccess
- type QueueGetParams
- type QueueGetResponse
- type QueueGetResponseEnvelope
- type QueueGetResponseEnvelopeErrors
- type QueueGetResponseEnvelopeMessages
- type QueueGetResponseEnvelopeResultInfo
- type QueueGetResponseEnvelopeSuccess
- type QueueListParams
- type QueueListResponse
- type QueueNewParams
- type QueueNewResponse
- type QueueNewResponseEnvelope
- type QueueNewResponseEnvelopeErrors
- type QueueNewResponseEnvelopeMessages
- type QueueNewResponseEnvelopeResultInfo
- type QueueNewResponseEnvelopeSuccess
- type QueueService
- func (r *QueueService) Delete(ctx context.Context, queueID string, body QueueDeleteParams, ...) (res *QueueDeleteResponse, err error)
- func (r *QueueService) Get(ctx context.Context, queueID string, query QueueGetParams, ...) (res *QueueGetResponse, err error)
- func (r *QueueService) List(ctx context.Context, query QueueListParams, opts ...option.RequestOption) (res *pagination.SinglePage[QueueListResponse], err error)
- func (r *QueueService) ListAutoPaging(ctx context.Context, query QueueListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[QueueListResponse]
- func (r *QueueService) New(ctx context.Context, params QueueNewParams, opts ...option.RequestOption) (res *QueueNewResponse, err error)
- func (r *QueueService) Update(ctx context.Context, queueID string, params QueueUpdateParams, ...) (res *QueueUpdateResponse, err error)
- type QueueUpdateParams
- type QueueUpdateResponse
- type QueueUpdateResponseEnvelope
- type QueueUpdateResponseEnvelopeErrors
- type QueueUpdateResponseEnvelopeMessages
- type QueueUpdateResponseEnvelopeResultInfo
- type QueueUpdateResponseEnvelopeSuccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerDeleteParams ¶
type ConsumerDeleteResponse ¶
type ConsumerDeleteResponse interface {
ImplementsQueuesConsumerDeleteResponse()
}
Union satisfied by queues.ConsumerDeleteResponseUnknown, queues.ConsumerDeleteResponseArray or shared.UnionString.
type ConsumerDeleteResponseArray ¶
type ConsumerDeleteResponseArray []interface{}
func (ConsumerDeleteResponseArray) ImplementsQueuesConsumerDeleteResponse ¶
func (r ConsumerDeleteResponseArray) ImplementsQueuesConsumerDeleteResponse()
type ConsumerDeleteResponseEnvelope ¶
type ConsumerDeleteResponseEnvelope struct {
Errors []ConsumerDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []ConsumerDeleteResponseEnvelopeMessages `json:"messages,required"`
Result ConsumerDeleteResponse `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 ConsumerDeleteResponseEnvelopeErrors ¶
type ConsumerDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON consumerDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ConsumerDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ConsumerDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ConsumerDeleteResponseEnvelopeMessages ¶
type ConsumerDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON consumerDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ConsumerDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ConsumerDeleteResponseEnvelopeMessages) 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 ¶
func (r ConsumerDeleteResponseEnvelopeSuccess) IsKnown() bool
type ConsumerGetParams ¶
type ConsumerGetResponse ¶
type ConsumerGetResponse struct {
CreatedOn interface{} `json:"created_on"`
Environment interface{} `json:"environment"`
QueueName interface{} `json:"queue_name"`
Service interface{} `json:"service"`
Settings ConsumerGetResponseSettings `json:"settings"`
JSON consumerGetResponseJSON `json:"-"`
}
func (*ConsumerGetResponse) UnmarshalJSON ¶
func (r *ConsumerGetResponse) UnmarshalJSON(data []byte) (err error)
type ConsumerGetResponseEnvelope ¶
type ConsumerGetResponseEnvelope struct {
Errors []ConsumerGetResponseEnvelopeErrors `json:"errors,required"`
Messages []ConsumerGetResponseEnvelopeMessages `json:"messages,required"`
Result []ConsumerGetResponse `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 ConsumerGetResponseEnvelopeErrors ¶
type ConsumerGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON consumerGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ConsumerGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ConsumerGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ConsumerGetResponseEnvelopeMessages ¶
type ConsumerGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON consumerGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ConsumerGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ConsumerGetResponseEnvelopeMessages) 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 ¶
func (r ConsumerGetResponseEnvelopeSuccess) IsKnown() bool
type ConsumerGetResponseSettings ¶
type ConsumerGetResponseSettings 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 consumerGetResponseSettingsJSON `json:"-"`
}
func (*ConsumerGetResponseSettings) UnmarshalJSON ¶
func (r *ConsumerGetResponseSettings) UnmarshalJSON(data []byte) (err error)
type ConsumerNewParams ¶
type ConsumerNewParams struct {
// Identifier
AccountID param.Field[string] `path:"account_id,required"`
Body param.Field[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 {
Errors []ConsumerNewResponseEnvelopeErrors `json:"errors,required"`
Messages []ConsumerNewResponseEnvelopeMessages `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 ConsumerNewResponseEnvelopeErrors ¶
type ConsumerNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON consumerNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ConsumerNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ConsumerNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ConsumerNewResponseEnvelopeMessages ¶
type ConsumerNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON consumerNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ConsumerNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ConsumerNewResponseEnvelopeMessages) 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 ¶
func (r ConsumerNewResponseEnvelopeSuccess) IsKnown() bool
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, 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 *[]ConsumerGetResponse, 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 ConsumerUpdateParams ¶
type ConsumerUpdateParams struct {
// Identifier
AccountID param.Field[string] `path:"account_id,required"`
Body param.Field[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 {
Errors []ConsumerUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []ConsumerUpdateResponseEnvelopeMessages `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 ConsumerUpdateResponseEnvelopeErrors ¶
type ConsumerUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON consumerUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ConsumerUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ConsumerUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ConsumerUpdateResponseEnvelopeMessages ¶
type ConsumerUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON consumerUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ConsumerUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ConsumerUpdateResponseEnvelopeMessages) 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 ¶
func (r ConsumerUpdateResponseEnvelopeSuccess) IsKnown() bool
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 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 []MessageAckResponseEnvelopeErrors `json:"errors,required"`
Messages []MessageAckResponseEnvelopeMessages `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 MessageAckResponseEnvelopeErrors ¶
type MessageAckResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON messageAckResponseEnvelopeErrorsJSON `json:"-"`
}
func (*MessageAckResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *MessageAckResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type MessageAckResponseEnvelopeMessages ¶
type MessageAckResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON messageAckResponseEnvelopeMessagesJSON `json:"-"`
}
func (*MessageAckResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *MessageAckResponseEnvelopeMessages) 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 ¶
func (r MessageAckResponseEnvelopeSuccess) IsKnown() bool
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 []MessagePullResponseEnvelopeErrors `json:"errors,required"`
Messages []MessagePullResponseEnvelopeMessages `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 MessagePullResponseEnvelopeErrors ¶
type MessagePullResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON messagePullResponseEnvelopeErrorsJSON `json:"-"`
}
func (*MessagePullResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *MessagePullResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type MessagePullResponseEnvelopeMessages ¶
type MessagePullResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON messagePullResponseEnvelopeMessagesJSON `json:"-"`
}
func (*MessagePullResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *MessagePullResponseEnvelopeMessages) 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 ¶
func (r MessagePullResponseEnvelopeSuccess) 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) 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 QueueDeleteParams ¶
type QueueDeleteResponse ¶
type QueueDeleteResponse interface {
ImplementsQueuesQueueDeleteResponse()
}
Union satisfied by queues.QueueDeleteResponseUnknown, queues.QueueDeleteResponseArray or shared.UnionString.
type QueueDeleteResponseArray ¶
type QueueDeleteResponseArray []interface{}
func (QueueDeleteResponseArray) ImplementsQueuesQueueDeleteResponse ¶
func (r QueueDeleteResponseArray) ImplementsQueuesQueueDeleteResponse()
type QueueDeleteResponseEnvelope ¶
type QueueDeleteResponseEnvelope struct {
Errors []QueueDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []QueueDeleteResponseEnvelopeMessages `json:"messages,required"`
Result QueueDeleteResponse `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 QueueDeleteResponseEnvelopeErrors ¶
type QueueDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON queueDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*QueueDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *QueueDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type QueueDeleteResponseEnvelopeMessages ¶
type QueueDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON queueDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*QueueDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *QueueDeleteResponseEnvelopeMessages) 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 ¶
func (r QueueDeleteResponseEnvelopeSuccess) IsKnown() bool
type QueueGetParams ¶
type QueueGetResponse ¶
type QueueGetResponse 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 queueGetResponseJSON `json:"-"`
}
func (*QueueGetResponse) UnmarshalJSON ¶
func (r *QueueGetResponse) UnmarshalJSON(data []byte) (err error)
type QueueGetResponseEnvelope ¶
type QueueGetResponseEnvelope struct {
Errors []QueueGetResponseEnvelopeErrors `json:"errors,required"`
Messages []QueueGetResponseEnvelopeMessages `json:"messages,required"`
Result QueueGetResponse `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 QueueGetResponseEnvelopeErrors ¶
type QueueGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON queueGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*QueueGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *QueueGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type QueueGetResponseEnvelopeMessages ¶
type QueueGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON queueGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*QueueGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *QueueGetResponseEnvelopeMessages) 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 ¶
func (r QueueGetResponseEnvelopeSuccess) IsKnown() bool
type QueueListParams ¶
type QueueListResponse ¶
type QueueListResponse 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 queueListResponseJSON `json:"-"`
}
func (*QueueListResponse) UnmarshalJSON ¶
func (r *QueueListResponse) UnmarshalJSON(data []byte) (err error)
type QueueNewParams ¶
type QueueNewParams struct {
// Identifier
AccountID param.Field[string] `path:"account_id,required"`
Body param.Field[interface{}] `json:"body,required"`
}
func (QueueNewParams) MarshalJSON ¶
func (r QueueNewParams) MarshalJSON() (data []byte, err error)
type QueueNewResponse ¶
type QueueNewResponse struct {
CreatedOn interface{} `json:"created_on"`
ModifiedOn interface{} `json:"modified_on"`
QueueID interface{} `json:"queue_id"`
QueueName string `json:"queue_name"`
JSON queueNewResponseJSON `json:"-"`
}
func (*QueueNewResponse) UnmarshalJSON ¶
func (r *QueueNewResponse) UnmarshalJSON(data []byte) (err error)
type QueueNewResponseEnvelope ¶
type QueueNewResponseEnvelope struct {
Errors []QueueNewResponseEnvelopeErrors `json:"errors,required"`
Messages []QueueNewResponseEnvelopeMessages `json:"messages,required"`
Result QueueNewResponse `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 QueueNewResponseEnvelopeErrors ¶
type QueueNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON queueNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*QueueNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *QueueNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type QueueNewResponseEnvelopeMessages ¶
type QueueNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON queueNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*QueueNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *QueueNewResponseEnvelopeMessages) 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 ¶
func (r QueueNewResponseEnvelopeSuccess) IsKnown() bool
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 *QueueDeleteResponse, err error)
Deletes a queue.
func (*QueueService) Get ¶
func (r *QueueService) Get(ctx context.Context, queueID string, query QueueGetParams, opts ...option.RequestOption) (res *QueueGetResponse, 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[QueueListResponse], 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[QueueListResponse]
Returns the queues owned by an account.
func (*QueueService) New ¶
func (r *QueueService) New(ctx context.Context, params QueueNewParams, opts ...option.RequestOption) (res *QueueNewResponse, err error)
Creates a new queue.
func (*QueueService) Update ¶
func (r *QueueService) Update(ctx context.Context, queueID string, params QueueUpdateParams, opts ...option.RequestOption) (res *QueueUpdateResponse, err error)
Updates a queue.
type QueueUpdateParams ¶
type QueueUpdateParams struct {
// Identifier
AccountID param.Field[string] `path:"account_id,required"`
Body param.Field[interface{}] `json:"body,required"`
}
func (QueueUpdateParams) MarshalJSON ¶
func (r QueueUpdateParams) MarshalJSON() (data []byte, err error)
type QueueUpdateResponse ¶
type QueueUpdateResponse struct {
CreatedOn interface{} `json:"created_on"`
ModifiedOn interface{} `json:"modified_on"`
QueueID interface{} `json:"queue_id"`
QueueName string `json:"queue_name"`
JSON queueUpdateResponseJSON `json:"-"`
}
func (*QueueUpdateResponse) UnmarshalJSON ¶
func (r *QueueUpdateResponse) UnmarshalJSON(data []byte) (err error)
type QueueUpdateResponseEnvelope ¶
type QueueUpdateResponseEnvelope struct {
Errors []QueueUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []QueueUpdateResponseEnvelopeMessages `json:"messages,required"`
Result QueueUpdateResponse `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 QueueUpdateResponseEnvelopeErrors ¶
type QueueUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON queueUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*QueueUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *QueueUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type QueueUpdateResponseEnvelopeMessages ¶
type QueueUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON queueUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*QueueUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *QueueUpdateResponseEnvelopeMessages) 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 ¶
func (r QueueUpdateResponseEnvelopeSuccess) IsKnown() bool