Documentation ¶
Index ¶
- type Client
- func (c Client) Delete(ctx context.Context, queueName, messageID string, input DeleteInput) (result DeleteResponse, err error)
- func (c Client) Get(ctx context.Context, queueName string, input GetInput) (result QueueMessagesListResponse, err error)
- func (c Client) Peek(ctx context.Context, queueName string, input PeekInput) (result QueueMessagesListResponse, err error)
- func (c Client) Put(ctx context.Context, queueName string, input PutInput) (result QueueMessagesListResponse, err error)
- func (c Client) Update(ctx context.Context, queueName string, messageID string, input UpdateInput) (result UpdateResponse, err error)
- type DeleteInput
- type DeleteResponse
- type GetInput
- type PeekInput
- type PutInput
- type QueueMessage
- type QueueMessageResponse
- type QueueMessagesListResponse
- type StorageQueueMessage
- type UpdateInput
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is the base client for Messages.
func NewWithBaseUri ¶
func (Client) Delete ¶
func (c Client) Delete(ctx context.Context, queueName, messageID string, input DeleteInput) (result DeleteResponse, err error)
Delete deletes a specific message
func (Client) Get ¶
func (c Client) Get(ctx context.Context, queueName string, input GetInput) (result QueueMessagesListResponse, err error)
Get retrieves one or more messages from the front of the queue
func (Client) Peek ¶
func (c Client) Peek(ctx context.Context, queueName string, input PeekInput) (result QueueMessagesListResponse, err error)
Peek retrieves one or more messages from the front of the queue, but doesn't alter the visibility of the messages
func (Client) Put ¶
func (c Client) Put(ctx context.Context, queueName string, input PutInput) (result QueueMessagesListResponse, err error)
Put adds a new message to the back of the message queue
func (Client) Update ¶
func (c Client) Update(ctx context.Context, queueName string, messageID string, input UpdateInput) (result UpdateResponse, err error)
Update updates an existing message based on it's Pop Receipt
type DeleteInput ¶
type DeleteInput struct {
PopReceipt string
}
type DeleteResponse ¶
type GetInput ¶
type GetInput struct { // VisibilityTimeout specifies the new visibility timeout value, in seconds, relative to server time. // The new value must be larger than or equal to 0, and cannot be larger than 7 days. VisibilityTimeout *int // NumberOfMessages specifies the (maximum) number of messages that should be retrieved from the queue. // This can be a maximum of 32. NumberOfMessages int }
type PeekInput ¶
type PeekInput struct { // NumberOfMessages specifies the (maximum) number of messages that should be peak'd from the front of the queue. // This can be a maximum of 32. NumberOfMessages int }
type PutInput ¶
type PutInput struct { // A message must be in a format that can be included in an XML request with UTF-8 encoding. // The encoded message can be up to 64 KB in size. Message string // The maximum time-to-live can be any positive number, // as well as -1 indicating that the message does not expire. // If this parameter is omitted, the default time-to-live is 7 days. MessageTtl *int // Specifies the new visibility timeout value, in seconds, relative to server time. // The new value must be larger than or equal to 0, and cannot be larger than 7 days. // The visibility timeout of a message cannot be set to a value later than the expiry time. // visibilitytimeout should be set to a value smaller than the time-to-live value. // If not specified, the default value is 0. VisibilityTimeout *int }
type QueueMessage ¶
type QueueMessage struct {
MessageText string `xml:"MessageText"`
}
type QueueMessageResponse ¶
type QueueMessagesListResponse ¶
type QueueMessagesListResponse struct { HttpResponse *http.Response QueueMessages *[]QueueMessageResponse `xml:"QueueMessage"` }
type StorageQueueMessage ¶
type StorageQueueMessage interface { Delete(ctx context.Context, queueName string, messageID string, input DeleteInput) (DeleteResponse, error) Peek(ctx context.Context, queueName string, input PeekInput) (QueueMessagesListResponse, error) Put(ctx context.Context, queueName string, input PutInput) (QueueMessagesListResponse, error) Get(ctx context.Context, queueName string, input GetInput) (QueueMessagesListResponse, error) Update(ctx context.Context, queueName string, messageID string, input UpdateInput) (UpdateResponse, error) }
type UpdateInput ¶
type UpdateInput struct { // A message must be in a format that can be included in an XML request with UTF-8 encoding. // The encoded message can be up to 64 KB in size. Message string // Specifies the valid pop receipt value required to modify this message. PopReceipt string // Specifies the new visibility timeout value, in seconds, relative to server time. // The new value must be larger than or equal to 0, and cannot be larger than 7 days. // The visibility timeout of a message cannot be set to a value later than the expiry time. // A message can be updated until it has been deleted or has expired. VisibilityTimeout int }
type UpdateResponse ¶
Click to show internal directories.
Click to hide internal directories.