Documentation ¶
Overview ¶
Package s3 provides a number of S3 helper functions.
For example,
// Get the filename from the key. filename := s3.ParseFilenameFromKey(key) // Create the file. file, err := os.Create(filename) if err != nil { panic(err) } defer file.Close() // Download the data. err = s3.Download(file, bucket, key) if err != nil { panic(err) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Download ¶
Download downloads a file from S3.
This is merely a wrapper around the aws-sdk-go downloader. It allows us to isolate the aws-sdk-go dependencies and unify error handling.
func ParseFilenameFromKey ¶
ParseFilenameFromKey parses the S3 filename from the key.
This would typically be used prior to s3.Download or s3.Upload to create the required *os.File.
Types ¶
Click to show internal directories.
Click to hide internal directories.