Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Device ¶
func GetDetachableDevices ¶
func GetDevice ¶
func GetDevice(dev *LSBLKDevice, mntTable *MountTable) (*Device, error)
func GetDevices ¶
type LSBLKDevice ¶
type LSBLKDevice struct { Name string `json:"name"` Model string `json:"model"` Size StringOrInt `json:"size"` Ro StringOrBool `json:"ro"` Rm StringOrBool `json:"rm"` DeviceUUID string `json:"uuid"` Children []LSBLKDevice `json:"children"` // contains filtered or unexported fields }
func (*LSBLKDevice) DevicePath ¶
func (l *LSBLKDevice) DevicePath() string
func (*LSBLKDevice) Readonly ¶
func (l *LSBLKDevice) Readonly() bool
func (*LSBLKDevice) Removable ¶
func (l *LSBLKDevice) Removable() bool
func (*LSBLKDevice) UDevInfo ¶
func (l *LSBLKDevice) UDevInfo() (*UdevAdm, error)
func (*LSBLKDevice) UUID ¶
func (l *LSBLKDevice) UUID() string
type LSBLKDevices ¶
type LSBLKDevices struct {
Devices []LSBLKDevice `json:"blockdevices"`
}
func GetLSBLKDevices ¶
func GetLSBLKDevices() (*LSBLKDevices, error)
func ParseLSBLKDevices ¶
func ParseLSBLKDevices(data []byte) (*LSBLKDevices, error)
type MountEntry ¶
type MountEntry struct {
Device, Mountpoint, Type, Options string
}
type MountTable ¶
type MountTable struct {
Entries []MountEntry
}
func NewMountTable ¶
func NewMountTable() (*MountTable, error)
func ParseMountTable ¶
func ParseMountTable(data []byte) (*MountTable, error)
func (*MountTable) Find ¶
func (mt *MountTable) Find(m Mountable) *MountEntry
type ProgressWriter ¶
type ProgressWriter struct {
// contains filtered or unexported fields
}
func NewProgressWriter ¶
func NewProgressWriter() *ProgressWriter
func NewProgressWriterWithSize ¶
func NewProgressWriterWithSize(fileSize uint64) *ProgressWriter
func (*ProgressWriter) Progress ¶
func (pw *ProgressWriter) Progress() Progress
func (*ProgressWriter) Stop ¶
func (pw *ProgressWriter) Stop()
func (*ProgressWriter) TotalData ¶
func (pw *ProgressWriter) TotalData() uint64
type StringOrBool ¶
type StringOrBool struct {
Value bool
}
func (*StringOrBool) UnmarshalJSON ¶
func (sb *StringOrBool) UnmarshalJSON(b []byte) error
type StringOrInt ¶
type StringOrInt struct {
Value int64
}
func (*StringOrInt) UnmarshalJSON ¶
func (sb *StringOrInt) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.