blob

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS interface {
	FSReader
	FSWriter
}

type FSReader added in v0.25.0

type FSReader interface {
	Open(name string) (fs.ReadDirFile, error)
}

type FSWriter added in v0.25.0

type FSWriter interface {
	Create(name string) (*os.File, error)
	MkdirAll(path string, perm fs.FileMode) error

	Remove(name string) error

	file.RenamerRemover
}

type FilesystemReader added in v0.25.0

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

func NewReadonlyFilesystemStore added in v0.25.0

func NewReadonlyFilesystemStore(path string, fs FSReader) *FilesystemReader

func (*FilesystemReader) Read added in v0.25.0

func (s *FilesystemReader) Read(ctx context.Context, checksum string) ([]byte, error)

type FilesystemStore

type FilesystemStore struct {
	FilesystemReader
	// contains filtered or unexported fields
}

func NewFilesystemStore

func NewFilesystemStore(path string, fs FS) *FilesystemStore

func (*FilesystemStore) Delete

func (s *FilesystemStore) Delete(ctx context.Context, checksum string) error

func (*FilesystemStore) Write

func (s *FilesystemStore) Write(ctx context.Context, checksum string, data []byte) error

Jump to

Keyboard shortcuts

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