fs

package
v0.0.0-...-3d809f4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 10 Imported by: 2

README

Filesystem Storage Backend

The filesystem backend provides support for the local filesystem.

Configuration

To use the filesystem backend, you need to specify the following option in your connection string:

  • workingDir: The directory path on your filesystem.

A connection string for the filesystem backend looks like this:

fs:///path/to/dir

Replace /path/to/dir with the actual path to your working directory.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts Options) (types.Storage, error)

Types

type Backend

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

func (*Backend) AbortMultipartUploadWithContext

func (fs *Backend) AbortMultipartUploadWithContext(ctx context.Context, path, uploadID string) error

func (*Backend) CompleteMultipartUploadWithContext

func (fs *Backend) CompleteMultipartUploadWithContext(ctx context.Context, path, uploadID string, completedParts []*types.CompletedPart) error

func (*Backend) DeleteWithContext

func (fs *Backend) DeleteWithContext(ctx context.Context, path string) error

func (*Backend) InitiateMultipartUploadWithContext

func (fs *Backend) InitiateMultipartUploadWithContext(ctx context.Context, path string) (string, error)

func (*Backend) ListWithContext

func (fs *Backend) ListWithContext(ctx context.Context, prefix string) (*[]types.Object, error)

func (*Backend) MoveToBucketWithContext

func (fs *Backend) MoveToBucketWithContext(ctx context.Context, srcPath, dstPath, dstBucket string) error

func (*Backend) MoveWithContext

func (fs *Backend) MoveWithContext(ctx context.Context, fromPath string, toPath string) error

func (*Backend) ReadWithContext

func (fs *Backend) ReadWithContext(ctx context.Context, path string, start int64, end int64) (io.ReadCloser, error)

func (*Backend) StatWithContext

func (fs *Backend) StatWithContext(ctx context.Context, path string) (*types.Object, error)

func (*Backend) WriteMultipartWithContext

func (fs *Backend) WriteMultipartWithContext(ctx context.Context, path, uploadID string, partNumber int64, reader io.ReadSeeker, size int64) (int64, *types.CompletedPart, error)

func (*Backend) WriteWithContext

func (fs *Backend) WriteWithContext(ctx context.Context, path string, reader io.Reader, size int64) (int64, error)

type Options

type Options struct {
	WorkingDir string
}

Jump to

Keyboard shortcuts

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