erisfs

package
v0.0.0-...-bc42473 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CBORTag = 1701996916

	// This package only supports version 1 of ERIS-FS.
	Version = 1

	FileKind = 0
	ExecKind = 1
	LinkKind = 2
)

Variables

This section is empty.

Functions

func Encode

func Encode(store eris.Store, secret *eris.Secret, index *Index) (indexSize int, cap eris.ReadCapability, err error)

func Load

func Load(store eris.Store, cap eris.ReadCapability, cb LoadFunc) (err error)

Types

type Entry

type Entry struct {
	Cap          eris.ReadCapability
	Path, Target string
	Kind         uint8
}

type ErisFS

type ErisFS interface {
	fs.FS
	fs.ReadDirFS
	fs.StatFS
	fs.SubFS
}

func LoadFS

func LoadFS(store eris.Store, cap eris.ReadCapability) (ErisFS, error)

type FileEntry

type FileEntry struct {

	// Kind must be 0 or 1!
	Kind uint8
	Cap  eris.ReadCapability
	// contains filtered or unexported fields
}

type Index

type Index struct {

	// Set Version to 1!
	Version uint8
	// Paths mapped to entries.
	Entries map[string]interface{}
	// contains filtered or unexported fields
}

The type of version 1 of ERIS-FS format.

func CreateIndex

func CreateIndex(store eris.Store, secret *eris.Secret, linkMode LinkMode, sourcePaths []string) (index *Index, err error)

type LinkEntry

type LinkEntry struct {

	// Kind must be 2!
	Kind   uint8
	Target string
	// contains filtered or unexported fields
}

type LinkMode

type LinkMode int
const (
	DereferenceLinks LinkMode = iota
	VerbatimLinks
)

type LoadFunc

type LoadFunc func(entry *Entry) error

type Node

type Node interface {
	fs.DirEntry
	fs.FileInfo
	fs.FS
}

Node represent a file, link or directory in an ERIS-FS tree.

Jump to

Keyboard shortcuts

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