fuse

package
v0.0.0-...-53483ec Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	OwnerIsRoot      bool
	Hosts            []string
	Tags             []restic.TagList
	Paths            []string
	SnapshotTemplate string
}

Config holds settings for the fuse mount.

type HostsDir

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

HostsDir is a fuse directory which contains hosts.

func NewHostsDir

func NewHostsDir(root *Root, inode uint64) *HostsDir

NewHostsDir returns a new directory containing host names

func (*HostsDir) Attr

func (d *HostsDir) Attr(ctx context.Context, attr *fuse.Attr) error

Attr returns the attributes for the HostsDir.

func (*HostsDir) Lookup

func (d *HostsDir) Lookup(ctx context.Context, name string) (fs.Node, error)

Lookup returns a specific entry from the HostsDir.

func (*HostsDir) ReadDirAll

func (d *HostsDir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

ReadDirAll returns all entries of the HostsDir.

type MetaDir

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

MetaDir is a fuse directory which contains other directories.

func NewMetaDir

func NewMetaDir(root *Root, inode uint64, entries map[string]fs.Node) *MetaDir

NewMetaDir returns a new meta dir.

func (*MetaDir) Attr

func (d *MetaDir) Attr(ctx context.Context, attr *fuse.Attr) error

Attr returns the attributes for the root node.

func (*MetaDir) Lookup

func (d *MetaDir) Lookup(ctx context.Context, name string) (fs.Node, error)

Lookup returns a specific entry from the root node.

func (*MetaDir) ReadDirAll

func (d *MetaDir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

ReadDirAll returns all entries of the root node.

type Root

type Root struct {
	*MetaDir
	// contains filtered or unexported fields
}

Root is the root node of the fuse mount of a repository.

func NewRoot

func NewRoot(repo restic.Repository, cfg Config) *Root

NewRoot initializes a new root node from a repository.

func (*Root) Root

func (r *Root) Root() (fs.Node, error)

Root is just there to satisfy fs.Root, it returns itself.

type SnapshotsDir

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

SnapshotsDir is a fuse directory which contains snapshots named by timestamp.

func NewSnapshotsDir

func NewSnapshotsDir(root *Root, inode uint64, tag string, host string) *SnapshotsDir

NewSnapshotsDir returns a new directory containing snapshots.

func (*SnapshotsDir) Attr

func (d *SnapshotsDir) Attr(ctx context.Context, attr *fuse.Attr) error

Attr returns the attributes for the root node.

func (*SnapshotsDir) Lookup

func (d *SnapshotsDir) Lookup(ctx context.Context, name string) (fs.Node, error)

Lookup returns a specific entry from the SnapshotsDir.

func (*SnapshotsDir) ReadDirAll

func (d *SnapshotsDir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

ReadDirAll returns all entries of the SnapshotsDir.

type SnapshotsIDSDir

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

SnapshotsIDSDir is a fuse directory which contains snapshots named by ids.

func NewSnapshotsIDSDir

func NewSnapshotsIDSDir(root *Root, inode uint64) *SnapshotsIDSDir

NewSnapshotsIDSDir returns a new directory containing snapshots named by ids.

func (*SnapshotsIDSDir) Attr

func (d *SnapshotsIDSDir) Attr(ctx context.Context, attr *fuse.Attr) error

Attr returns the attributes for the SnapshotsDir.

func (*SnapshotsIDSDir) Lookup

func (d *SnapshotsIDSDir) Lookup(ctx context.Context, name string) (fs.Node, error)

Lookup returns a specific entry from the SnapshotsIDSDir.

func (*SnapshotsIDSDir) ReadDirAll

func (d *SnapshotsIDSDir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

ReadDirAll returns all entries of the SnapshotsIDSDir.

type TagsDir

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

TagsDir is a fuse directory which contains tags.

func NewTagsDir

func NewTagsDir(root *Root, inode uint64) *TagsDir

NewTagsDir returns a new directory containing tag names

func (*TagsDir) Attr

func (d *TagsDir) Attr(ctx context.Context, attr *fuse.Attr) error

Attr returns the attributes for the TagsDir.

func (*TagsDir) Lookup

func (d *TagsDir) Lookup(ctx context.Context, name string) (fs.Node, error)

Lookup returns a specific entry from the TagsDir.

func (*TagsDir) ReadDirAll

func (d *TagsDir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

ReadDirAll returns all entries of the TagsDir.

Jump to

Keyboard shortcuts

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