mount

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCorruptedMnt

func IsCorruptedMnt(err error) bool

func NewFakeMounter

func NewFakeMounter() *mount.FakeMounter

NewFakeMounter returns fake mounter instance

func NewFakeSafeFormatAndMounter

func NewFakeSafeFormatAndMounter() *mount.SafeFormatAndMount

NewFakeSafeFormatAndMounter returns base Fake mounter instance

Types

type IMount

type IMount interface {
	GetBaseMounter() *mount.SafeFormatAndMount
	ScanForAttach(devicePath string) error
	GetDevicePath(volumeID string) (string, error)
	IsLikelyNotMountPointAttach(targetpath string) (bool, error)
	IsLikelyNotMountPointDetach(targetpath string) (bool, error)
	UnmountPath(mountPath string) error
	GetInstanceID() (string, error)
	MakeFile(pathname string) error
	MakeDir(pathname string) error
}
var MInstance IMount = nil

func GetMountProvider

func GetMountProvider() (IMount, error)

type Mount

type Mount struct {
}

func (*Mount) GetBaseMounter

func (m *Mount) GetBaseMounter() *mount.SafeFormatAndMount

GetBaseMounter returns instance of SafeFormatAndMount

func (*Mount) GetDevicePath

func (m *Mount) GetDevicePath(volumeID string) (string, error)

GetDevicePath returns the path of an attached block storage volume, specified by its id.

func (*Mount) GetInstanceID

func (m *Mount) GetInstanceID() (string, error)

GetInstanceID from file

func (*Mount) IsLikelyNotMountPointAttach

func (m *Mount) IsLikelyNotMountPointAttach(targetpath string) (bool, error)

IsLikelyNotMountPointAttach

func (*Mount) IsLikelyNotMountPointDetach

func (m *Mount) IsLikelyNotMountPointDetach(targetpath string) (bool, error)

IsLikelyNotMountPointDetach

func (*Mount) MakeDir

func (m *Mount) MakeDir(pathname string) error

MakeDir creates dir

func (*Mount) MakeFile

func (m *Mount) MakeFile(pathname string) error

MakeFile creates an empty file

func (*Mount) ScanForAttach

func (m *Mount) ScanForAttach(devicePath string) error

ScanForAttach

func (*Mount) UnmountPath

func (m *Mount) UnmountPath(mountPath string) error

UnmountPath

type MountMock

type MountMock struct {
	mock.Mock
}

MountMock is an autogenerated mock type for the IMount type ORIGINALLY GENERATED BY mockery with hand edits

func (*MountMock) GetBaseMounter

func (_m *MountMock) GetBaseMounter() *mount.SafeFormatAndMount

GetBaseMounter provides a mock function

func (*MountMock) GetDevicePath

func (_m *MountMock) GetDevicePath(volumeID string) (string, error)

GetDevicePath provides a mock function with given fields: volumeID

func (*MountMock) GetInstanceID

func (_m *MountMock) GetInstanceID() (string, error)

GetInstanceID provides a mock function with given fields:

func (*MountMock) IsLikelyNotMountPointAttach

func (_m *MountMock) IsLikelyNotMountPointAttach(targetpath string) (bool, error)

IsLikelyNotMountPointAttach provides a mock function with given fields: targetpath

func (*MountMock) IsLikelyNotMountPointDetach

func (_m *MountMock) IsLikelyNotMountPointDetach(targetpath string) (bool, error)

IsLikelyNotMountPointDetach provides a mock function with given fields: targetpath

func (*MountMock) MakeDir

func (_m *MountMock) MakeDir(pathname string) error

func (*MountMock) MakeFile

func (_m *MountMock) MakeFile(pathname string) error

MakeFile creates an empty file

func (*MountMock) ScanForAttach

func (_m *MountMock) ScanForAttach(devicePath string) error

ScanForAttach provides a mock function with given fields: devicePath

func (*MountMock) UnmountPath

func (_m *MountMock) UnmountPath(mountPath string) error

UnmountPath provides a mock function with given fields: mountPath

Jump to

Keyboard shortcuts

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