fs

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 8 Imported by: 1

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(opt Options) (*Backend, error)

func (*Backend) Delete added in v0.2.0

func (b *Backend) Delete(ctx context.Context, name string) error

func (*Backend) List

func (b *Backend) List(ctx context.Context, prefix string) (simpleblob.BlobList, error)

func (*Backend) Load

func (b *Backend) Load(ctx context.Context, name string) ([]byte, error)

func (*Backend) NewReader added in v0.3.0

func (b *Backend) NewReader(ctx context.Context, name string) (io.ReadCloser, error)

NewReader provides an optimized way to read from named file.

func (*Backend) NewWriter added in v0.3.0

func (b *Backend) NewWriter(ctx context.Context, name string) (io.WriteCloser, error)

NewWriter provides an optimized way to write to a file.

func (*Backend) Store

func (b *Backend) Store(ctx context.Context, name string, data []byte) error

type Options

type Options struct {
	RootPath string `yaml:"root_path"`
}

Options describes the storage options for the fs backend

Jump to

Keyboard shortcuts

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