Documentation ¶
Index ¶
- Constants
- func UserAgent() string
- type Client
- func (client Client) Delete(ctx context.Context, accountName, queueName, messageID, popReceipt string) (result autorest.Response, err error)
- func (client Client) DeletePreparer(ctx context.Context, accountName, queueName, messageID, popReceipt string) (*http.Request, error)
- func (client Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) DeleteSender(req *http.Request) (*http.Response, error)
- func (client Client) Get(ctx context.Context, accountName, queueName string, numberOfMessages int, ...) (result QueueMessagesListResult, err error)
- func (client Client) GetPreparer(ctx context.Context, accountName, queueName string, numberOfMessages int, ...) (*http.Request, error)
- func (client Client) GetResourceID(accountName, queueName, messageID string) string
- func (client Client) GetResponder(resp *http.Response) (result QueueMessagesListResult, err error)
- func (client Client) GetSender(req *http.Request) (*http.Response, error)
- func (client Client) Peek(ctx context.Context, accountName, queueName string, numberOfMessages int) (result QueueMessagesListResult, err error)
- func (client Client) PeekPreparer(ctx context.Context, accountName, queueName string, numberOfMessages int) (*http.Request, error)
- func (client Client) PeekResponder(resp *http.Response) (result QueueMessagesListResult, err error)
- func (client Client) PeekSender(req *http.Request) (*http.Response, error)
- func (client Client) Put(ctx context.Context, accountName, queueName string, input PutInput) (result QueueMessagesListResult, err error)
- func (client Client) PutPreparer(ctx context.Context, accountName, queueName string, input PutInput) (*http.Request, error)
- func (client Client) PutResponder(resp *http.Response) (result QueueMessagesListResult, err error)
- func (client Client) PutSender(req *http.Request) (*http.Response, error)
- func (client Client) Update(ctx context.Context, accountName, queueName string, messageID string, ...) (result autorest.Response, err error)
- func (client Client) UpdatePreparer(ctx context.Context, accountName, queueName string, messageID string, ...) (*http.Request, error)
- func (client Client) UpdateResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) UpdateSender(req *http.Request) (*http.Response, error)
- type GetInput
- type PutInput
- type QueueMessage
- type QueueMessageResponse
- type QueueMessagesListResult
- type ResourceID
- type StorageQueueMessage
- type UpdateInput
Constants ¶
const APIVersion = "2018-11-09"
APIVersion is the version of the API used for all Storage API Operations
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client is the base client for Messages.
func NewWithEnvironment ¶
func NewWithEnvironment(environment azure.Environment) Client
NewWithEnvironment creates an instance of the Client client.
func (Client) Delete ¶
func (client Client) Delete(ctx context.Context, accountName, queueName, messageID, popReceipt string) (result autorest.Response, err error)
Delete deletes a specific message
func (Client) DeletePreparer ¶
func (client Client) DeletePreparer(ctx context.Context, accountName, queueName, messageID, popReceipt string) (*http.Request, error)
DeletePreparer prepares the Delete request.
func (Client) DeleteResponder ¶
DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.
func (Client) DeleteSender ¶
DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.
func (Client) Get ¶
func (client Client) Get(ctx context.Context, accountName, queueName string, numberOfMessages int, input GetInput) (result QueueMessagesListResult, err error)
Get retrieves one or more messages from the front of the queue
func (Client) GetPreparer ¶
func (client Client) GetPreparer(ctx context.Context, accountName, queueName string, numberOfMessages int, input GetInput) (*http.Request, error)
GetPreparer prepares the Get request.
func (Client) GetResourceID ¶
GetResourceID returns the Resource ID for the given Message within a Queue This can be useful when, for example, you're using this as a unique identifier
func (Client) GetResponder ¶
func (client Client) GetResponder(resp *http.Response) (result QueueMessagesListResult, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (Client) GetSender ¶
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (Client) Peek ¶
func (client Client) Peek(ctx context.Context, accountName, queueName string, numberOfMessages int) (result QueueMessagesListResult, 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) PeekPreparer ¶
func (client Client) PeekPreparer(ctx context.Context, accountName, queueName string, numberOfMessages int) (*http.Request, error)
PeekPreparer prepares the Peek request.
func (Client) PeekResponder ¶
func (client Client) PeekResponder(resp *http.Response) (result QueueMessagesListResult, err error)
PeekResponder handles the response to the Peek request. The method always closes the http.Response Body.
func (Client) PeekSender ¶
PeekSender sends the Peek request. The method will close the http.Response Body if it receives an error.
func (Client) Put ¶
func (client Client) Put(ctx context.Context, accountName, queueName string, input PutInput) (result QueueMessagesListResult, err error)
Put adds a new message to the back of the message queue
func (Client) PutPreparer ¶
func (client Client) PutPreparer(ctx context.Context, accountName, queueName string, input PutInput) (*http.Request, error)
PutPreparer prepares the Put request.
func (Client) PutResponder ¶
func (client Client) PutResponder(resp *http.Response) (result QueueMessagesListResult, err error)
PutResponder handles the response to the Put request. The method always closes the http.Response Body.
func (Client) PutSender ¶
PutSender sends the Put request. The method will close the http.Response Body if it receives an error.
func (Client) Update ¶
func (client Client) Update(ctx context.Context, accountName, queueName string, messageID string, input UpdateInput) (result autorest.Response, err error)
Update updates an existing message based on it's Pop Receipt
func (Client) UpdatePreparer ¶
func (client Client) UpdatePreparer(ctx context.Context, accountName, queueName string, messageID string, input UpdateInput) (*http.Request, error)
UpdatePreparer prepares the Update request.
func (Client) UpdateResponder ¶
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
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 }
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 QueueMessagesListResult ¶
type QueueMessagesListResult struct { autorest.Response QueueMessages *[]QueueMessageResponse `xml:"QueueMessage"` }
type ResourceID ¶
func ParseResourceID ¶ added in v0.2.0
func ParseResourceID(id string) (*ResourceID, error)
ParseResourceID parses the specified Resource ID and returns an object which can be used to interact with the Message within a Queue
type StorageQueueMessage ¶ added in v0.11.0
type StorageQueueMessage interface { Delete(ctx context.Context, accountName, queueName, messageID, popReceipt string) (result autorest.Response, err error) Peek(ctx context.Context, accountName, queueName string, numberOfMessages int) (result QueueMessagesListResult, err error) GetResourceID(accountName, queueName, messageID string) string Put(ctx context.Context, accountName, queueName string, input PutInput) (result QueueMessagesListResult, err error) Get(ctx context.Context, accountName, queueName string, numberOfMessages int, input GetInput) (result QueueMessagesListResult, err error) Update(ctx context.Context, accountName, queueName string, messageID string, input UpdateInput) (result autorest.Response, err 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 }