s3bolt

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func New

func New(bolt *bolt.DB, opts ...Option) *Backend

func NewFile

func NewFile(file string, opts ...Option) (*Backend, error)

func (*Backend) BucketExists

func (db *Backend) BucketExists(_ context.Context, name string) (exists bool, err error)

func (*Backend) CopyObject

func (db *Backend) CopyObject(ctx context.Context, srcBucket, srcKey, dstBucket, dstKey string, meta map[string]string) (result gofakes3.CopyObjectResult, err error)

func (*Backend) CreateBucket

func (db *Backend) CreateBucket(_ context.Context, name string) error

func (*Backend) DeleteBucket

func (db *Backend) DeleteBucket(_ context.Context, name string) error

func (*Backend) DeleteMulti

func (db *Backend) DeleteMulti(_ context.Context, bucketName string, objects ...string) (result gofakes3.MultiDeleteResult, err error)

func (*Backend) DeleteObject

func (db *Backend) DeleteObject(_ context.Context, bucketName, objectName string) (result gofakes3.ObjectDeleteResult, rerr error)

func (*Backend) GetObject

func (db *Backend) GetObject(_ context.Context, bucketName, objectName string, rangeRequest *gofakes3.ObjectRangeRequest) (*gofakes3.Object, error)

func (*Backend) HeadObject

func (db *Backend) HeadObject(ctx context.Context, bucketName, objectName string) (*gofakes3.Object, error)

func (*Backend) ListBucket

func (db *Backend) ListBucket(_ context.Context, name string, prefix *gofakes3.Prefix, page gofakes3.ListBucketPage) (*gofakes3.ObjectList, error)

func (*Backend) ListBuckets

func (db *Backend) ListBuckets(_ context.Context) ([]gofakes3.BucketInfo, error)

func (*Backend) PutObject

func (db *Backend) PutObject(
	ctx context.Context,
	bucketName, objectName string,
	meta map[string]string,
	input io.Reader, size int64,
) (result gofakes3.PutObjectResult, err error)

type Option

type Option func(b *Backend)

func WithTimeSource

func WithTimeSource(timeSource gofakes3.TimeSource) Option

Jump to

Keyboard shortcuts

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