Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Consumer
- type ConsumerDeleteParams
- type ConsumerDeleteResponseArray
- type ConsumerDeleteResponseEnvelope
- type ConsumerDeleteResponseEnvelopeResultInfo
- type ConsumerDeleteResponseEnvelopeSuccess
- type ConsumerDeleteResponseUnion
- type ConsumerGetParams
- type ConsumerGetResponseEnvelope
- type ConsumerGetResponseEnvelopeResultInfo
- type ConsumerGetResponseEnvelopeSuccess
- type ConsumerNewParams
- type ConsumerNewResponse
- type ConsumerNewResponseEnvelope
- type ConsumerNewResponseEnvelopeResultInfo
- type ConsumerNewResponseEnvelopeSuccess
- type ConsumerNewResponseSettings
- type ConsumerService
- func (r *ConsumerService) Delete(ctx context.Context, queueID string, consumerID string, ...) (res *ConsumerDeleteResponseUnion, err error)
- func (r *ConsumerService) Get(ctx context.Context, queueID string, query ConsumerGetParams, ...) (res *[]Consumer, 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 ConsumerSettings
- type ConsumerUpdateParams
- type ConsumerUpdateResponse
- type ConsumerUpdateResponseEnvelope
- type ConsumerUpdateResponseEnvelopeResultInfo
- type ConsumerUpdateResponseEnvelopeSuccess
- type ConsumerUpdateResponseSettings
- type Error
- type ErrorData
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type MessageAckParams
- type MessageAckParamsAck
- type MessageAckParamsRetry
- type MessageAckResponse
- type MessageAckResponseEnvelope
- type MessageAckResponseEnvelopeResultInfo
- type MessageAckResponseEnvelopeSuccess
- type MessagePullParams
- type MessagePullResponse
- type MessagePullResponseEnvelope
- type MessagePullResponseEnvelopeResultInfo
- type MessagePullResponseEnvelopeSuccess
- type MessageService
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type Queue
- type QueueCreated
- type QueueDeleteParams
- type QueueDeleteResponseArray
- type QueueDeleteResponseEnvelope
- type QueueDeleteResponseEnvelopeResultInfo
- type QueueDeleteResponseEnvelopeSuccess
- type QueueDeleteResponseUnion
- type QueueGetParams
- type QueueGetResponseEnvelope
- type QueueGetResponseEnvelopeResultInfo
- type QueueGetResponseEnvelopeSuccess
- type QueueListParams
- type QueueNewParams
- type QueueNewResponseEnvelope
- type QueueNewResponseEnvelopeResultInfo
- type QueueNewResponseEnvelopeSuccess
- type QueueService
- func (r *QueueService) Delete(ctx context.Context, queueID string, body QueueDeleteParams, ...) (res *QueueDeleteResponseUnion, err error)
- func (r *QueueService) Get(ctx context.Context, queueID string, query QueueGetParams, ...) (res *Queue, err error)
- func (r *QueueService) List(ctx context.Context, query QueueListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Queue], err error)
- func (r *QueueService) ListAutoPaging(ctx context.Context, query QueueListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Queue]
- func (r *QueueService) New(ctx context.Context, params QueueNewParams, opts ...option.RequestOption) (res *QueueCreated, err error)
- func (r *QueueService) Update(ctx context.Context, queueID string, params QueueUpdateParams, ...) (res *QueueUpdated, err error)
- type QueueUpdateParams
- type QueueUpdateResponseEnvelope
- type QueueUpdateResponseEnvelopeResultInfo
- type QueueUpdateResponseEnvelopeSuccess
- type QueueUpdated
- type ResponseInfo
- type Role
- type SortDirection
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type CertificateCA ¶ added in v2.2.0
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶ added in v2.2.0
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
This is an alias to an internal type.
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelStatus ¶ added in v2.3.0
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type Consumer ¶
type Consumer struct { CreatedOn 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 ¶
type ConsumerDeleteParams ¶
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 ¶
func (r ConsumerDeleteResponseEnvelopeSuccess) IsKnown() bool
type ConsumerDeleteResponseUnion ¶
type ConsumerDeleteResponseUnion interface {
ImplementsQueuesConsumerDeleteResponseUnion()
}
Union satisfied by queues.ConsumerDeleteResponseUnknown, queues.ConsumerDeleteResponseArray or shared.UnionString.
type ConsumerGetParams ¶
type ConsumerGetResponseEnvelope ¶
type ConsumerGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result []Consumer `json:"result,required,nullable"` // Whether the API call was successful Success ConsumerGetResponseEnvelopeSuccess `json:"success,required"` ResultInfo ConsumerGetResponseEnvelopeResultInfo `json:"result_info"` JSON consumerGetResponseEnvelopeJSON `json:"-"` }
func (*ConsumerGetResponseEnvelope) UnmarshalJSON ¶
func (r *ConsumerGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConsumerGetResponseEnvelopeResultInfo ¶
type ConsumerGetResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` TotalPages float64 `json:"total_pages"` JSON consumerGetResponseEnvelopeResultInfoJSON `json:"-"` }
func (*ConsumerGetResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *ConsumerGetResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type ConsumerGetResponseEnvelopeSuccess ¶
type ConsumerGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ConsumerGetResponseEnvelopeSuccessTrue ConsumerGetResponseEnvelopeSuccess = true
)
func (ConsumerGetResponseEnvelopeSuccess) IsKnown ¶
func (r ConsumerGetResponseEnvelopeSuccess) IsKnown() bool
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 { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result ConsumerNewResponse `json:"result,required,nullable"` // Whether the API call was successful Success ConsumerNewResponseEnvelopeSuccess `json:"success,required"` ResultInfo ConsumerNewResponseEnvelopeResultInfo `json:"result_info"` JSON consumerNewResponseEnvelopeJSON `json:"-"` }
func (*ConsumerNewResponseEnvelope) UnmarshalJSON ¶
func (r *ConsumerNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConsumerNewResponseEnvelopeResultInfo ¶
type ConsumerNewResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` JSON consumerNewResponseEnvelopeResultInfoJSON `json:"-"` }
func (*ConsumerNewResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *ConsumerNewResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type ConsumerNewResponseEnvelopeSuccess ¶
type ConsumerNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ConsumerNewResponseEnvelopeSuccessTrue ConsumerNewResponseEnvelopeSuccess = true
)
func (ConsumerNewResponseEnvelopeSuccess) IsKnown ¶
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 *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 { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result ConsumerUpdateResponse `json:"result,required,nullable"` // Whether the API call was successful Success ConsumerUpdateResponseEnvelopeSuccess `json:"success,required"` ResultInfo ConsumerUpdateResponseEnvelopeResultInfo `json:"result_info"` JSON consumerUpdateResponseEnvelopeJSON `json:"-"` }
func (*ConsumerUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *ConsumerUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConsumerUpdateResponseEnvelopeResultInfo ¶
type ConsumerUpdateResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` JSON consumerUpdateResponseEnvelopeResultInfoJSON `json:"-"` }
func (*ConsumerUpdateResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *ConsumerUpdateResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type ConsumerUpdateResponseEnvelopeSuccess ¶
type ConsumerUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ConsumerUpdateResponseEnvelopeSuccessTrue ConsumerUpdateResponseEnvelopeSuccess = true
)
func (ConsumerUpdateResponseEnvelopeSuccess) IsKnown ¶
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 MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
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 MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberStatus ¶ added in v2.3.0
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
Details of the user associated to the membership.
This is an alias to an internal type.
type MessageAckParams ¶
type MessageAckParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` Acks param.Field[[]MessageAckParamsAck] `json:"acks"` Retries param.Field[[]MessageAckParamsRetry] `json:"retries"` }
func (MessageAckParams) MarshalJSON ¶
func (r MessageAckParams) MarshalJSON() (data []byte, err error)
type MessageAckParamsAck ¶
type MessageAckParamsAck struct { // Lease ID for a message to acknowledge. LeaseID param.Field[string] `json:"lease_id"` }
func (MessageAckParamsAck) MarshalJSON ¶
func (r MessageAckParamsAck) MarshalJSON() (data []byte, err error)
type MessageAckParamsRetry ¶
type MessageAckParamsRetry struct { // The number of seconds to delay before making the message available for another // attempt. DelaySeconds param.Field[float64] `json:"delay_seconds"` // Lease ID for a message to retry. LeaseID param.Field[string] `json:"lease_id"` }
func (MessageAckParamsRetry) MarshalJSON ¶
func (r MessageAckParamsRetry) MarshalJSON() (data []byte, err error)
type MessageAckResponse ¶
type MessageAckResponse struct { // The number of messages that were succesfully acknowledged AckCount float64 `json:"ackCount"` // The number of messages that were succesfully retried RetryCount float64 `json:"retryCount"` Warnings []string `json:"warnings"` JSON messageAckResponseJSON `json:"-"` }
func (*MessageAckResponse) UnmarshalJSON ¶
func (r *MessageAckResponse) UnmarshalJSON(data []byte) (err error)
type MessageAckResponseEnvelope ¶
type MessageAckResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result MessageAckResponse `json:"result,required,nullable"` // Whether the API call was successful Success MessageAckResponseEnvelopeSuccess `json:"success,required"` ResultInfo MessageAckResponseEnvelopeResultInfo `json:"result_info"` JSON messageAckResponseEnvelopeJSON `json:"-"` }
func (*MessageAckResponseEnvelope) UnmarshalJSON ¶
func (r *MessageAckResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type MessageAckResponseEnvelopeResultInfo ¶
type MessageAckResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` JSON messageAckResponseEnvelopeResultInfoJSON `json:"-"` }
func (*MessageAckResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *MessageAckResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type MessageAckResponseEnvelopeSuccess ¶
type MessageAckResponseEnvelopeSuccess bool
Whether the API call was successful
const (
MessageAckResponseEnvelopeSuccessTrue MessageAckResponseEnvelopeSuccess = true
)
func (MessageAckResponseEnvelopeSuccess) IsKnown ¶
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 []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 ¶
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 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 ¶
type QueueCreated ¶
type QueueCreated struct { CreatedOn interface{} `json:"created_on"` ModifiedOn interface{} `json:"modified_on"` QueueID string `json:"queue_id"` QueueName string `json:"queue_name"` JSON queueCreatedJSON `json:"-"` }
func (*QueueCreated) UnmarshalJSON ¶
func (r *QueueCreated) UnmarshalJSON(data []byte) (err error)
type QueueDeleteParams ¶
type 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 ¶
func (r QueueDeleteResponseEnvelopeSuccess) IsKnown() bool
type QueueDeleteResponseUnion ¶
type QueueDeleteResponseUnion interface {
ImplementsQueuesQueueDeleteResponseUnion()
}
Union satisfied by queues.QueueDeleteResponseUnknown, queues.QueueDeleteResponseArray or shared.UnionString.
type QueueGetParams ¶
type QueueGetResponseEnvelope ¶
type QueueGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Queue `json:"result,required,nullable"` // Whether the API call was successful Success QueueGetResponseEnvelopeSuccess `json:"success,required"` ResultInfo QueueGetResponseEnvelopeResultInfo `json:"result_info"` JSON queueGetResponseEnvelopeJSON `json:"-"` }
func (*QueueGetResponseEnvelope) UnmarshalJSON ¶
func (r *QueueGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type QueueGetResponseEnvelopeResultInfo ¶
type QueueGetResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` JSON queueGetResponseEnvelopeResultInfoJSON `json:"-"` }
func (*QueueGetResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *QueueGetResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type QueueGetResponseEnvelopeSuccess ¶
type QueueGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
QueueGetResponseEnvelopeSuccessTrue QueueGetResponseEnvelopeSuccess = true
)
func (QueueGetResponseEnvelopeSuccess) IsKnown ¶
func (r QueueGetResponseEnvelopeSuccess) IsKnown() bool
type QueueListParams ¶
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 { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result QueueCreated `json:"result,required,nullable"` // Whether the API call was successful Success QueueNewResponseEnvelopeSuccess `json:"success,required"` ResultInfo QueueNewResponseEnvelopeResultInfo `json:"result_info"` JSON queueNewResponseEnvelopeJSON `json:"-"` }
func (*QueueNewResponseEnvelope) UnmarshalJSON ¶
func (r *QueueNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type QueueNewResponseEnvelopeResultInfo ¶
type QueueNewResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` JSON queueNewResponseEnvelopeResultInfoJSON `json:"-"` }
func (*QueueNewResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *QueueNewResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type QueueNewResponseEnvelopeSuccess ¶
type QueueNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
QueueNewResponseEnvelopeSuccessTrue QueueNewResponseEnvelopeSuccess = true
)
func (QueueNewResponseEnvelopeSuccess) IsKnown ¶
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 *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 ¶
func (r *QueueService) ListAutoPaging(ctx context.Context, query QueueListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Queue]
Returns the queues owned by an account.
func (*QueueService) New ¶
func (r *QueueService) New(ctx context.Context, params QueueNewParams, opts ...option.RequestOption) (res *QueueCreated, err error)
Creates a new queue.
func (*QueueService) Update ¶
func (r *QueueService) Update(ctx context.Context, queueID string, params QueueUpdateParams, opts ...option.RequestOption) (res *QueueUpdated, err error)
Updates a queue.
type QueueUpdateParams ¶
type QueueUpdateParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` }
func (QueueUpdateParams) MarshalJSON ¶
func (r QueueUpdateParams) MarshalJSON() (data []byte, err error)
type QueueUpdateResponseEnvelope ¶
type QueueUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result QueueUpdated `json:"result,required,nullable"` // Whether the API call was successful Success QueueUpdateResponseEnvelopeSuccess `json:"success,required"` ResultInfo QueueUpdateResponseEnvelopeResultInfo `json:"result_info"` JSON queueUpdateResponseEnvelopeJSON `json:"-"` }
func (*QueueUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *QueueUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type QueueUpdateResponseEnvelopeResultInfo ¶
type QueueUpdateResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` JSON queueUpdateResponseEnvelopeResultInfoJSON `json:"-"` }
func (*QueueUpdateResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *QueueUpdateResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type QueueUpdateResponseEnvelopeSuccess ¶
type QueueUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
QueueUpdateResponseEnvelopeSuccessTrue QueueUpdateResponseEnvelopeSuccess = true
)
func (QueueUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r QueueUpdateResponseEnvelopeSuccess) IsKnown() bool
type QueueUpdated ¶
type QueueUpdated struct { CreatedOn interface{} `json:"created_on"` ModifiedOn interface{} `json:"modified_on"` QueueID string `json:"queue_id"` QueueName string `json:"queue_name"` JSON queueUpdatedJSON `json:"-"` }
func (*QueueUpdated) UnmarshalJSON ¶
func (r *QueueUpdated) UnmarshalJSON(data []byte) (err error)
type SortDirection ¶ added in v2.2.0
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.