mount

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBinaryPath = "mount"

Variables

This section is empty.

Functions

func List

func List(_ context.Context, filter mountinfo.FilterFunc) ([]*mountinfo.Info, error)

func Mount

func Mount(ctx context.Context, source, target, fsType string, opts []string) error

func NewMountError

func NewMountError(errCode int, errMsg string) error

Types

type MountError

type MountError struct {
	Kind MountErrorKind
	Msg  string
}

func (MountError) Error

func (e MountError) Error() string

type MountErrorKind

type MountErrorKind int
const (
	ErrUnknown                          MountErrorKind = -1
	ErrSuccess                          MountErrorKind = 0
	ErrIncorrectInvocationOrPermissions MountErrorKind = 1
	ErrSystemError                      MountErrorKind = 2
	ErrInternalBug                      MountErrorKind = 4
	ErrUserInterrupt                    MountErrorKind = 8
	ErrProblemsWritingOrLocking         MountErrorKind = 16
	ErrMountFailure                     MountErrorKind = 32
	ErrSomeMountSucceeded               MountErrorKind = 64
)

func NewMountErrorKind

func NewMountErrorKind(errCode int) MountErrorKind

func (MountErrorKind) String

func (k MountErrorKind) String() string

nolint:cyclop

Jump to

Keyboard shortcuts

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