sources

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2020 License: AGPL-3.0, Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmSubscription

func ConfirmSubscription(notification *SnsNotification) (err error)

ConfirmSubscription will confirm the SNS->SQS subscription

func ReadSQSMessages

func ReadSQSMessages(messages []events.SQSMessage) (result []*common.DataStream, err error)

ReadSQSMessages reads incoming messages containing SNS notifications and returns a slice of DataStream items

Types

type S3ObjectInfo

type S3ObjectInfo struct {
	S3Bucket    string
	S3ObjectKey string
}

S3ObjectInfo contains information about the S3 object

func ParseNotification

func ParseNotification(message string) ([]*S3ObjectInfo, error)

ParseNotification parses a message received

type SnsNotification

type SnsNotification struct {
	events.SNSEntity
	Token *string `json:"Token"`
}

SnsNotification struct represents an SNS message arriving to Panther SQS from a customer account. The message can either be of type 'Notification' or 'SubscriptionConfirmation' Since there is no AWS SDK-provided struct to represent both types we had to create this custom type to include fields from both types.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL