s3upload

package
v0.0.0-...-7529ad9 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3UploadHelper

type S3UploadHelper struct {
	S3client *s3.S3
	Uploader *s3manager.Uploader
}

func NewUploader

func NewUploader(profileName, AWSRegion string) *S3UploadHelper

func (*S3UploadHelper) FileExists

func (u *S3UploadHelper) FileExists(destKey string, fileInfo fs.FileInfo, s3ObjectMap map[string]*s3.Object) bool

func (*S3UploadHelper) ListFiles

func (u *S3UploadHelper) ListFiles(bucket, prefix string) (map[string]*s3.Object, error)

TODO: add paging for more that 1000 files only returns the files in the root folder

func (*S3UploadHelper) UploadFile

func (u *S3UploadHelper) UploadFile(srcPath string,
	destKey string,
	bucketName string,
	gzipFile bool,
	storageClass string) (string, error)

TODO: Add storage class

Jump to

Keyboard shortcuts

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