Documentation
¶
Index ¶
- Constants
- Variables
- func HasFIFOQueueName(queueName string) bool
- type Attribute
- type BatchResultErrorEntry
- type ChangeMessageVisibilityResult
- type ConfirmSubscriptionResponse
- type CreateQueueResponse
- type CreateQueueResult
- type CreateTopicResponse
- type CreateTopicResult
- type DeleteMessageBatchResponse
- type DeleteMessageBatchResult
- type DeleteMessageBatchResultEntry
- type DeleteMessageResponse
- type DeleteTopicResponse
- type EnvQueue
- type EnvQueueAttributes
- type EnvSubsciption
- type EnvTopic
- type Environment
- type ErrorResponse
- type ErrorResult
- type FilterPolicy
- type GetQueueAttributesResponse
- type GetQueueAttributesResult
- type GetQueueUrlResponse
- type GetQueueUrlResult
- type GetSubscriptionAttributesResponse
- type GetSubscriptionAttributesResult
- type ListQueuesResponse
- type ListQueuesResult
- type ListSubscriptionsByTopicResponse
- type ListSubscriptionsByTopicResult
- type ListSubscriptionsResponse
- type ListSubscriptionsResult
- type ListTopicsResponse
- type ListTopicsResult
- type Message
- type MessageAttributeValue
- type MessageStructure
- type MsgAttr
- type Protocol
- type PublishResponse
- type PublishResult
- type PurgeQueueResponse
- type Queue
- type ReceiveMessageResponse
- type ReceiveMessageResult
- type ResponseMetadata
- type ResultAttribute
- type ResultMessage
- type ResultMessageAttribute
- type ResultMessageAttributeValue
- type SNSMessage
- type SendMessageBatchResponse
- type SendMessageBatchResult
- type SendMessageBatchResultEntry
- type SendMessageResponse
- type SendMessageResult
- type SetQueueAttributesResponse
- type SetSubscriptionAttributesResponse
- type SnsErrorType
- type SqsErrorType
- type SubscribeResponse
- type SubscribeResult
- type Subscription
- type SubscriptionAttributeEntry
- type SubscriptionAttributes
- type Topic
- type TopicArnResult
- type TopicMemberResult
- type TopicNamestype
- type TopicSubscriptions
- type UnsubscribeResponse
Constants ¶
View Source
const (
ErrNoDefaultElementInJSON = "Invalid parameter: Message Structure - No default entry in JSON message body"
)
Predefined errors
Variables ¶
View Source
var SnsErrors map[string]SnsErrorType
View Source
var SqsErrors map[string]SqsErrorType
Functions ¶
func HasFIFOQueueName ¶
Types ¶
type BatchResultErrorEntry ¶
type ChangeMessageVisibilityResult ¶
type ChangeMessageVisibilityResult struct {
Xmlns string `xml:"xmlns,attr"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type ConfirmSubscriptionResponse ¶
type ConfirmSubscriptionResponse struct {
Xmlns string `xml:"xmlns,attr"`
Result SubscribeResult `xml:"ConfirmSubscriptionResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
** ConfirmSubscriptionResponse **
type CreateQueueResponse ¶
type CreateQueueResponse struct {
Xmlns string `xml:"xmlns,attr"`
Result CreateQueueResult `xml:"CreateQueueResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type CreateQueueResult ¶
type CreateQueueResult struct {
QueueUrl string `xml:"QueueUrl"`
}
** Create Queue Response
type CreateTopicResponse ¶
type CreateTopicResponse struct {
Xmlns string `xml:"xmlns,attr"`
Result CreateTopicResult `xml:"CreateTopicResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type CreateTopicResult ¶
type CreateTopicResult struct {
TopicArn string `xml:"TopicArn"`
}
** Create Topic Response
type DeleteMessageBatchResponse ¶
type DeleteMessageBatchResponse struct {
Xmlns string `xml:"xmlns,attr,omitempty"`
Result DeleteMessageBatchResult `xml:"DeleteMessageBatchResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata,omitempty"`
}
** Delete Message Batch Response
type DeleteMessageBatchResult ¶
type DeleteMessageBatchResult struct {
Entry []DeleteMessageBatchResultEntry `xml:"DeleteMessageBatchResultEntry"`
Error []BatchResultErrorEntry `xml:"BatchResultErrorEntry,omitempty"`
}
type DeleteMessageBatchResultEntry ¶
type DeleteMessageBatchResultEntry struct {
Id string `xml:"Id"`
}
type DeleteMessageResponse ¶
type DeleteMessageResponse struct {
Xmlns string `xml:"xmlns,attr,omitempty"`
Metadata ResponseMetadata `xml:"ResponseMetadata,omitempty"`
}
** Delete Message Response
type DeleteTopicResponse ¶
type DeleteTopicResponse struct {
Xmlns string `xml:"xmlns,attr"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
** Delete Topic **
type EnvQueueAttributes ¶
type EnvSubsciption ¶
** config **
type EnvTopic ¶
type EnvTopic struct {
Name string
Subscriptions []EnvSubsciption
}
type Environment ¶
type Environment struct {
Host string
Port string
SqsPort string
SnsPort string
Region string
AccountID string
LogMessages bool
LogFile string
Topics []EnvTopic
Queues []EnvQueue
QueueAttributeDefaults EnvQueueAttributes
}
var CurrentEnvironment Environment
type ErrorResponse ¶
type ErrorResponse struct {
Result ErrorResult `xml:"Error"`
}
type ErrorResult ¶
type ErrorResult struct {
Type string `xml:"Type,omitempty"`
Code string `xml:"Code,omitempty"`
Message string `xml:"Message,omitempty"`
RequestId string `xml:"RequestId,omitempty"`
}
** Error Responses **
type FilterPolicy ¶
only simple "ExactMatch" string policy is supported at the moment
func (*FilterPolicy) IsSatisfiedBy ¶
func (fp *FilterPolicy) IsSatisfiedBy(msgAttrs map[string]MessageAttributeValue) bool
Function checks if MessageAttributes passed to Topic satisfy FilterPolicy set by subscription
type GetQueueAttributesResponse ¶
type GetQueueAttributesResponse struct {
Xmlns string `xml:"xmlns,attr,omitempty"`
Result GetQueueAttributesResult `xml:"GetQueueAttributesResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata,omitempty"`
}
type GetQueueAttributesResult ¶
type GetQueueAttributesResult struct {
/* VisibilityTimeout, DelaySeconds, ReceiveMessageWaitTimeSeconds, ApproximateNumberOfMessages
ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, QueueArn */
Attrs []Attribute `xml:"Attribute,omitempty"`
}
type GetQueueUrlResponse ¶
type GetQueueUrlResponse struct {
Xmlns string `xml:"xmlns,attr,omitempty"`
Result GetQueueUrlResult `xml:"GetQueueUrlResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata,omitempty"`
}
type GetQueueUrlResult ¶
type GetQueueUrlResult struct {
QueueUrl string `xml:"QueueUrl,omitempty"`
}
** Get Queue Url Response
type GetSubscriptionAttributesResponse ¶
type GetSubscriptionAttributesResponse struct {
Xmlns string `xml:"xmlns,attr,omitempty"`
Result GetSubscriptionAttributesResult `xml:"GetSubscriptionAttributesResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata,omitempty"`
}
type GetSubscriptionAttributesResult ¶
type GetSubscriptionAttributesResult struct {
SubscriptionAttributes SubscriptionAttributes `xml:"Attributes,omitempty"`
}
** Get Subscription Attributes **
type ListQueuesResponse ¶
type ListQueuesResponse struct {
Xmlns string `xml:"xmlns,attr"`
Result ListQueuesResult `xml:"ListQueuesResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type ListQueuesResult ¶
type ListQueuesResult struct {
QueueUrl []string `xml:"QueueUrl"`
}
** List Queues Response
type ListSubscriptionsByTopicResponse ¶
type ListSubscriptionsByTopicResponse struct {
Xmlns string `xml:"xmlns,attr"`
Result ListSubscriptionsResult `xml:"ListSubscriptionsResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type ListSubscriptionsByTopicResult ¶
type ListSubscriptionsByTopicResult struct {
Subscriptions TopicSubscriptions `xml:"Subscriptions"`
}
type ListSubscriptionsResponse ¶
type ListSubscriptionsResponse struct {
Xmlns string `xml:"xmlns,attr"`
Result ListSubscriptionsResult `xml:"ListSubscriptionsResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type ListSubscriptionsResult ¶
type ListSubscriptionsResult struct {
Subscriptions TopicSubscriptions `xml:"Subscriptions"`
}
type ListTopicsResponse ¶
type ListTopicsResponse struct {
Xmlns string `xml:"xmlns,attr"`
Result ListTopicsResult `xml:"ListTopicsResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type ListTopicsResult ¶
type ListTopicsResult struct {
Topics TopicNamestype `xml:"Topics"`
}
type MessageAttributeValue ¶
type MessageStructure ¶
type MessageStructure string
const (
MessageStructureJSON MessageStructure = "json"
)
type PublishResponse ¶
type PublishResponse struct {
Xmlns string `xml:"xmlns,attr"`
Result PublishResult `xml:"PublishResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type PublishResult ¶
type PublishResult struct {
MessageId string `xml:"MessageId"`
}
type PurgeQueueResponse ¶
type PurgeQueueResponse struct {
Xmlns string `xml:"xmlns,attr,omitempty"`
Metadata ResponseMetadata `xml:"ResponseMetadata,omitempty"`
}
** Purge Queue Response
type Queue ¶
type Queue struct {
Name string
URL string
Arn string
TimeoutSecs int
ReceiveWaitTimeSecs int
Messages []Message
DeadLetterQueue *Queue
MaxReceiveCount int
IsFIFO bool
FIFOMessages map[string]int
FIFOSequenceNumbers map[string]int
}
func (*Queue) NextSequenceNumber ¶
func (*Queue) UnlockGroup ¶
type ReceiveMessageResponse ¶
type ReceiveMessageResponse struct {
Xmlns string `xml:"xmlns,attr"`
Result ReceiveMessageResult `xml:"ReceiveMessageResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type ReceiveMessageResult ¶
type ReceiveMessageResult struct {
Message []*ResultMessage `xml:"Message,omitempty"`
}
type ResponseMetadata ¶
type ResponseMetadata struct {
RequestId string `xml:"RequestId"`
}
** Common **
type ResultAttribute ¶
type ResultMessage ¶
type ResultMessage struct {
MessageId string `xml:"MessageId,omitempty"`
ReceiptHandle string `xml:"ReceiptHandle,omitempty"`
MD5OfBody string `xml:"MD5OfBody,omitempty"`
Body []byte `xml:"Body,omitempty"`
MD5OfMessageAttributes string `xml:"MD5OfMessageAttributes,omitempty"`
MessageAttributes []*ResultMessageAttribute `xml:"MessageAttribute,omitempty"`
Attributes []*ResultAttribute `xml:"Attribute,omitempty"`
}
type ResultMessageAttribute ¶
type ResultMessageAttribute struct {
Name string `xml:"Name,omitempty"`
Value *ResultMessageAttributeValue `xml:"Value,omitempty"`
}
type SNSMessage ¶
type SNSMessage struct {
Type string
Token string `json:"Token",omitempty`
MessageId string
TopicArn string
Subject string
Message string
Timestamp string
SignatureVersion string
Signature string `json:"Signature",omitempty`
SigningCertURL string
UnsubscribeURL string
SubscribeURL string `json:"SubscribeURL",omitempty`
MessageAttributes map[string]MsgAttr `json:"MessageAttributes",omitempty`
}
type SendMessageBatchResponse ¶
type SendMessageBatchResponse struct {
Xmlns string `xml:"xmlns,attr,omitempty"`
Result SendMessageBatchResult `xml:"SendMessageBatchResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata,omitempty"`
}
** Delete Message Batch Response
type SendMessageBatchResult ¶
type SendMessageBatchResult struct {
Entry []SendMessageBatchResultEntry `xml:"SendMessageBatchResultEntry"`
Error []BatchResultErrorEntry `xml:"BatchResultErrorEntry,omitempty"`
}
type SendMessageResponse ¶
type SendMessageResponse struct {
Xmlns string `xml:"xmlns,attr"`
Result SendMessageResult `xml:"SendMessageResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type SendMessageResult ¶
type SetQueueAttributesResponse ¶
type SetQueueAttributesResponse struct {
Xmlns string `xml:"xmlns,attr,omitempty"`
Metadata ResponseMetadata `xml:"ResponseMetadata,omitempty"`
}
type SetSubscriptionAttributesResponse ¶
type SetSubscriptionAttributesResponse struct {
Xmlns string `xml:"xmlns,attr"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type SnsErrorType ¶
type SqsErrorType ¶
func (*SqsErrorType) Error ¶
func (s *SqsErrorType) Error() string
type SubscribeResponse ¶
type SubscribeResponse struct {
Xmlns string `xml:"xmlns,attr"`
Result SubscribeResult `xml:"SubscribeResult"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
type SubscribeResult ¶
type SubscribeResult struct {
SubscriptionArn string `xml:"SubscriptionArn"`
}
** Create Subscription **
type Subscription ¶
type SubscriptionAttributes ¶
type SubscriptionAttributes struct {
/* SubscriptionArn, FilterPolicy */
Entries []SubscriptionAttributeEntry `xml:"entry,omitempty"`
}
type Topic ¶
type Topic struct {
Name string
Arn string
Subscriptions []*Subscription
}
type TopicArnResult ¶
type TopicArnResult struct {
TopicArn string `xml:"TopicArn"`
}
** List Topics Response
type TopicMemberResult ¶
type TopicMemberResult struct {
TopicArn string `xml:"TopicArn"`
Protocol string `xml:"Protocol"`
SubscriptionArn string `xml:"SubscriptionArn"`
Owner string `xml:"Owner"`
Endpoint string `xml:"Endpoint"`
}
** List Subscriptions Response
type TopicNamestype ¶
type TopicNamestype struct {
Member []TopicArnResult `xml:"member"`
}
type TopicSubscriptions ¶
type TopicSubscriptions struct {
Member []TopicMemberResult `xml:"member"`
}
type UnsubscribeResponse ¶
type UnsubscribeResponse struct {
Xmlns string `xml:"xmlns,attr"`
Metadata ResponseMetadata `xml:"ResponseMetadata"`
}
** Unsubscribe **
Click to show internal directories.
Click to hide internal directories.