Versions in this module Expand all Collapse all v0 v0.0.9 Apr 7, 2022 Changes in this version + const ExtentSize + const Mebibyte + func GUIDToString(bguid GUID) string + type AttachmentType int + const ATA + const FILESYSTEM + const IDE + const LOOP + const NBD + const PCIE + const RAID + const SCSI + const USB + const UnknownAttach + const VIRTIO + const XENBUS + func StringToAttachmentType(atypeStr string) AttachmentType + func (t *AttachmentType) UnmarshalJSON(b []byte) error + func (t AttachmentType) MarshalJSON() ([]byte, error) + func (t AttachmentType) String() string + type Disk struct + Attachment AttachmentType + Name string + Partitions PartitionSet + Path string + Properties PropertySet + ReadOnly bool + SectorSize uint + Size uint64 + Table TableType + Type DiskType + UdevInfo UdevInfo + func (d *Disk) FreeSpaces() []FreeSpace + func (d *Disk) FreeSpacesWithMin(minSize uint64) []FreeSpace + func (d Disk) Details() string + func (d Disk) String() string + type DiskFilter func(Disk) bool + type DiskSet map[string]Disk + func (ds DiskSet) Details() string + type DiskType int + const HDD + const NVME + const SSD + const TYPEFILE + func StringToDiskType(typeStr string) DiskType + func (t *DiskType) UnmarshalJSON(b []byte) error + func (t DiskType) MarshalJSON() ([]byte, error) + func (t DiskType) String() string + type FreeSpace struct + Last uint64 + Start uint64 + func (f *FreeSpace) Size() uint64 + type GUID [16]byte + func GenGUID() GUID + func StringToGUID(sguid string) (GUID, error) + func (g GUID) String() string + type LV struct + DecryptedLVName string + DecryptedLVPath string + Encrypted bool + Name string + Path string + Size uint64 + Type LVType + UUID string + VGName string + type LVFilter func(LV) bool + type LVSet map[string]LV + type LVType int + const LVTypeUnknown + const THICK + const THIN + const THINPOOL + func (t *LVType) UnmarshalJSON(b []byte) error + func (t LVType) MarshalJSON() ([]byte, error) + func (t LVType) String() string + type PV struct + FreeSize uint64 + Name string + Path string + Size uint64 + UUID string + VGName string + type PVFilter func(PV) bool + type PVSet map[string]PV + type PartType GUID + func StringToPartType(s string) (PartType, error) + func (p PartType) String() string + type Partition struct + ID GUID + Last uint64 + Name string + Number uint + Start uint64 + Type PartType + func (p *Partition) Size() uint64 + func (p *Partition) UnmarshalJSON(b []byte) error + func (p Partition) MarshalJSON() ([]byte, error) + type PartitionSet map[uint]Partition + type Property string + const Ephemeral + type PropertySet map[Property]bool + func (p *PropertySet) UnmarshalJSON(b []byte) error + func (p PropertySet) MarshalJSON() ([]byte, error) + func (p PropertySet) String() string + type System interface + CreatePartition func(Disk, Partition) error + CreatePartitions func(Disk, PartitionSet) error + DeletePartition func(Disk, uint) error + ScanAllDisks func(filter DiskFilter) (DiskSet, error) + ScanDisk func(path string) (Disk, error) + ScanDisks func(filter DiskFilter, paths ...string) (DiskSet, error) + UpdatePartition func(Disk, Partition) error + UpdatePartitions func(Disk, PartitionSet) error + Wipe func(Disk) error + type TableType int + const GPT + const MBR + const TableNone + func StringToTableType(atypeStr string) TableType + func (t *TableType) UnmarshalJSON(b []byte) error + func (t TableType) MarshalJSON() ([]byte, error) + func (t TableType) String() string + type UdevInfo struct + Name string + Properties map[string]string + Symlinks []string + SysPath string + type VG struct + FreeSpace uint64 + Name string + PVs PVSet + Size uint64 + UUID string + Volumes LVSet + type VGFilter func(VG) bool + type VGSet map[string]VG + func (vgs VGSet) Details() string + type VolumeManager interface + CreateLV func(vgName string, name string, size uint64, lvType LVType) (LV, error) + CreatePV func(diskName string) (PV, error) + CreateVG func(name string, pvs ...PV) (VG, error) + CryptClose func(vgName string, lvName string, decryptedName string) error + CryptFormat func(vgName string, lvName string, key string) error + CryptOpen func(vgName string, lvName string, decryptedName string, key string) error + DeletePV func(pv PV) error + ExtendLV func(vgName string, lvName string, newSize uint64) error + ExtendVG func(vgName string, pvs ...PV) error + HasLV func(vgName string, name string) bool + HasPV func(name string) bool + HasVG func(vgName string) bool + RemoveLV func(vgName string, lvName string) error + RemoveVG func(vgName string) error + RenameLV func(vgName string, lvName string, newLvName string) error + ScanPVs func(filter PVFilter) (PVSet, error) + ScanVGs func(filter VGFilter) (VGSet, error)