backend

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIncorrectOpenMode = errors.New("disk file or device not open for write")
	ErrNotSuitable       = errors.New("backing file is not suitable")
)

Functions

This section is empty.

Types

type File

type File interface {
	fs.File
	io.ReaderAt
	io.Seeker
	io.Closer
}

type Storage

type Storage interface {
	File
	// OS-specific file for ioctl calls via fd
	Sys() (*os.File, error)
	// file for read-write operations
	Writable() (WritableFile, error)
	// Path returns the path to the underlying storage, if any; returns empty string if not applicable
	Path() string
}

func Sub added in v1.8.0

func Sub(u Storage, offset, size int64) Storage

type SubStorage added in v1.8.0

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

func (SubStorage) Close added in v1.8.0

func (s SubStorage) Close() error

func (SubStorage) Path added in v1.8.0

func (s SubStorage) Path() string

func (SubStorage) Read added in v1.8.0

func (s SubStorage) Read(bytes []byte) (int, error)

func (SubStorage) ReadAt added in v1.8.0

func (s SubStorage) ReadAt(p []byte, off int64) (n int, err error)

func (SubStorage) Seek added in v1.8.0

func (s SubStorage) Seek(offset int64, whence int) (int64, error)

func (SubStorage) Stat added in v1.8.0

func (s SubStorage) Stat() (fs.FileInfo, error)

func (SubStorage) Sys added in v1.8.0

func (s SubStorage) Sys() (*os.File, error)

func (SubStorage) Writable added in v1.8.0

func (s SubStorage) Writable() (WritableFile, error)

type WritableFile

type WritableFile interface {
	File
	io.WriterAt
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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