s3manager

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

package s3manager provides methods and functions for downloading and uploading objects in AWS S3.

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, dst io.WriterAt) (int64, error)

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

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, bucket, key string, src io.Reader) (*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