backend

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT, MIT Imports: 4 Imported by: 0

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

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

type SubStorage

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

func (SubStorage) Close

func (s SubStorage) Close() error

func (SubStorage) Path

func (s SubStorage) Path() string

func (SubStorage) Read

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

func (SubStorage) ReadAt

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

func (SubStorage) Seek

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

func (SubStorage) Stat

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

func (SubStorage) Sys

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

func (SubStorage) Writable

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