Documentation ¶
Index ¶
- type Details
- type Interface
- type LambdaAPI
- type ReqIDKey
- type Response
- func ErrInternalErrorRes(msg, reqID string) Response
- func ErrInvalidActionRes(msg, reqID string) Response
- func ErrInvalidAttributeNameRes(msg, reqID string) Response
- func ErrInvalidParameterValueRes(msg, reqID string) Response
- func ErrMissingParamRes(msg, reqID string) Response
- func ErrNonExistentQueueRes(reqID string) Response
- func ErrNotImplementedRes(reqID string) Response
- func ErrQueueAlreadyExistsRes(msg, reqID string) Response
- func SuccessRes(res []byte, reqID string) Response
- type ResponseErr
- type SqsAPI
- func (s SqsAPI) CreateQueue(ctx context.Context, params map[string]string, attributes map[string]string) Response
- func (s SqsAPI) DeleteMessage(ctx context.Context, params map[string]string, attributes map[string]string) Response
- func (s SqsAPI) DeleteQueue(ctx context.Context, params map[string]string, attributes map[string]string) Response
- func (s SqsAPI) GetQueueAttributes(ctx context.Context, params map[string]string, attributes map[string]string) Response
- func (s SqsAPI) GetQueueUrl(ctx context.Context, params map[string]string, attributes map[string]string) Response
- func (s SqsAPI) ListDeadLetterSourceQueues(ctx context.Context, params map[string]string, attributes map[string]string) Response
- func (s SqsAPI) ListQueues(ctx context.Context, params map[string]string, attributes map[string]string) Response
- func (s SqsAPI) PurgeQueue(ctx context.Context, params map[string]string, attributes map[string]string) Response
- func (s SqsAPI) ReceiveMessage(ctx context.Context, params map[string]string, attributes map[string]string) Response
- func (s SqsAPI) SendMessage(ctx context.Context, params map[string]string, attributes map[string]string) Response
- func (s SqsAPI) SetQueueAttributes(ctx context.Context, params map[string]string, attributes map[string]string) Response
- type SqsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Details ¶
type Details struct { Code string `xml:"Code,omitempty"` Message string `xml:"Message,omitempty"` RequestID string `xml:"RequestId,omitempty"` Type string `xml:"Type,omitempty"` }
Details contains details of an AWS compatible error.
type Interface ¶
type Interface struct {
// contains filtered or unexported fields
}
Interface represents an AWS API compatible interface.
type LambdaAPI ¶
type LambdaAPI struct {
// contains filtered or unexported fields
}
LambdaAPI is the receiver for all LLambda API methods.
type ReqIDKey ¶
type ReqIDKey struct{}
ReqIDKey is for using as key value pair with the Request ID in the request context.
type Response ¶
type Response struct { // Maps directly to HTTP status codes Status int ReqID string Result []byte // XML Err *ResponseErr }
Response is the result of a call to a service API method.
func ErrInternalErrorRes ¶
ErrInternalErrorRes is for make our life easier when generating internal error results.
func ErrInvalidActionRes ¶
ErrInvalidActionRes generates an InvalidAction error.
func ErrInvalidAttributeNameRes ¶
ErrInvalidAttributeNameRes generates an InvalidAttributeName error.
func ErrInvalidParameterValueRes ¶
ErrInvalidParameterValueRes generates an InvalidParameterValue error.
func ErrMissingParamRes ¶
ErrMissingParamRes is for generating AWS compatible MissingParameter error.
func ErrNonExistentQueueRes ¶
ErrNonExistentQueueRes is for generate a result when the specified queue doesn't exist.
func ErrNotImplementedRes ¶
ErrNotImplementedRes generates our custom error for not implemented actions.
func ErrQueueAlreadyExistsRes ¶
ErrQueueAlreadyExistsRes is for make our life easier when generating QueueAlreadyExists errors.
func SuccessRes ¶
SuccessRes is for make our life easier when generating a success result.
type ResponseErr ¶
type ResponseErr struct {
Details Details `xml:"Error"`
}
ResponseErr is the root of an AWS compatible error response.
func (ResponseErr) Error ¶
func (e ResponseErr) Error() string
type SqsAPI ¶
type SqsAPI struct {
// contains filtered or unexported fields
}
SqsAPI is the receiver for all SQS API methods.
func (SqsAPI) CreateQueue ¶
func (s SqsAPI) CreateQueue( ctx context.Context, params map[string]string, attributes map[string]string, ) Response
CreateQueue creates a new queue.
func (SqsAPI) DeleteMessage ¶
func (s SqsAPI) DeleteMessage( ctx context.Context, params map[string]string, attributes map[string]string, ) Response
DeleteMessage deletes a message with the given receipt handle on the specified queue.
func (SqsAPI) DeleteQueue ¶
func (s SqsAPI) DeleteQueue( ctx context.Context, params map[string]string, attributes map[string]string, ) Response
DeleteQueue deletes the specified queue on this instance.
func (SqsAPI) GetQueueAttributes ¶
func (s SqsAPI) GetQueueAttributes( ctx context.Context, params map[string]string, attributes map[string]string, ) Response
GetQueueAttributes returns the requested attributes of an specified queue.
func (SqsAPI) GetQueueUrl ¶
func (s SqsAPI) GetQueueUrl( ctx context.Context, params map[string]string, attributes map[string]string, ) Response
GetQueueUrl returns the URL of an existing Amazon SQS queue.
func (SqsAPI) ListDeadLetterSourceQueues ¶
func (s SqsAPI) ListDeadLetterSourceQueues( ctx context.Context, params map[string]string, attributes map[string]string, ) Response
ListDeadLetterSourceQueues Returns a list of your queues that have the RedrivePolicy queue attribute configured with a dead-letter queue.
func (SqsAPI) ListQueues ¶
func (s SqsAPI) ListQueues( ctx context.Context, params map[string]string, attributes map[string]string, ) Response
ListQueues return a datastructs of existing queues on this instance.
func (SqsAPI) PurgeQueue ¶
func (s SqsAPI) PurgeQueue( ctx context.Context, params map[string]string, attributes map[string]string, ) Response
PurgeQueue deletes the messages in a queue specified by the QueueURL parameter.
func (SqsAPI) ReceiveMessage ¶
func (s SqsAPI) ReceiveMessage( ctx context.Context, params map[string]string, attributes map[string]string, ) Response
ReceiveMessage return a datastructs of messages from the specified queue.
type SqsResult ¶
type SqsResult struct { // varies depending on the action. For CreateQueue is just a string containing // the newly created queue's URL, for GetQueueAttributes is a map with queue's attributes Data interface{} Err error // extra data to be used by some errors like custom messages ErrData interface{} }
SqsResult contains the result of any request to LSQS.