diskie

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDevice

type BlockDevice struct {
	ObjectPath            string
	Device                *string
	PreferredDevice       *string
	Symlinks              *[]string
	DeviceNumber          *uint64
	Id                    *string
	Size                  *uint64
	ReadOnly              *bool
	Drive                 *Drive
	IdUsage               *string
	IdType                *string
	IdVersion             *string
	IdLabel               *string
	IdUUID                *string
	CryptoBackingDevice   *string
	HintPartitionable     *bool
	HintSystem            *bool
	HintIgnore            *bool
	HintAuto              *bool
	HintName              *string
	HintIconName          *string
	HintSymbolicIconName  *string
	UserspaceMountOptions *[]string
	Partition             *Partition
	Filesystem            *Filesystem
	Encrypted             *Encrypted

	DriveVendor         string
	DriveModel          string
	DriveRevision       string
	DriveSerial         string
	DriveId             string
	PreferredSize       *uint64
	CryptoRootDrive     *Drive
	CryptoRootDevice    string
	CryptoClosingDevice string
}

type BlockMap

type BlockMap struct {
	BlockMap map[string]*BlockDevice
}

func (*BlockMap) Filter

func (bm *BlockMap) Filter(blocks []*BlockDevice, minImportance uint) ([]*BlockDevice, error)

func (*BlockMap) Sort

func (bm *BlockMap) Sort() []*BlockDevice

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func Connect

func Connect() (*Conn, error)

func (*Conn) BlockDevices

func (c *Conn) BlockDevices() (*BlockMap, error)

type Drive

type Drive struct {
	Vendor                *string
	Model                 *string
	Revision              *string
	Serial                *string
	WWN                   *string
	Id                    *string
	Media                 *string
	MediaCompatibility    *[]string
	MediaRemovable        *bool
	MediaAvailable        *bool
	MediaChangeDetected   *bool
	Size                  *uint64
	TimeDetected          *uint64
	TimeMediaDetected     *uint64
	Optical               *bool
	OpticalBlank          *bool
	OpticalNumTracks      *uint32
	OpticalNumAudioTracks *uint32
	OpticalNumDataTracks  *uint32
	OpticalNumSessions    *uint32
	RotationRate          *int32
	ConnectionBus         *string
	Seat                  *string
	Removable             *bool
	Ejectable             *bool
	SortKey               *string
	CanPowerOff           *bool
	SiblingId             *string
}

type Encrypted

type Encrypted struct {
	HintEncryptionType *string
	MetadataSize       *uint64
	CleartextDevice    *string
}

type Filesystem

type Filesystem struct {
	MountPoints *[]string
	Size        *uint64
}

type Partition

type Partition struct {
	Number      *uint32
	Type        *string
	Flags       *uint64
	Offset      *uint64
	Size        *uint64
	Name        *string
	UUID        *string
	IsContainer *bool
	IsContained *bool
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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