s3util

package
v0.0.0-...-46fd052 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package s3util provides shared helpers for interacting with S3-compatible object stores via the minio-go client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBucket

func CheckBucket(ctx context.Context, client *minio.Client, bucket string) error

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

func DeletePrefixObjects(ctx context.Context, client *minio.Client, bucket, prefix string) error

DeletePrefixObjects deletes all objects in a bucket under a given prefix.

func EnsureBucket

func EnsureBucket(ctx context.Context, client *minio.Client, bucket, region string) error

EnsureBucket creates the bucket if it does not already exist.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true when the error is an S3 "not found" response (NoSuchKey or NoSuchBucket).

func WrapNotFound

func WrapNotFound(err error) error

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.

Jump to

Keyboard shortcuts

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