package s3

import "github.com/Luzilla/acronis-s3-usage/pkg/s3"

Package s3 simulates an administrative interface for people who maintain ostor this package wraps around ostor and minio/minio-go to executes calls on behalf of accounts in the system. This is achieved by returning an account's credential pair and using it for calls. It requires that an account has one. You can call the key management features in the ostor CLI to achieve that or use the user methods in the ostor package to achieve the same.

Index

Types

type S3

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

S3 wraps the s3 client to provide shorthands for common ops.

func NewS3

func NewS3(endpointURL, email string, ostorClient *ostor.Ostor) (*S3, error)

NewS3 creates an S3 handler which is specific to the provided email.

func (*S3) DeleteBucket

func (s *S3) DeleteBucket(ctx context.Context, bucketName string) error

DeleteBucket does a recursive delete on all objects within a bucket to empty it, before deleting it.

func (*S3) IsDeletable

func (s *S3) IsDeletable(ctx context.Context, bucketName string) (status bool, err error)

IsDeletable determines if a bucket exists and if is empty

func (*S3) ListContents

func (s *S3) ListContents(ctx context.Context, bucketName string) <-chan minio.ObjectInfo

ListContents (recursively) lists the contents of a bucket and returns a channel to "range" on.

Source Files

s3.go

Version
v0.8.0 (latest)
Published
Mar 12, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
2 days ago

Tools for package owners.