forked from elliotchance/mocksqs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdelete_queue.go
39 lines (30 loc) · 1.21 KB
/
delete_queue.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package mocksqs
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/sqs"
)
// DeleteQueue is fully supported.
func (client *SQS) DeleteQueue(input *sqs.DeleteQueueInput) (*sqs.DeleteQueueOutput, error) {
client.httpRequest()
client.Lock()
defer client.Unlock()
if input.QueueUrl == nil {
return &sqs.DeleteQueueOutput{},
errorMissingField("DeleteQueueInput.QueueUrl")
}
if queue := client.GetQueue(*input.QueueUrl); queue != nil {
client.queues.Delete(*input.QueueUrl)
return &sqs.DeleteQueueOutput{}, nil
}
return &sqs.DeleteQueueOutput{},
errorWithRequestID("AWS.SimpleQueueService.NonExistentQueue: The specified queue does not exist for this wsdl version.")
}
// DeleteQueueWithContext is not implemented. It will panic in all cases.
func (client *SQS) DeleteQueueWithContext(aws.Context, *sqs.DeleteQueueInput, ...request.Option) (*sqs.DeleteQueueOutput, error) {
panic("DeleteQueueWithContext is not implemented")
}
// DeleteQueueRequest is not implemented. It will panic in all cases.
func (client *SQS) DeleteQueueRequest(*sqs.DeleteQueueInput) (*request.Request, *sqs.DeleteQueueOutput) {
panic("DeleteQueueRequest is not implemented")
}