Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtaDriverHandle ¶
type DparmError ¶
type DparmError struct {
Message string
DriverStatus byte
SenseData *scsi.SENSE_DATA
// contains filtered or unexported fields
}
func (DparmError) Error ¶
func (e DparmError) Error() string
type DriveFactory ¶
type DriveFactory interface {
OpenByPath(path string) (DriveHandle, error)
EnumDrives() ([]DriveInfo, error)
EnumVolumes() (EnumVolumeContext, error)
}
type DriveHandle ¶
type DriveHandle interface {
GetDriverHandle() DriverHandle
Close()
GetDevicePath() string
GetDrivingType() DrivingType
GetDriverName() string
GetDriveInfo() *DriveInfo
// ATA
AtaDoTaskFileCmd(rw bool, dma bool, tf *ata.Tf, data []byte, timeoutSecs int) error
// NVME
NvmeGetLogPage(nsid uint32, logId uint32, rae bool, size int) ([]byte, error)
// COMMON
SecurityCommand(rw bool, dma bool, protocol uint8, comId uint16, buffer []byte, timeoutSecs int) error
TcgDiscovery0() error
}
type DriveInfo ¶
type DriveInfo struct {
DevicePath string
DrivingType DrivingType
DriverName string
PartitionStyle PartitionStyle
GptDiskId string // uuid format
MbrDiskSignature uint32
Model string
Serial string
FirmwareRevision string
RawSerial [20]byte
VendorId string
ProductRevision string
WindowsDevNum int
SmartEnabled bool
AtaIdentity *ata.IdentityDeviceData
AtaIdentityRaw []byte
NvmeIdentity *nvme.IdentifyController
NvmeIdentityRaw []byte
IsSsd bool
SsdCheckWeight int
TotalCapacity int64
TcgSupport int
TcgTper bool
TcgLocking bool
TcgGeometryReporting bool
TcgOpalSscV100 bool
TcgOpalSscV200 bool
TcgEnterprise bool
TcgSingleUser bool
TcgDataStore bool
TcgRawFeatures map[uint16][]byte
}
type DriverHandle ¶
type DrivingType ¶
type DrivingType int
const ( DrivingUnknown DrivingType = 0 + iota DrivingAtapi DrivingNvme )
type EnumVolumeContext ¶
type EnumVolumeContext interface {
GetList() []VolumeInfo
FindVolumesByDrive(driveInfo *DriveInfo) []VolumeInfo
OpenDriveByVolumePath(volumePath string) (DriveHandle, error)
}
type NvmeDriverHandle ¶
type PartitionStyle ¶
type PartitionStyle int
const ( PartitionStyleRaw PartitionStyle = 0 + iota PartitionStyleMbr PartitionStyleGpt )
type VolumeInfo ¶
type WindowsPhysicalDrive ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.