Documentation
¶
Index ¶
- func AbortAllMultiPartUploads(svc *s3.S3, bucket string, key string, uploadId string) error
- func CreateS3Client(credFile string, profile string, region string) (*s3.S3, error)
- func DeleteKey(svc *s3.S3, bucket string, key string) (string, error)
- func GetAllMultiPartUploads(svc *s3.S3, bucket string) (map[string]string, error)
- func GetBucketContents(svc *s3.S3, bucket string) (*s3.ListObjectsOutput, error)
- func GetCountMultiPartsById(svc *s3.S3, bucket string, key string, uploadId string) (int64, error)
- func GetKeysByPrefix(svc *s3.S3, bucket string, prefix string) (map[string]time.Time, error)
- func GetMultiPartUploadIDByKey(svc *s3.S3, bucket string, key string) (string, error)
- type BucketEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbortAllMultiPartUploads ¶
AbortAllMultiPartUploads aborts all current multipart uploads in the S3 bucket
func CreateS3Client ¶
CreateS3Client creates an S3 client using environment variables if present; else AWS creds file 2. Use the specified credential file
func GetAllMultiPartUploads ¶
GetAllMultiPartUploads returns all of the multipart uploads that currently exist in the S3 bucket
func GetBucketContents ¶
GetBucketContents returns the entire contents of the specified bucket
func GetCountMultiPartsById ¶
GetCountMultiPartsById returns the total number of multiupload parts That exist in a S3 bucket given a key and and UploadId
func GetKeysByPrefix ¶
GetKeysByPrefix returns a map of keys in the bucket along with the LastModified attribute The map consists of Map[AWS Bucket Key] -> LastModifiedTime
Types ¶
type BucketEntry ¶
BucketEntry represents an object which exists in S3
func SortKeysByTime ¶
func SortKeysByTime(keys map[string]time.Time) []BucketEntry
SortKeysByTime sorts the bucket keys by the last modified time and Returns a bucket entry array with the newest values first