Documentation
¶
Index ¶
- type ConsumerDeleteParams
- type ConsumerDeleteResponse
- type ConsumerDeleteResponseArray
- type ConsumerDeleteResponseEnvelope
- type ConsumerDeleteResponseEnvelopeErrors
- type ConsumerDeleteResponseEnvelopeMessages
- type ConsumerDeleteResponseEnvelopeResultInfo
- type ConsumerDeleteResponseEnvelopeSuccess
- type ConsumerGetParams
- type ConsumerGetResponseEnvelope
- type ConsumerGetResponseEnvelopeResultInfo
- type ConsumerGetResponseEnvelopeSuccess
- type ConsumerNewParams
- type ConsumerNewResponseEnvelope
- type ConsumerNewResponseEnvelopeErrors
- type ConsumerNewResponseEnvelopeMessages
- type ConsumerNewResponseEnvelopeResultInfo
- type ConsumerNewResponseEnvelopeSuccess
- type ConsumerService
- func (r *ConsumerService) Delete(ctx context.Context, name string, consumerName string, ...) (res *ConsumerDeleteResponse, err error)
- func (r *ConsumerService) Get(ctx context.Context, name string, query ConsumerGetParams, ...) (res *[]WorkersConsumer, err error)
- func (r *ConsumerService) New(ctx context.Context, name string, params ConsumerNewParams, ...) (res *WorkersConsumerCreated, err error)
- func (r *ConsumerService) Update(ctx context.Context, name string, consumerName string, ...) (res *WorkersConsumerUpdated, err error)
- type ConsumerUpdateParams
- type ConsumerUpdateResponseEnvelope
- type ConsumerUpdateResponseEnvelopeErrors
- type ConsumerUpdateResponseEnvelopeMessages
- type ConsumerUpdateResponseEnvelopeResultInfo
- type ConsumerUpdateResponseEnvelopeSuccess
- type Error
- type QueueDeleteParams
- type QueueDeleteResponse
- type QueueDeleteResponseArray
- type QueueDeleteResponseEnvelope
- type QueueDeleteResponseEnvelopeErrors
- type QueueDeleteResponseEnvelopeMessages
- type QueueDeleteResponseEnvelopeResultInfo
- type QueueDeleteResponseEnvelopeSuccess
- type QueueGetParams
- type QueueGetResponseEnvelope
- type QueueGetResponseEnvelopeErrors
- type QueueGetResponseEnvelopeMessages
- type QueueGetResponseEnvelopeResultInfo
- type QueueGetResponseEnvelopeSuccess
- type QueueListParams
- type QueueListResponseEnvelope
- type QueueListResponseEnvelopeResultInfo
- type QueueListResponseEnvelopeSuccess
- type QueueNewParams
- type QueueNewResponseEnvelope
- type QueueNewResponseEnvelopeErrors
- type QueueNewResponseEnvelopeMessages
- type QueueNewResponseEnvelopeResultInfo
- type QueueNewResponseEnvelopeSuccess
- type QueueService
- func (r *QueueService) Delete(ctx context.Context, name string, body QueueDeleteParams, ...) (res *QueueDeleteResponse, err error)
- func (r *QueueService) Get(ctx context.Context, name string, query QueueGetParams, ...) (res *WorkersQueue, err error)
- func (r *QueueService) List(ctx context.Context, query QueueListParams, opts ...option.RequestOption) (res *[]WorkersQueue, err error)
- func (r *QueueService) New(ctx context.Context, params QueueNewParams, opts ...option.RequestOption) (res *WorkersQueueCreated, err error)
- func (r *QueueService) Update(ctx context.Context, name string, params QueueUpdateParams, ...) (res *WorkersQueueUpdated, err error)
- type QueueUpdateParams
- type QueueUpdateResponseEnvelope
- type QueueUpdateResponseEnvelopeErrors
- type QueueUpdateResponseEnvelopeMessages
- type QueueUpdateResponseEnvelopeResultInfo
- type QueueUpdateResponseEnvelopeSuccess
- type WorkersConsumer
- type WorkersConsumerCreated
- type WorkersConsumerCreatedSettings
- type WorkersConsumerSettings
- type WorkersConsumerUpdated
- type WorkersConsumerUpdatedSettings
- type WorkersQueue
- type WorkersQueueCreated
- type WorkersQueueUpdated
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
)
type ConsumerGetParams ¶
type ConsumerGetResponseEnvelope ¶
type ConsumerGetResponseEnvelope struct {
Errors []interface{} `json:"errors,required,nullable"`
Messages []interface{} `json:"messages,required,nullable"`
Result []WorkersConsumer `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 interface{} `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
)
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 ConsumerNewResponseEnvelope ¶
type ConsumerNewResponseEnvelope struct {
Errors []ConsumerNewResponseEnvelopeErrors `json:"errors,required"`
Messages []ConsumerNewResponseEnvelopeMessages `json:"messages,required"`
Result WorkersConsumerCreated `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
)
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, name string, consumerName 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, name string, query ConsumerGetParams, opts ...option.RequestOption) (res *[]WorkersConsumer, err error)
Returns the consumers for a queue.
func (*ConsumerService) New ¶
func (r *ConsumerService) New(ctx context.Context, name string, params ConsumerNewParams, opts ...option.RequestOption) (res *WorkersConsumerCreated, err error)
Creates a new consumer for a queue.
func (*ConsumerService) Update ¶
func (r *ConsumerService) Update(ctx context.Context, name string, consumerName string, params ConsumerUpdateParams, opts ...option.RequestOption) (res *WorkersConsumerUpdated, 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 ConsumerUpdateResponseEnvelope ¶
type ConsumerUpdateResponseEnvelope struct {
Errors []ConsumerUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []ConsumerUpdateResponseEnvelopeMessages `json:"messages,required"`
Result WorkersConsumerUpdated `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
)
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
)
type QueueGetParams ¶
type QueueGetResponseEnvelope ¶
type QueueGetResponseEnvelope struct {
Errors []QueueGetResponseEnvelopeErrors `json:"errors,required"`
Messages []QueueGetResponseEnvelopeMessages `json:"messages,required"`
Result WorkersQueue `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
)
type QueueListParams ¶
type QueueListResponseEnvelope ¶
type QueueListResponseEnvelope struct {
Errors []interface{} `json:"errors,required,nullable"`
Messages []interface{} `json:"messages,required,nullable"`
Result []WorkersQueue `json:"result,required,nullable"`
// Whether the API call was successful
Success QueueListResponseEnvelopeSuccess `json:"success,required"`
ResultInfo QueueListResponseEnvelopeResultInfo `json:"result_info"`
JSON queueListResponseEnvelopeJSON `json:"-"`
}
func (*QueueListResponseEnvelope) UnmarshalJSON ¶
func (r *QueueListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type QueueListResponseEnvelopeResultInfo ¶
type QueueListResponseEnvelopeResultInfo 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 interface{} `json:"total_pages"`
JSON queueListResponseEnvelopeResultInfoJSON `json:"-"`
}
func (*QueueListResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *QueueListResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type QueueListResponseEnvelopeSuccess ¶
type QueueListResponseEnvelopeSuccess bool
Whether the API call was successful
const (
QueueListResponseEnvelopeSuccessTrue QueueListResponseEnvelopeSuccess = true
)
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 QueueNewResponseEnvelope ¶
type QueueNewResponseEnvelope struct {
Errors []QueueNewResponseEnvelopeErrors `json:"errors,required"`
Messages []QueueNewResponseEnvelopeMessages `json:"messages,required"`
Result WorkersQueueCreated `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
)
type QueueService ¶
type QueueService struct {
Options []option.RequestOption
Consumers *ConsumerService
}
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, name string, body QueueDeleteParams, opts ...option.RequestOption) (res *QueueDeleteResponse, err error)
Deletes a queue.
func (*QueueService) Get ¶
func (r *QueueService) Get(ctx context.Context, name string, query QueueGetParams, opts ...option.RequestOption) (res *WorkersQueue, err error)
Get information about a specific queue.
func (*QueueService) List ¶
func (r *QueueService) List(ctx context.Context, query QueueListParams, opts ...option.RequestOption) (res *[]WorkersQueue, err error)
Returns the queues owned by an account.
func (*QueueService) New ¶
func (r *QueueService) New(ctx context.Context, params QueueNewParams, opts ...option.RequestOption) (res *WorkersQueueCreated, err error)
Creates a new queue.
func (*QueueService) Update ¶
func (r *QueueService) Update(ctx context.Context, name string, params QueueUpdateParams, opts ...option.RequestOption) (res *WorkersQueueUpdated, 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 QueueUpdateResponseEnvelope ¶
type QueueUpdateResponseEnvelope struct {
Errors []QueueUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []QueueUpdateResponseEnvelopeMessages `json:"messages,required"`
Result WorkersQueueUpdated `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
)
type WorkersConsumer ¶
type WorkersConsumer struct {
CreatedOn interface{} `json:"created_on"`
Environment interface{} `json:"environment"`
QueueName interface{} `json:"queue_name"`
Service interface{} `json:"service"`
Settings WorkersConsumerSettings `json:"settings"`
JSON workersConsumerJSON `json:"-"`
}
func (*WorkersConsumer) UnmarshalJSON ¶
func (r *WorkersConsumer) UnmarshalJSON(data []byte) (err error)
type WorkersConsumerCreated ¶
type WorkersConsumerCreated 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 WorkersConsumerCreatedSettings `json:"settings"`
JSON workersConsumerCreatedJSON `json:"-"`
}
func (*WorkersConsumerCreated) UnmarshalJSON ¶
func (r *WorkersConsumerCreated) UnmarshalJSON(data []byte) (err error)
type WorkersConsumerCreatedSettings ¶
type WorkersConsumerCreatedSettings struct {
BatchSize float64 `json:"batch_size"`
MaxRetries float64 `json:"max_retries"`
MaxWaitTimeMs float64 `json:"max_wait_time_ms"`
JSON workersConsumerCreatedSettingsJSON `json:"-"`
}
func (*WorkersConsumerCreatedSettings) UnmarshalJSON ¶
func (r *WorkersConsumerCreatedSettings) UnmarshalJSON(data []byte) (err error)
type WorkersConsumerSettings ¶
type WorkersConsumerSettings struct {
BatchSize float64 `json:"batch_size"`
MaxRetries float64 `json:"max_retries"`
MaxWaitTimeMs float64 `json:"max_wait_time_ms"`
JSON workersConsumerSettingsJSON `json:"-"`
}
func (*WorkersConsumerSettings) UnmarshalJSON ¶
func (r *WorkersConsumerSettings) UnmarshalJSON(data []byte) (err error)
type WorkersConsumerUpdated ¶
type WorkersConsumerUpdated struct {
CreatedOn interface{} `json:"created_on"`
DeadLetterQueue interface{} `json:"dead_letter_queue"`
Environment interface{} `json:"environment"`
QueueName interface{} `json:"queue_name"`
ScriptName interface{} `json:"script_name"`
Settings WorkersConsumerUpdatedSettings `json:"settings"`
JSON workersConsumerUpdatedJSON `json:"-"`
}
func (*WorkersConsumerUpdated) UnmarshalJSON ¶
func (r *WorkersConsumerUpdated) UnmarshalJSON(data []byte) (err error)
type WorkersConsumerUpdatedSettings ¶
type WorkersConsumerUpdatedSettings struct {
BatchSize float64 `json:"batch_size"`
MaxRetries float64 `json:"max_retries"`
MaxWaitTimeMs float64 `json:"max_wait_time_ms"`
JSON workersConsumerUpdatedSettingsJSON `json:"-"`
}
func (*WorkersConsumerUpdatedSettings) UnmarshalJSON ¶
func (r *WorkersConsumerUpdatedSettings) UnmarshalJSON(data []byte) (err error)
type WorkersQueue ¶
type WorkersQueue 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 interface{} `json:"queue_id"`
QueueName string `json:"queue_name"`
JSON workersQueueJSON `json:"-"`
}
func (*WorkersQueue) UnmarshalJSON ¶
func (r *WorkersQueue) UnmarshalJSON(data []byte) (err error)
type WorkersQueueCreated ¶
type WorkersQueueCreated struct {
CreatedOn interface{} `json:"created_on"`
ModifiedOn interface{} `json:"modified_on"`
QueueID interface{} `json:"queue_id"`
QueueName string `json:"queue_name"`
JSON workersQueueCreatedJSON `json:"-"`
}
func (*WorkersQueueCreated) UnmarshalJSON ¶
func (r *WorkersQueueCreated) UnmarshalJSON(data []byte) (err error)
type WorkersQueueUpdated ¶
type WorkersQueueUpdated struct {
CreatedOn interface{} `json:"created_on"`
ModifiedOn interface{} `json:"modified_on"`
QueueID interface{} `json:"queue_id"`
QueueName string `json:"queue_name"`
JSON workersQueueUpdatedJSON `json:"-"`
}
func (*WorkersQueueUpdated) UnmarshalJSON ¶
func (r *WorkersQueueUpdated) UnmarshalJSON(data []byte) (err error)