Documentation
¶
Overview ¶
Package s3util provides shared helpers for interacting with S3-compatible object stores via the minio-go client.
Index ¶
- func CheckBucket(ctx context.Context, client *minio.Client, bucket string) error
- func DeleteObjects(ctx context.Context, client *minio.Client, bucket string, objNames []string) error
- func DeletePrefixObjects(ctx context.Context, client *minio.Client, bucket, prefix string) error
- func EnsureBucket(ctx context.Context, client *minio.Client, bucket, region string) error
- func IsNotFound(err error) bool
- func WrapNotFound(err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBucket ¶
CheckBucket verifies access without listing or creating buckets, within 30 seconds.
func DeleteObjects ¶
func DeleteObjects(ctx context.Context, client *minio.Client, bucket string, objNames []string) error
DeleteObjects deletes a list of named objects from a bucket.
func DeletePrefixObjects ¶
DeletePrefixObjects deletes all objects in a bucket under a given prefix.
func EnsureBucket ¶
EnsureBucket creates the bucket if it does not already exist.
func IsNotFound ¶
IsNotFound returns true when the error is an S3 "not found" response (NoSuchKey or NoSuchBucket).
func WrapNotFound ¶
WrapNotFound converts S3 not-found errors to os.ErrNotExist and sanitizes other S3 errors to avoid leaking internal bucket/key details.
Types ¶
This section is empty.