Documentation ¶
Index ¶
- func SNSAccessPolicy(topicARN string) (string, error)
- func SQSAccessPolicy(topicARN, queueARN string) (string, error)
- func SQSRedrivePolicy(errorQueueARN string, maxReceiveCount int) (string, error)
- type EnsureSubscriptionRequest
- type EnsureSubscriptionResponse
- type EnsureTopicRequest
- type EnsureTopicResponse
- type SNS
- type SQS
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SNSAccessPolicy ¶
SNSAccessPolicy returns a new sns access policy
func SQSAccessPolicy ¶
SQSAccessPolicy returns a new sqs access policy
Types ¶
type EnsureSubscriptionRequest ¶
type EnsureSubscriptionRequest struct { TopicARN string QueueName string ErrorQueueName string MaxReceiveCount int }
EnsureSubscriptionRequest represents an ensure subscription request
type EnsureSubscriptionResponse ¶
type EnsureSubscriptionResponse struct {
QueueURL string
}
EnsureSubscriptionResponse represents an ensure subscription response
type EnsureTopicRequest ¶
type EnsureTopicRequest struct {
TopicName string
}
EnsureTopicRequest represents an ensure topic request
type EnsureTopicResponse ¶
type EnsureTopicResponse struct {
TopicARN string
}
EnsureTopicResponse represents an ensure topic response
type SNS ¶
type SNS interface { CreateTopic(ctx context.Context, params *sns.CreateTopicInput, optFns ...func(*sns.Options)) (*sns.CreateTopicOutput, error) SetTopicAttributes(ctx context.Context, params *sns.SetTopicAttributesInput, optFns ...func(*sns.Options)) (*sns.SetTopicAttributesOutput, error) Subscribe(ctx context.Context, params *sns.SubscribeInput, optFns ...func(*sns.Options)) (*sns.SubscribeOutput, error) }
SNS represents an sns client interface
type SQS ¶
type SQS interface { CreateQueue(ctx context.Context, params *sqs.CreateQueueInput, optFns ...func(*sqs.Options)) (*sqs.CreateQueueOutput, error) GetQueueAttributes(ctx context.Context, params *sqs.GetQueueAttributesInput, optFns ...func(*sqs.Options)) (*sqs.GetQueueAttributesOutput, error) SetQueueAttributes(ctx context.Context, params *sqs.SetQueueAttributesInput, optFns ...func(*sqs.Options)) (*sqs.SetQueueAttributesOutput, error) }
SQS represents an sqs client interface
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents an sqs/sns queue service
func NewService ¶
NewService returns a new queue service
func (*Service) EnsureSubscription ¶
func (s *Service) EnsureSubscription(ctx context.Context, req EnsureSubscriptionRequest) (EnsureSubscriptionResponse, error)
EnsureSubscription ensures that the specified topic subscription, queue and error queue exist
func (*Service) EnsureTopic ¶
func (s *Service) EnsureTopic(ctx context.Context, req EnsureTopicRequest) (EnsureTopicResponse, error)
EnsureTopic ensures that the specified topic exists