Documentation ¶
Index ¶
- Constants
- func GetKey(mac string) (string, error)
- func GetMD5Hash(text string) string
- func GetSha512(text string) string
- func ValidateSerial(serialOk string) (bool, error)
- type DMI
- func (d *DMI) ExecDmidecode(binary string) (string, error)
- func (d *DMI) FindBin(binary string) (string, error)
- func (d *DMI) GenericSearchBy(param, value string) ([]Record, error)
- func (d *DMI) ParseDmidecode(output string) error
- func (d *DMI) Run() error
- func (d *DMI) SearchByName(name string) ([]Record, error)
- func (d *DMI) SearchByType(id int) ([]Record, error)
- type Record
Constants ¶
View Source
const (
DMIDecodeBinary = "dmidecode"
)
Variables ¶
This section is empty.
Functions ¶
func GetMD5Hash ¶
func ValidateSerial ¶
Types ¶
type DMI ¶
func (*DMI) ExecDmidecode ¶
ExecDmiDecode will attempt to execute a given binary, capture its output and return it (or an any errors it encounters)
func (*DMI) GenericSearchBy ¶
GenericSearchBy will search for any param w/ value in the d.Data map.
func (*DMI) ParseDmidecode ¶
ParseDmiDecode will attempt to parse dmidecode output and place all matching content in d.Data.
func (*DMI) Run ¶
Run will attempt to find a a valid `dmidecode` bin, attempt to execute it and parse whatever data it gets.
func (*DMI) SearchByName ¶
SearchByName will search for a specific DMI record by name in d.Data
Click to show internal directories.
Click to hide internal directories.