model

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainTxId = "00000000-0000-0000-0000-000000000000"
)

Variables

View Source
var (
	ErrInvalidFileFormat = errors.New("invalid file format")
)

Functions

func GetTxId added in v1.0.0

func GetTxId(ctx context.Context) string

func StoreTxId added in v1.0.0

func StoreTxId(ctx context.Context, txId string) context.Context

Types

type ContentFile added in v1.0.0

type ContentFile struct {
	Id     string
	Parent string
}

func (*ContentFile) Path added in v1.1.0

func (f *ContentFile) Path() string

type Dir

type Dir struct {
	Name  string
	Root  string
	Count uint64
	Free  uint64
}

func ParseDir added in v1.1.0

func ParseDir(dirPath string) Dir

func (*Dir) Path added in v1.1.0

func (d *Dir) Path() string

type Dirs added in v1.1.0

type Dirs []Dir

func (Dirs) Iterate added in v1.1.0

func (ds Dirs) Iterate(r *rand.Rand) iter.Seq2[Dir, bool]

type File

type File struct {
	Key       string
	TxId      string
	ContentId string
	Seq       sequence.Seq
}

func (File) Latest added in v1.1.0

func (f File) Latest(o File) File

type FileFilter added in v1.0.0

type FileFilter struct {
	TxId      *string
	BeforeSeq *sequence.Seq
}

type NotEnoughSpaceError added in v1.1.0

type NotEnoughSpaceError struct {
	Err error

	Start  io.ReadCloser
	Middle io.Reader
	End    io.Reader
}

func (NotEnoughSpaceError) Close added in v1.1.0

func (e NotEnoughSpaceError) Close() error

func (NotEnoughSpaceError) Error added in v1.1.0

func (e NotEnoughSpaceError) Error() string

func (NotEnoughSpaceError) Reader added in v1.1.0

func (e NotEnoughSpaceError) Reader() io.Reader

func (NotEnoughSpaceError) Unwrap added in v1.1.0

func (e NotEnoughSpaceError) Unwrap() error

type Root

type Root struct {
	Path  string
	Count uint64
}

type Stat

type Stat struct {
	Path  string
	Total uint64
	Free  uint64
	Used  uint64
}

type Transaction added in v1.0.0

type Transaction struct {
	Id       string
	IsoLevel TxIsoLevel
	Seq      sequence.Seq
}

type TxIsoLevel added in v1.0.0

type TxIsoLevel uint8

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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