receiver

package
v0.0.0-...-cd0603c Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func S3Client

func S3Client() *s3.S3

S3Client creates a client from session

func SqsClient

func SqsClient() *sqs.SQS

Types

type S3Handler

type S3Handler struct {
	Service    S3Iface
	BucketName *string
}

S3Handler data for s3 service

func (*S3Handler) DeleteObject

func (h *S3Handler) DeleteObject(key *string) (err error)

DeleteObject from non-versioned bucket

func (*S3Handler) GetObject

func (h *S3Handler) GetObject(key *string) (err error)

GetObject downloads the object

func (*S3Handler) ListObjects

func (h *S3Handler) ListObjects()

ListObjects equals to aws s3 ls

type S3Iface

type S3Iface interface {
	ListObjects(*s3.ListObjectsInput) (*s3.ListObjectsOutput, error)
	DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
	GetObject(*s3.GetObjectInput) (*s3.GetObjectOutput, error)
}

S3Iface defines AWS s3 APIs

type SQSHandler

type SQSHandler struct {
	Service SQSIface
	SQSURL  *string
}

func (*SQSHandler) DeleteMessage

func (h *SQSHandler) DeleteMessage(result *sqs.ReceiveMessageOutput)

DeleteMessage delete message from FIFO queue

func (*SQSHandler) ReceiveMessage

func (h *SQSHandler) ReceiveMessage() (*sqs.ReceiveMessageOutput, error)

ReceiveMessage receive message from FIFO queue

type SQSIface

type SQSIface interface {
	ReceiveMessage(*sqs.ReceiveMessageInput) (*sqs.ReceiveMessageOutput, error)
	DeleteMessage(*sqs.DeleteMessageInput) (*sqs.DeleteMessageOutput, error)
}

Jump to

Keyboard shortcuts

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