Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSession ¶
NewSession creates an AWS session. Credentials loaded from SDK default credential chain: 1. Environment 2. Shared credentials (~/.aws/credentials) 3. EC2 instance role
Types ¶
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
S3 handle simple S3 methods
func (*S3) GetReadCloser ¶
func (s *S3) GetReadCloser(o *S3Object) (io.ReadCloser, error)
GetReadCloser returns a io.ReadCloser to be readed (and then closed) by another method.
type S3Object ¶
S3Object represents an object on S3
func NewS3Object ¶
NewS3Object creates a new S3 object
func NewS3ObjectFromURI ¶
NewS3ObjectFromURI creates a new S3 object from a URI with format: s3://bucket/path
type S3ObjectWithOriginal ¶
S3ObjectWithOriginal represents an object on S3 and includes information from original
func NewS3ObjectWithOriginal ¶
func NewS3ObjectWithOriginal(bucket string, original *s3.Object) *S3ObjectWithOriginal
NewS3ObjectWithOriginal creates a new S3 object which includes the original obtained from AWS
type SQS ¶
type SQS struct {
// contains filtered or unexported fields
}
SQS handle simple SQS queue functions used by a consumer
func NewSQS ¶
NewSQS is a construct function for creating the object with session and url of the queue as arguments
func (*SQS) DeleteMessage ¶
DeleteMessage deletes a message from queue
func (*SQS) ReceiveMessages ¶
ReceiveMessages receives messages from queue and executes message handler for each message Returns the number of messages received and error (if any) Fields present per message:
Body: "{jsonbody}" MD5OfBody: "1212f7afeed9f2bff8e8ee2b4f81020a"
MessageId: "b872e5af-be32-4a67-82d5-87f062937c8a" ReceiptHandle: "base64encodedstring" Returns an integer with the number of messages received, a boolean indicating that more possible available messages are present on the queue, and the error (if any)
type SQSMessage ¶
SQSMessage SQS message
func (*SQSMessage) VerifyMD5Sum ¶
func (sm *SQSMessage) VerifyMD5Sum() bool
VerifyMD5Sum returns true if MD5 passed on message corresponds with the one obtained from body.
type SQSMessageS3Event ¶
type SQSMessageS3Event struct {
// contains filtered or unexported fields
}
SQSMessageS3Event SQS message providing from an S3 event
func NewSQSMessageS3Event ¶
func NewSQSMessageS3Event(sqsMessage *SQSMessage) *SQSMessageS3Event
NewSQSMessageS3Event creates a new SQS message from S3 event based on an SQS message
func (*SQSMessageS3Event) ExtractNewObjects ¶
func (s *SQSMessageS3Event) ExtractNewObjects(mh func(*S3Object) error) (uint64, error)
ExtractNewObjects extracts those new S3 objects present on an SQS message Returns the number of new S3 objects extracted