-
Notifications
You must be signed in to change notification settings - Fork 3
/
sqs_type.go
114 lines (92 loc) · 3.53 KB
/
sqs_type.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
package response_type
import "encoding/xml"
const (
XmlHeader string = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
XmlNs string = "http://www.w3.org/2001/XMLSchema-instance"
)
type SqsErrorResponse struct {
// <?xml version="1.0"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Type>Sender</Type><Code>AccessDenied</Code><Message>Access to the resource https://queue.amazonaws.com/ is denied.</Message><Detail/></Error><RequestId>be0bc434-dd62-5a29-bb07-91a3a84796c2</RequestId></ErrorResponse>
XMLName xml.Name `xml:"ErrorResponse"`
XmlNS string `xml:"xmlns,attr"`
Error *SqsError `xml:"Error"`
RequestId *string `xml:"RequestId"`
}
type SqsError struct {
Type string `xml:"Type"`
Code string `xml:"Code"`
Message string `xml:"Message"`
}
type ListQueuesResponse struct {
XMLName xml.Name `xml:"ListQueuesResponse"`
XmlNS string `xml:"xmlns,attr"`
ListQueuesResult QueueUrls `xml:"ListQueuesResult"`
}
type QueueUrls struct {
QueueUrl []string `xml:"QueueUrl"`
}
type CreateQueueResponse struct {
XMLName xml.Name `xml:"CreateQueueResponse"`
XmlNS string `xml:"xmlns,attr"`
CreateQueueResult QueueUrls `xml:"CreateQueueResult"`
}
type PurgeQueueResponse struct {
XMLName xml.Name `xml:"PurgeQueueResponse"`
}
type DeleteQueueResponse struct {
XMLName xml.Name `xml:"DeleteQueueResponse"`
}
type SendMessageResponse struct {
XMLName xml.Name `xml:"SendMessageResponse"`
XmlNS string `xml:"xmlns,attr"`
SendMessageResult SendMessageResult `xml:"SendMessageResult"`
}
type SendMessageResult struct {
MD5OfMessageBody *string `xml:"MD5OfMessageBody"`
MD5OfMessageAttributes *string `xml:"MD5OfMessageAttributes"`
MessageId *string `xml:"MessageId"`
}
type ReceiveMessageResponse struct {
XMLName xml.Name `xml:"ReceiveMessageResponse"`
XmlNS string `xml:"xmlns,attr"`
ReceiveMessageResult ReceiveMessageResult `xml:"ReceiveMessageResult"`
}
type ReceiveMessageResult struct {
Message []SqsMessage `xml:"Message"`
}
type SqsMessage struct {
MessageId *string `xml:"MessageId"`
ReceiptHandle *string `xml:"ReceiptHandle"`
MD5OfBody *string `xml:"MD5OfBody"`
Body *string `xml:"Body"`
Attributes []SqsAttribute `xml:"Attribute"`
}
type SqsAttribute struct {
Name string `xml:"Name"`
Value string `xml:"Value"`
}
type DeleteMessageResponse struct {
XMLName xml.Name `xml:"DeleteMessageResponse"`
}
type DeleteMessageBatchResponse struct {
XMLName xml.Name `xml:"DeleteMessageBatchResponse"`
DeleteMessageBatchResult DeleteMessageBatchResult `xml:"DeleteMessageBatchResult"`
}
type DeleteMessageBatchResult struct {
DeleteMessageBatchResultEntry []DeleteMessageBatchResultEntry `xml:"DeleteMessageBatchResultEntry"`
}
type DeleteMessageBatchResultEntry struct {
Id *string `xml:"Id"`
}
type SendMessageBatchResponse struct {
XMLName xml.Name `xml:"SendMessageBatchResponse"`
SendMessageBatchResult SendMessageBatchResult `xml:"SendMessageBatchResult"`
}
type SendMessageBatchResult struct {
Entries []SendMessageBatchResultEntry `xml:"SendMessageBatchResultEntry"`
}
type SendMessageBatchResultEntry struct {
Id *string `xml:"Id"`
MessageId *string `xml:"MessageId"`
MD5OfMessageBody *string `xml:"MD5OfMessageBody"`
MD5OfMessageAttributes *string `xml:"MD5OfMessageAttributes"`
}