s3

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpClient

func NewHttpClient() aws.HTTPClient

Types

type S3Client

type S3Client struct {
	// contains filtered or unexported fields
}

S3Client provides methods to interact with S3-compatible storage.

func NewS3Client

func NewS3Client(ctx context.Context, endpoint, region, accessKeyID, secretKey string) (*S3Client, error)

NewS3Client creates a new S3Client with the provided credentials.

func (*S3Client) ListBuckets

func (c *S3Client) ListBuckets(ctx context.Context) ([]*models.S3Bucket, error)

ListBuckets lists all S3 buckets in the configured account.

func (*S3Client) ProbeAnyBucketRW

func (c *S3Client) ProbeAnyBucketRW(ctx context.Context) error

ProbeAnyBucketRW tries to write + read a probe object in the first bucket the credentials can see. If every step succeeds it returns nil. All SDK errors are normalised via mapS3Error so callers get the domain-specific errors they expect.

func (*S3Client) ProbeBucketRW

func (c *S3Client) ProbeBucketRW(ctx context.Context, bucket string) error

probeBucketRW writes → heads → deletes a tiny object in one bucket.

Jump to

Keyboard shortcuts

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