Documentation ¶
Index ¶
- type Helper
- func (u *Helper) GetAcctId() (*string, error)
- func (u *Helper) GetSqs(name string) (*string, map[string]*string, error)
- func (u *Helper) GetSqsAllowAllPolicy(queue string) string
- func (u *Helper) GetTopic(name string) (*string, error)
- func (u *Helper) SetupSnsSqsSubscription(topic, sub string) (*string, error)
- func (u *Helper) SubscribeToTopic(in *SubscribeToTopicInput) (*sns.SubscribeOutput, error)
- type LengthySubscriber
- type Option
- type SqsMessageCallback
- type SubscribeToTopicInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
func (*Helper) GetSqsAllowAllPolicy ¶
GetSqsAllowAllPolicy returns a policy that can be used when creating an SQS queue that allow all SQS actions for everybody.
func (*Helper) GetTopic ¶
GetTopic returns the ARN of a newly created topic or an existing one. CreateTopic API returns the ARN of an existing topic.
func (*Helper) SetupSnsSqsSubscription ¶
SetupSnsSqsSubscription creates a subscription of sub to topic. It returns topic's ARN along with error.
func (*Helper) SubscribeToTopic ¶
func (u *Helper) SubscribeToTopic(in *SubscribeToTopicInput) (*sns.SubscribeOutput, error)
SubscribeToTopic creates the queue, or use an existing queue, and subscribe to the provided SNS topic.
type LengthySubscriber ¶
type LengthySubscriber struct {
// contains filtered or unexported fields
}
func NewLengthySubscriber ¶
func NewLengthySubscriber(ctx interface{}, queue string, callback SqsMessageCallback, o ...Option) *LengthySubscriber
NewLengthySubscriber creates a lengthy subscriber object for SQS.
type Option ¶
type Option interface {
Apply(*LengthySubscriber)
}
func WithAccessKeyId ¶
WithAccessKeyId sets the access key id option.
func WithFatalOnQueueError ¶
WithFatalOnQueueError sets the function to crash when queue error.
func WithLogger ¶
WithLogger sets the logger option. Can be silenced by setting v to:
log.New(ioutil.Discard, "", 0)
func WithNoExtend ¶
WithNoExtend sets the flag to not extend the visibility timeout.
func WithRoleArn ¶
WithRoleArn sets the role arn option to assume to.
func WithSecretAccessKey ¶
WithSecretAccessKey sets the secret access key option.