s3mem

package
v0.0.0-...-4b38c65 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 13 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(opts ...Option) *Backend

func (*Backend) BucketExists

func (db *Backend) BucketExists(name string) (exists bool, err error)

func (*Backend) CopyObject

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

func (*Backend) CreateBucket

func (db *Backend) CreateBucket(name string) error

func (*Backend) DeleteBucket

func (db *Backend) DeleteBucket(name string) error

func (*Backend) DeleteMulti

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

func (*Backend) DeleteObject

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

func (*Backend) DeleteObjectVersion

func (db *Backend) DeleteObjectVersion(bucketName, objectName string, versionID gofakes3.VersionID) (result gofakes3.ObjectDeleteResult, rerr error)

func (*Backend) GetObject

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

func (*Backend) GetObjectVersion

func (db *Backend) GetObjectVersion(
	bucketName, objectName string,
	versionID gofakes3.VersionID,
	rangeRequest *gofakes3.ObjectRangeRequest) (*gofakes3.Object, error)

func (*Backend) HeadObject

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

func (*Backend) HeadObjectVersion

func (db *Backend) HeadObjectVersion(bucketName, objectName string, versionID gofakes3.VersionID) (*gofakes3.Object, error)

func (*Backend) ListBucket

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

func (*Backend) ListBucketVersions

func (db *Backend) ListBucketVersions(
	bucketName string,
	prefix *gofakes3.Prefix,
	page *gofakes3.ListBucketVersionsPage,
) (*gofakes3.ListBucketVersionsResult, error)

func (*Backend) ListBuckets

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

func (*Backend) PutObject

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

func (*Backend) SetVersioningConfiguration

func (db *Backend) SetVersioningConfiguration(bucketName string, v gofakes3.VersioningConfiguration) error

func (*Backend) VersioningConfiguration

func (db *Backend) VersioningConfiguration(bucketName string) (versioning gofakes3.VersioningConfiguration, rerr error)

type Option

type Option func(b *Backend)

func WithTimeSource

func WithTimeSource(timeSource gofakes3.TimeSource) Option

func WithVersionSeed

func WithVersionSeed(seed int64) Option

Jump to

Keyboard shortcuts

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