hardware_check

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B  = 1
	KB = B << 10
	MB = KB << 10
	GB = MB << 10
	TB = GB << 10
)

Variables

This section is empty.

Functions

func RunDiskInfo

func RunDiskInfo(outputFmt string, humanRead, inode bool, diskFile string, fakeDiskInfo syscall.Statfs_t) (jsonReturn []byte, err, textReturn error)

Process data based on passed variables.

Types

type DiskBlocks

type DiskBlocks struct {
	Blocks   uint64 `json:"blocks"`
	Bsize    int64  `json:"block_size"`
	Bfree    uint64 `json:"blocks_free"`
	Bavail   uint64 `json:"blocks_avail"`
	Bused    uint64 `json:"blocks_used"`
	Bpercent string `json:"blocks_percent"`
	Balert   string `json:"blocks_alert"`
}

type DiskDetails

type DiskDetails struct {
	Name          string     `json:"name"`
	Partition     string     `json:"partition"`
	PartitionType string     `json:"partition_type"`
	ReadOnly      bool       `json:"read_only"`
	Blocks        DiskBlocks `json:"disk_blocks"`
	Inodes        DiskInodes `json:"disk_inodes"`
}

type DiskInodes

type DiskInodes struct {
	Inodes   uint64 `json:"inodes"`
	Ifree    uint64 `json:"inodes_free"`
	Iused    uint64 `json:"inodes_used"`
	Ipercent string `json:"inodes_percent"`
	Ialert   string `json:"inodes_alert"`
}

type ValidDisks

type ValidDisks struct {
	Partition string `json:"partition"`
	Mount     string `json:"mount"`
	Type      string `json:"type"`
	Options   string `json:"options"`
}

Jump to

Keyboard shortcuts

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