rome

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProcessorToken = "^AMD EPYC"

ProcessorToken is the processor model token.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	AttributeName string      `json:"AttributeName"`
	DefaultValue  interface{} `json:"DefaultValue"` // can be int or string, maybe bool
	DisplayName   string      `json:"DisplayName"`
	HelpText      string      `json:"HelpText"`
	ReadOnly      bool        `json:"ReadOnly"`
	Type          string      `json:"Type"`
	Value         []Value     `json:"Value"`
}

Attribute is a single bios attribute

type DecoderMap

type DecoderMap struct {
	Map *Library
}

DecoderMap provides a mapping of attributes for the decoder.

func (DecoderMap) Decode

func (d DecoderMap) Decode(key string) string

Decode accepts a key and changes it to a friendly name if it exists and json is not requested

type Library

type Library struct {
	Attributes map[string]Attribute
}

Library is a map of rome bios attributes

var Map *Library

Map is a pointer to a current library of decoded attributes.

func (*Library) RegisterAttribute

func (l *Library) RegisterAttribute(attribute Attribute) error

RegisterAttribute adds an attribute to the library

type Value

type Value struct {
	ValueDisplayName string `json:"ValueDisplayName"`
	ValueName        string `json:"ValueName"`
}

Value is the display name and a name

Jump to

Keyboard shortcuts

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