s3

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Store

func Store() objectstore.ObjectStore

Store is a singleton for plug and play usage

Types

type S3ObjectStore

type S3ObjectStore struct {
	// contains filtered or unexported fields
}

S3ObjectStore defines object store for aws s3

func New

func New() *S3ObjectStore

New Creates a new S3 Store

func (*S3ObjectStore) AddFile

func (store *S3ObjectStore) AddFile(bucket, fileName string, src io.Reader) (*objectstore.UploadResult, error)

AddFile will upload a single file to S3, it will require a pre-built aws session and will set file info like content type and encryption on the uploaded file.

func (*S3ObjectStore) AddImage

func (store *S3ObjectStore) AddImage(bucket, fileName string, src io.Reader) (*objectstore.UploadResult, error)

AddImage will upload a single image to S3, it will require a pre-built aws session and will set file info like content type and encryption on the uploaded file.

func (*S3ObjectStore) DeleteFile

func (store *S3ObjectStore) DeleteFile(bucket, fileName string) error

DeleteFile will delete a file from S3, it will require a pre-built aws session and will set file info like content type and encryption on the uploaded file.

func (*S3ObjectStore) DownloadFile

func (store *S3ObjectStore) DownloadFile(bucket, fileName string, file io.WriterAt) (int64, error)

DownloadFile will download a file from S3, it will require a pre-built aws session and will set file info like content type and encryption on the uploaded file.

Jump to

Keyboard shortcuts

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