S3utils

package
v0.0.102 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var S3Client *s3.Client = nil

Functions

func CopyObject added in v0.0.36

func CopyObject(bucketSource, bucketTarget, keySource, keyTarget string) error

func DeleteObject added in v0.0.48

func DeleteObject(bucket, key string) error

func DeleteObjects added in v0.0.98

func DeleteObjects(data map[string][]string) error

DeleteObjects is delegated to remove the given data (value -> []string) from the given bucket (key -> string)

func GetAfterDate added in v0.0.76

func GetAfterDate(bucket, prefix string, date time.Time) ([]types.Object, error)

FIXME: Use a list of string as prefix

func GetBetweenDate added in v0.0.93

func GetBetweenDate(bucket, prefix string, start, stop time.Time) ([]string, error)

func GetObject

func GetObject(bucket, fileName string) ([]byte, error)

func HeadObject added in v0.0.74

func HeadObject(bucket, key string) (*s3.HeadObjectOutput, error)

func IsDifferent added in v0.0.55

func IsDifferent(bucket_base, bucket_target, key_base, key_target string) bool

func IsDifferentLegacy added in v0.0.74

func IsDifferentLegacy(bucket_base, bucket_target, key_base, key_target string) bool

func ListBucketObjects added in v0.0.74

func ListBucketObjects(bucket, prefix string) ([]string, error)

ListBucketObjects is delegated to list all the objects (name only) in the given bucket. Prefix is optional. The result is return ordered by the last modified

func ListBucketObjectsDetails added in v0.0.76

func ListBucketObjectsDetails(bucket, prefix string) ([]types.Object, error)

ListBucketObjectsDetails is delegated to list all the objects (details) in the given bucket. Prefix is optional. The result is return ordered by the last modified

func Move added in v0.0.96

func Move(bucket, filename, targetName string) error

func ObjectExists added in v0.0.36

func ObjectExists(bucket, key string) bool

func ParseS3Path added in v0.0.98

func ParseS3Path(p string) (string, string)

ParseS3Path is delegated to return bucket name and filename of a given s3 path

func PutObject

func PutObject(bucket, filename string, data []byte) error

func PutObjectStream added in v0.0.39

func PutObjectStream(bucket, filename string, stream io.ReadCloser, contentType, encoding, md5 *string) error

func SyncAfterDate added in v0.0.93

func SyncAfterDate(bucket, prefix, localPath string, date time.Time) error

func SyncBucket added in v0.0.37

func SyncBucket(bucket, prefix string, bucketsTarget ...string) ([]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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