storagefs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package storagefs implements fs.Storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func New

func New(root string) (*Storage, error)

func (*Storage) AbortMultipartUpload

func (s *Storage) AbortMultipartUpload(_ context.Context, _, _, uploadID string) error

func (*Storage) BucketExists

func (s *Storage) BucketExists(_ context.Context, bucket string) (bool, error)

func (*Storage) CreateBucket

func (s *Storage) CreateBucket(ctx context.Context, bucket string) error

func (*Storage) CreateMultipartUpload

func (s *Storage) CreateMultipartUpload(_ context.Context, bucket, key string) (*fs.MultipartUpload, error)

func (*Storage) DeleteBucket

func (s *Storage) DeleteBucket(ctx context.Context, bucket string) error

DeleteBucket deletes the specified bucket.

NB: bucket is already sanitized.

func (*Storage) DeleteObject

func (s *Storage) DeleteObject(ctx context.Context, bucket, key string) error

DeleteObject deletes the specified object from the bucket.

NB: bucket and key are already sanitized.

func (*Storage) GetObject

func (s *Storage) GetObject(ctx context.Context, bucket, key string) (*fs.GetObjectResponse, error)

func (*Storage) ListBuckets

func (s *Storage) ListBuckets(ctx context.Context) ([]fs.Bucket, error)

func (*Storage) ListObjects

func (s *Storage) ListObjects(ctx context.Context, bucket, prefix string) ([]fs.Object, error)

ListObjects lists all objects in bucket by prefix.

NB: bucket and prefix are already sanitized.

func (*Storage) PutObject

func (s *Storage) PutObject(ctx context.Context, req *fs.PutObjectRequest) error

func (*Storage) UploadPart

func (s *Storage) UploadPart(_ context.Context, req *fs.UploadPartRequest) (*fs.Part, error)

Jump to

Keyboard shortcuts

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