system

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IsMountedProvider

type IsMountedProvider interface {
	IsMounted(target string) (bool, error)
}

IsMountedProvider is the interface that wraps the IsMounted method, which can be provided by a system-specific implementation or a mock.

type LinuxProvider

type LinuxProvider struct{}

LinuxProvider encapsulates Linux-specific implementations of system interfaces.

func DefaultProvider

func DefaultProvider() *LinuxProvider

DefaultProvider returns the package-default provider implementation.

func (LinuxProvider) IsMounted

func (s LinuxProvider) IsMounted(target string) (bool, error)

IsMounted checks the target device or directory for mountedness.

func (LinuxProvider) Mount

func (s LinuxProvider) Mount(source, target, fstype string, flags uintptr, data string) error

Mount provides an implementation of Mounter which calls the system implementation.

func (LinuxProvider) Unmount

func (s LinuxProvider) Unmount(target string, flags int) error

Unmount provides an implementation of Unmounter which calls the system implementation.

type MountProvider

type MountProvider interface {
	Mount(source, target, fstype string, flags uintptr, data string) error
}

MountProvider is the interface that wraps the Mount method, which can be provided by a system-specific implementation or a mock.

type UnmountProvider

type UnmountProvider interface {
	Unmount(target string, flags int) error
}

UnmountProvider is the interface that wraps the Unmount method, which can be provided by a system-specific implementation or a mock.

Jump to

Keyboard shortcuts

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