Versions in this module Expand all Collapse all v1 v1.1.3 Sep 5, 2021 v1.1.2 Sep 5, 2021 Changes in this version + func AvailableDatasetNames() ([]string, error) + func NewZFSForFilePath(path string) (ZFS, Dataset, error) + type Dataset struct + Avail uint64 + MountPoint fs.DirHandle + Name string + Refer uint64 + Used uint64 + func (self *Dataset) CloneSnapshot(snapName, fsName string, flags []string) error + func (self *Dataset) CreateSnapshot(name string) (string, error) + func (self *Dataset) DestroySnapshot(name string, flags []string) error + func (self *Dataset) RenameSnapshot(oldName, newName string) error + func (self *Dataset) RollbackSnapshot(name string, flags []string) error + func (self *Dataset) ScanSnapshots() (Snapshots, error) + type Datasets []Dataset + func (ds Datasets) Root() *Dataset + type ExecZFSError struct + func (self ExecZFSError) Error() string + type ExecutableNotFound struct + func (self ExecutableNotFound) Error() string + type Snapshot struct + Created time.Time + FullName string + MountPoint fs.DirHandle + Name string + func (s *Snapshot) IsMounted() (bool, error) + type Snapshots []Snapshot + func (s *Snapshots) Filter(f func(Snapshot) bool) Snapshots + func (s Snapshots) Reverse() Snapshots + type SortByPathDesc Datasets + func (s SortByPathDesc) Len() int + func (s SortByPathDesc) Less(i, j int) bool + func (s SortByPathDesc) Swap(i, j int) + type Stderr = string + type Stdout = string + type ZFS struct + func NewZFS(name string) (ZFS, error) + func (self *ZFS) Datasets() Datasets + func (self *ZFS) FindDatasetByName(name string) (Dataset, error) + func (self *ZFS) FindDatasetForPath(path string) (Dataset, error) + func (self *ZFS) MountSnapshot(snap Snapshot) error + func (self *ZFS) Name() string + func (self *ZFS) RescanDatasets() error + func (self *ZFS) ScanDatasets() (Datasets, error) + type ZFSCmd interface + Exec func(string, ...string) (Stdout, Stderr, error) + func NewZFSCmd(useSudo bool) ZFSCmd + func NewZFSCmdMock(stdout Stdout, stderr Stderr, err error) ZFSCmd