Documentation ¶
Index ¶
- func CheckBucketSize(bucketContents *s3.ListObjectsOutput, expectedContentSize int) bool
- func CheckPrefix(key string, prefix string) bool
- func CleanUpMultiPartUploads(svc *s3.S3, bucket string) error
- func ComputeMD5Sum(filePath string) ([]byte, error)
- func CreateBigFile(pathToBigFile string, size int64) error
- func CreateFile(pathToFile string, contents []byte) error
- func EmptyBucket(svc *s3.S3, bucket string) error
- func FindKeyInBucket(keyToFind string, bucketContents *s3.ListObjectsOutput) bool
- func FindKeysInBucketByPrefix(prefix string, bucketContents *s3.ListObjectsOutput) []string
- func GetKeyType(policy rpolicy.RotationPolicy, keyTime time.Time) string
- func RetrieveSortedKeysByTime(svc *s3.S3, bucket string, prefix string) ([]s3client.BucketEntry, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBucketSize ¶
func CheckBucketSize(bucketContents *s3.ListObjectsOutput, expectedContentSize int) bool
CheckBucketSize returns true if the bucket size is the same as the expected bucket size; else false
func CheckPrefix ¶
CheckPrefix checks if the prefix of a string matches the specified prefix. Returns true if it matches; else false
func CleanUpMultiPartUploads ¶
CleanUpMultiPartUploads is a Helpful function to get rid of all abandoned multipart uploads
func ComputeMD5Sum ¶
ComputeMD5Sum takes the full path of a file and returns the md5sum
func CreateBigFile ¶
CreateBigFile writes a file to disk that consists of null characters
func CreateFile ¶
CreateFile writes the provided byte array to a file on disk
func EmptyBucket ¶
EmptyBucket simply deletes all the objects in the specified bucket
func FindKeyInBucket ¶
func FindKeyInBucket(keyToFind string, bucketContents *s3.ListObjectsOutput) bool
FindKeyInBucket returns true if the specified key exists in the *s3.ListObjectOutput; otherwise false
func FindKeysInBucketByPrefix ¶
func FindKeysInBucketByPrefix(prefix string, bucketContents *s3.ListObjectsOutput) []string
FindKeysInBucketByPrefix will return all the keys that match a prefix in the provided *s3.ListObjectsOutput
func GetKeyType ¶
func GetKeyType(policy rpolicy.RotationPolicy, keyTime time.Time) string
GetKeyType returns the specified key type (_monthly, _weekly, _daily) for a particular time
func RetrieveSortedKeysByTime ¶
func RetrieveSortedKeysByTime(svc *s3.S3, bucket string, prefix string) ([]s3client.BucketEntry, error)
RetrieveSortedKeysByTime is a helper function to get all sorted keys
Types ¶
This section is empty.