Documentation ¶
Index ¶
Constants ¶
View Source
const ( B = 1 //BYTE KB = 1024 * B //KILOBYTE MB = 1000 * KB //MEGABYTE GB = 1000 * MB //GIGABYTE )
BYTES
Variables ¶
This section is empty.
Functions ¶
func NewDownloader ¶
func NewDownloader(svc *s3.S3) *s3manager.Downloader
NewDownloader creates a download manager from the S3 Client and is then customized to chunk downloads by 50MB/chunk
Types ¶
type FileManager ¶
type FileManager struct {
// contains filtered or unexported fields
}
FileManager handles it all
func NewWithClient ¶
func NewWithClient(svc *s3.S3) *FileManager
NewWithClient creates a file manager from an s3 client
func NewWithRecord ¶
func NewWithRecord(record events.S3EventRecord) *FileManager
NewWithRecord creates a file manager from the s3 event record
func (*FileManager) DownloadToFile ¶
DownloadToFile downloads from S3 to memfile
func (*FileManager) PrimeFile ¶
func (fm *FileManager) PrimeFile(bucket, key string) (*mem.File, error)
PrimeFile returns file with buffer of size ContentLength
func (*FileManager) UploadFile ¶
func (fm *FileManager) UploadFile(bucket, key string, fp *mem.File) error
UploadFile uploads files to S3
Click to show internal directories.
Click to hide internal directories.