s3

package
v0.0.0-...-e5dfa8b Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package s3 defines a service for calling into the S3 client that the AWS SDK exposes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3ManagerUploader

type S3ManagerUploader interface {
	Upload(
		input *s3manager.UploadInput,
		options ...func(*s3manager.Uploader),
	) (*s3manager.UploadOutput, error)
}

S3ManagerUploader knows how to use the AWS S3 SDK to upload files. This more narrow interface definition replaces the dependency on the `s3manager.Uploader` concrete type, and aids primarily in defining simple test doubles

type S3Uploader

type S3Uploader interface {
	Upload(path string, key string) error
}

S3Uploader uploads files to AWS S3

func NewS3Uploader

func NewS3Uploader(
	s3UploadManager S3ManagerUploader,
	toBucket string,
	logger *logrus.Logger,
) S3Uploader

NewS3Uploader creates a new uploader service for a given destination bucket in AWS S3

Jump to

Keyboard shortcuts

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