rome

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 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" yaml:"attribute_name"`
	DefaultValue  interface{} `json:"DefaultValue" yaml:"default_value"` // can be int or string, maybe bool
	DisplayName   string      `json:"DisplayName" yaml:"display_name"`
	HelpText      string      `json:"HelpText" yaml:"help_text"`
	ReadOnly      bool        `json:"ReadOnly" yaml:"read_only"`
	Type          string      `json:"Type" yaml:"type"`
	Value         []Value     `json:"Value" yaml:"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" yaml:"value_display_name"`
	ValueName        string `json:"ValueName" yaml:"value_name"`
}

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