Documentation ¶
Index ¶
- type MockWrapDataDiscover
- type MockWrapFS
- func (m *MockWrapFS) CreateFS(fsType fs.FileSystem, device string) error
- func (m *MockWrapFS) DeviceFs(device string) (string, error)
- func (m *MockWrapFS) FindMountPoint(target string) (string, error)
- func (m *MockWrapFS) GetFSSpace(src string) (int64, error)
- func (m *MockWrapFS) GetFSType(device string) (fs.FileSystem, error)
- func (m *MockWrapFS) IsMounted(src string) (bool, error)
- func (m *MockWrapFS) MkDir(src string) error
- func (m *MockWrapFS) MkFile(src string) error
- func (m *MockWrapFS) Mount(src, dst string, opts ...string) error
- func (m *MockWrapFS) RmDir(src string) error
- func (m *MockWrapFS) Unmount(src string) error
- func (m *MockWrapFS) WipeFS(device string) error
- type MockWrapLVM
- func (m *MockWrapLVM) ExpandLV(lvName string, requiredSize int64) error
- func (m *MockWrapLVM) GetAllPVs() ([]string, error)
- func (m *MockWrapLVM) GetLVsInVG(vgName string) ([]string, error)
- func (m *MockWrapLVM) GetVGNameByPVName(pvName string) (string, error)
- func (m *MockWrapLVM) GetVgFreeSpace(vgName string) (int64, error)
- func (m *MockWrapLVM) IsVGContainsLVs(vgName string) bool
- func (m *MockWrapLVM) LVCreate(name, size, vgName string) error
- func (m *MockWrapLVM) LVRemove(fullLVName string) error
- func (m *MockWrapLVM) PVCreate(dev string) error
- func (m *MockWrapLVM) PVRemove(name string) error
- func (m *MockWrapLVM) RemoveOrphanPVs() error
- func (m *MockWrapLVM) VGCreate(name string, pvs ...string) error
- func (m *MockWrapLVM) VGRemove(name string) error
- type MockWrapLsblk
- type MockWrapLsscsi
- type MockWrapNvmecli
- type MockWrapPartition
- func (m *MockWrapPartition) CreatePartition(device, label string) (err error)
- func (m *MockWrapPartition) CreatePartitionTable(device, partTableType string) (err error)
- func (m *MockWrapPartition) DeletePartition(device, partNum string) (err error)
- func (m *MockWrapPartition) DeviceHasPartitionTable(device string) (bool, error)
- func (m *MockWrapPartition) DeviceHasPartitions(device, serialNumber string) (bool, error)
- func (m *MockWrapPartition) GetPartitionNameByUUID(device, partUUID string) (string, error)
- func (m *MockWrapPartition) GetPartitionTableType(device string) (ptType string, err error)
- func (m *MockWrapPartition) GetPartitionUUID(device, partNum string) (string, error)
- func (m *MockWrapPartition) IsPartitionExists(device, partNum string) (exists bool, err error)
- func (m *MockWrapPartition) SetPartitionUUID(device, partNum, partUUID string) error
- func (m *MockWrapPartition) SyncPartitionTable(device string) error
- type MockWrapSmartctl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockWrapDataDiscover ¶
MockWrapDataDiscover is a mock implementation of WrapDataDiscover interface from datadiscover package
func (*MockWrapDataDiscover) DiscoverData ¶
func (m *MockWrapDataDiscover) DiscoverData(device, serialNumber string) (*types.DiscoverResult, error)
DiscoverData is a mock implementations
type MockWrapFS ¶
MockWrapFS is a mock implementation of WrapFS interface from fs package
func (*MockWrapFS) CreateFS ¶
func (m *MockWrapFS) CreateFS(fsType fs.FileSystem, device string) error
CreateFS is a mock implementations
func (*MockWrapFS) DeviceFs ¶
func (m *MockWrapFS) DeviceFs(device string) (string, error)
DeviceFs is a mock implementations
func (*MockWrapFS) FindMountPoint ¶
func (m *MockWrapFS) FindMountPoint(target string) (string, error)
FindMountPoint is a mock implementations
func (*MockWrapFS) GetFSSpace ¶
func (m *MockWrapFS) GetFSSpace(src string) (int64, error)
GetFSSpace is a mock implementations
func (*MockWrapFS) GetFSType ¶
func (m *MockWrapFS) GetFSType(device string) (fs.FileSystem, error)
GetFSType is a mock implementations
func (*MockWrapFS) IsMounted ¶
func (m *MockWrapFS) IsMounted(src string) (bool, error)
IsMounted is a mock implementations
func (*MockWrapFS) MkDir ¶
func (m *MockWrapFS) MkDir(src string) error
MkDir is a mock implementations
func (*MockWrapFS) MkFile ¶
func (m *MockWrapFS) MkFile(src string) error
MkFile is a mock implementations
func (*MockWrapFS) Mount ¶
func (m *MockWrapFS) Mount(src, dst string, opts ...string) error
Mount is a mock implementations
func (*MockWrapFS) RmDir ¶
func (m *MockWrapFS) RmDir(src string) error
RmDir is a mock implementations
func (*MockWrapFS) Unmount ¶
func (m *MockWrapFS) Unmount(src string) error
Unmount is a mock implementations
func (*MockWrapFS) WipeFS ¶
func (m *MockWrapFS) WipeFS(device string) error
WipeFS is a mock implementations
type MockWrapLVM ¶
MockWrapLVM is a mock implementation of WrapLVM interface from lvm package
func (*MockWrapLVM) ExpandLV ¶
func (m *MockWrapLVM) ExpandLV(lvName string, requiredSize int64) error
ExpandLV is a mock implementations
func (*MockWrapLVM) GetAllPVs ¶
func (m *MockWrapLVM) GetAllPVs() ([]string, error)
GetAllPVs is a mock implementations
func (*MockWrapLVM) GetLVsInVG ¶
func (m *MockWrapLVM) GetLVsInVG(vgName string) ([]string, error)
GetLVsInVG is a mock implementations
func (*MockWrapLVM) GetVGNameByPVName ¶
func (m *MockWrapLVM) GetVGNameByPVName(pvName string) (string, error)
GetVGNameByPVName is a mock implementations
func (*MockWrapLVM) GetVgFreeSpace ¶
func (m *MockWrapLVM) GetVgFreeSpace(vgName string) (int64, error)
GetVgFreeSpace is a mock implementations
func (*MockWrapLVM) IsVGContainsLVs ¶
func (m *MockWrapLVM) IsVGContainsLVs(vgName string) bool
IsVGContainsLVs is a mock implementations
func (*MockWrapLVM) LVCreate ¶
func (m *MockWrapLVM) LVCreate(name, size, vgName string) error
LVCreate is a mock implementations
func (*MockWrapLVM) LVRemove ¶
func (m *MockWrapLVM) LVRemove(fullLVName string) error
LVRemove is a mock implementations
func (*MockWrapLVM) PVCreate ¶
func (m *MockWrapLVM) PVCreate(dev string) error
PVCreate is a mock implementations
func (*MockWrapLVM) PVRemove ¶
func (m *MockWrapLVM) PVRemove(name string) error
PVRemove is a mock implementations
func (*MockWrapLVM) RemoveOrphanPVs ¶
func (m *MockWrapLVM) RemoveOrphanPVs() error
RemoveOrphanPVs is a mock implementations
func (*MockWrapLVM) VGCreate ¶
func (m *MockWrapLVM) VGCreate(name string, pvs ...string) error
VGCreate is a mock implementations
func (*MockWrapLVM) VGRemove ¶
func (m *MockWrapLVM) VGRemove(name string) error
VGRemove is a mock implementations
type MockWrapLsblk ¶
MockWrapLsblk is a mock implementation of WrapLsblk interface from lsblk package
func GetMockWrapLsblk ¶
func GetMockWrapLsblk(everytimePath string) *MockWrapLsblk
GetMockWrapLsblk retruns MockWrapLsblk that perform each method without any error everytimePath is a path that will be returning for each "SearchDrivePath" call
func (*MockWrapLsblk) GetBlockDevices ¶
func (m *MockWrapLsblk) GetBlockDevices(device string) ([]lsblk.BlockDevice, error)
GetBlockDevices is a mock implementations
func (*MockWrapLsblk) SearchDrivePath ¶
func (m *MockWrapLsblk) SearchDrivePath(drive *drivecrd.Drive) (string, error)
SearchDrivePath is a mock implementations
type MockWrapLsscsi ¶
MockWrapLsscsi is a mock implementation of WrapLsscsi interface from lsscsi package
func (*MockWrapLsscsi) GetSCSIDevices ¶
func (m *MockWrapLsscsi) GetSCSIDevices() ([]*lsscsi.SCSIDevice, error)
GetSCSIDevices is a mock implementations
type MockWrapNvmecli ¶
MockWrapNvmecli is a mock implementation of WrapNvmecli interface from nvmee package
func (*MockWrapNvmecli) GetNVMDevices ¶
func (m *MockWrapNvmecli) GetNVMDevices() ([]nvmecli.NVMDevice, error)
GetNVMDevices is a mock implementations
type MockWrapPartition ¶
MockWrapPartition is a mock implementation of WrapPartition interface from partitionhelper package
func (*MockWrapPartition) CreatePartition ¶
func (m *MockWrapPartition) CreatePartition(device, label string) (err error)
CreatePartition is a mock implementations
func (*MockWrapPartition) CreatePartitionTable ¶
func (m *MockWrapPartition) CreatePartitionTable(device, partTableType string) (err error)
CreatePartitionTable is a mock implementations
func (*MockWrapPartition) DeletePartition ¶
func (m *MockWrapPartition) DeletePartition(device, partNum string) (err error)
DeletePartition is a mock implementations
func (*MockWrapPartition) DeviceHasPartitionTable ¶
func (m *MockWrapPartition) DeviceHasPartitionTable(device string) (bool, error)
DeviceHasPartitionTable is a mock implementations
func (*MockWrapPartition) DeviceHasPartitions ¶
func (m *MockWrapPartition) DeviceHasPartitions(device, serialNumber string) (bool, error)
DeviceHasPartitions is a mock implementations
func (*MockWrapPartition) GetPartitionNameByUUID ¶
func (m *MockWrapPartition) GetPartitionNameByUUID(device, partUUID string) (string, error)
GetPartitionNameByUUID is a mock implementations
func (*MockWrapPartition) GetPartitionTableType ¶
func (m *MockWrapPartition) GetPartitionTableType(device string) (ptType string, err error)
GetPartitionTableType is a mock implementations
func (*MockWrapPartition) GetPartitionUUID ¶
func (m *MockWrapPartition) GetPartitionUUID(device, partNum string) (string, error)
GetPartitionUUID is a mock implementations
func (*MockWrapPartition) IsPartitionExists ¶
func (m *MockWrapPartition) IsPartitionExists(device, partNum string) (exists bool, err error)
IsPartitionExists is a mock implementations
func (*MockWrapPartition) SetPartitionUUID ¶
func (m *MockWrapPartition) SetPartitionUUID(device, partNum, partUUID string) error
SetPartitionUUID is a mock implementations
func (*MockWrapPartition) SyncPartitionTable ¶
func (m *MockWrapPartition) SyncPartitionTable(device string) error
SyncPartitionTable is a mock implementations
type MockWrapSmartctl ¶
MockWrapSmartctl is a mock implementation of WrapSmartctl interface from smartctl package
func (*MockWrapSmartctl) GetDriveInfoByPath ¶
func (m *MockWrapSmartctl) GetDriveInfoByPath(path string) (*smartctl.DeviceSMARTInfo, error)
GetDriveInfoByPath is a mock implementations