Documentation ¶
Index ¶
Constants ¶
View Source
const TypeMemoryDevice int = 17
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BIOS ¶
type CPU ¶
type DIMM ¶
type DIMM struct { SizeGigabytes uint64 `json:"size_gigabytes"` Speed uint64 `json:"speed_mt_s"` Manufacturer string `json:"manufacturer"` SerialNumber string `json:"serial_number"` Type string `json:"type"` PartNumber string `json:"part_number"` FormFactor string `json:"form_factor"` Locator string `json:"locator"` BankLocator string `json:"bank_locator"` }
func FetchDIMMs ¶
type Disk ¶
type Disk struct { Name string `json:"name"` SizeMegabytes uint64 `json:"size_megabytes"` Partitions []Partition `json:"partitions"` }
func FetchDisks ¶
type Driver ¶
type Kernel ¶
func FetchKernel ¶
type Memory ¶
type Memory struct { TotalSize uint64 `json:"memory"` TotalSwap uint64 `json:"swap"` SwapDevices []SwapDevice `json:"swap_devices"` }
func FetchMemory ¶
type Motherboard ¶
type Motherboard struct { Vendor string `json:"vendor"` Name string `json:"name"` SerialNumber string `json:"serial_number"` }
func FetchMotherboard ¶
func FetchMotherboard() (Motherboard, error)
type Network ¶
type Network struct { Interfaces []NetworkInterface `json:"interfaces"` Hostname string `json:"hostname"` }
func FetchNetwork ¶
type NetworkInterface ¶
type NetworkInterface struct { MACAddress string `json:"mac_address"` Driver Driver `json:"driver"` IPv4Addresses []string `json:"ipv4_addresses"` IPv6Addresses []string `json:"ipv6_addresses"` }
func FetchNetworkInterface ¶
func FetchNetworkInterfaces ¶
func FetchNetworkInterfaces() ([]NetworkInterface, error)
type OEM ¶
type PCSpecs ¶
type PCSpecs struct { Motherboard Motherboard `json:"motherboard"` CPU CPU `json:"cpu"` Disks []Disk `json:"disks"` Network Network `json:"network"` BIOS BIOS `json:"bios"` Memory Memory `json:"memory"` DIMMs []DIMM `json:"dimms"` BootTime time.Time `json:"boot_time"` Kernel Kernel `json:"kernel"` Release Release `json:"release"` OEM OEM `json:"oem"` Virtualization Virtualization `json:"virtualization"` }
type Partition ¶
type Partition struct { Filesystem string `json:"filesystem"` CapacityMegabytes uint64 `json:"capacity_megabytes"` Source string `json:"source"` Target string `json:"target"` }
func NewPartition ¶
func NewPartitions ¶
type Release ¶
type Release struct { Name string `json:"name"` Version string `json:"version"` Codename string `json:"codename"` }
func FetchRelease ¶
type SwapDevice ¶
func FetchSwapDevices ¶
func FetchSwapDevices() ([]SwapDevice, error)
func NewSwapDevice ¶
func NewSwapDevice(swapDevice *mem.SwapDevice) SwapDevice
NewSwapDevice converts a gopsutil SwapDevice into a SwapDevice
type Virtualization ¶
type Virtualization struct { // Type of virtualization (if any), e.g. physical/kvm/lxc Type string `json:"type"` }
func FetchVirtualization ¶
func FetchVirtualization() (Virtualization, error)
Click to show internal directories.
Click to hide internal directories.