dmi

package
v0.2.4-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: Apache-2.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

View Source
const DecoderVersion = `0-core Go dmi decoder v0.2.0`

DecoderVersion is the information about the decoder in this package

Variables

This section is empty.

Functions

This section is empty.

Types

type DMI

type DMI struct {
	Tooling  Tooling   `json:"tooling"`
	Sections []Section `json:"sections"`
}

DMI represents a map of SectionTypeStr to Section parsed from dmidecode output, as well as information about the tool used to get these sections Property in section is in the form of key value pairs where values are optional and may include a list of items as well. k: [v]

[
	item1
	item2
	...
]

func Decode

func Decode() (*DMI, error)

Decode run and parse the dmidecode command

type PropertyData

type PropertyData struct {
	Val   string   `json:"value"`
	Items []string `json:"items,omitempty"`
}

PropertyData represents a key value pair with optional list of items

type Section

type Section struct {
	HandleLine  string       `json:"handleline"`
	TypeStr     string       `json:"typestr,omitempty"`
	Type        Type         `json:"typenum"`
	SubSections []SubSection `json:"subsections"`
}

Section represents a complete section like BIOS or Baseboard

type SubSection

type SubSection struct {
	Title      string                  `json:"title"`
	Properties map[string]PropertyData `json:"properties,omitempty"`
}

SubSection represents part of a section, identified by a title

type Tooling

type Tooling struct {
	Aggregator string `json:"aggregator"`
	Decoder    string `json:"decoder"`
}

Tooling holds the information and version about the tool used to read DMI information

type Type

type Type int

Type (allowed types 0 -> 42)

const (
	TypeBIOS Type = iota
	TypeSystem
	TypeBaseboard
	TypeChassis
	TypeProcessor
	TypeMemoryController
	TypeMemoryModule
	TypeCache
	TypePortConnector
	TypeSystemSlots
	TypeOnBoardDevices
	TypeOEMSettings
	TypeSystemConfigurationOptions
	TypeBIOSLanguage
	TypeGroupAssociations
	TypeSystemEventLog
	TypePhysicalMemoryArray
	TypeMemoryDevice
	Type32BitMemoryError
	TypeMemoryArrayMappedAddress
	TypeMemoryDeviceMappedAddress
	TypeBuiltinPointingDevice
	TypePortableBattery
	TypeSystemReset
	TypeHardwareSecurity
	TypeSystemPowerControls
	TypeVoltageProbe
	TypeCoolingDevice
	TypeTemperatureProbe
	TypeElectricalCurrentProbe
	TypeOutOfBandRemoteAccess
	TypeBootIntegrityServices
	TypeSystemBoot
	Type64BitMemoryError
	TypeManagementDevice
	TypeManagementDeviceComponent
	TypeManagementDeviceThresholdData
	TypeMemoryChannel
	TypeIPMIDevice
	TypePowerSupply
	TypeAdditionalInformation
	TypeOnboardDevicesExtendedInformation
	TypeManagementControllerHostInterface
)

List of DMI section

Jump to

Keyboard shortcuts

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