s3manager

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewS3

func NewS3() *s3.S3

NewS3 returns a configured S3 client.

func NewS3Downloader

func NewS3Downloader() *s3manager.Downloader

NewS3Downloader returns a configured Downloader client.

func NewS3Uploader

func NewS3Uploader() *s3manager.Uploader

NewS3Uploader returns a configured Uploader client.

Types

type DownloaderAPI

type DownloaderAPI struct {
	Client s3manageriface.DownloaderAPI
}

DownloaderAPI wraps the Downloader API interface.

func (*DownloaderAPI) Download

func (a *DownloaderAPI) Download(ctx aws.Context, bucket, key string) ([]byte, int64, error)

Download is a convenience wrapper for downloading an object from S3.

func (*DownloaderAPI) DownloadAsScanner

func (a *DownloaderAPI) DownloadAsScanner(ctx aws.Context, bucket, key string) (*bufio.Scanner, error)

DownloadAsScanner is a convenience wrapper for downloading an object from S3 as a scanner.

func (*DownloaderAPI) IsEnabled

func (a *DownloaderAPI) IsEnabled() bool

IsEnabled returns true if the client is enabled and ready for use.

func (*DownloaderAPI) Setup

func (a *DownloaderAPI) Setup()

Setup creates a new Downloader client.

type UploaderAPI

type UploaderAPI struct {
	Client s3manageriface.UploaderAPI
}

UploaderAPI wraps the Uploader API interface.

func (*UploaderAPI) IsEnabled

func (a *UploaderAPI) IsEnabled() bool

IsEnabled returns true if the client is enabled and ready for use.

func (*UploaderAPI) Setup

func (a *UploaderAPI) Setup()

Setup creates a new Uploader client.

func (*UploaderAPI) Upload

func (a *UploaderAPI) Upload(ctx aws.Context, buffer []byte, bucket, key string) (*s3manager.UploadOutput, error)

Upload is a convenience wrapper for uploading an object to S3.

Jump to

Keyboard shortcuts

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