devicetypes

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BMCTypeToString

func BMCTypeToString(bt BMCType) string

BMCTypeToString returns the string representation for the given BMC type.

func ComponentTypeToString

func ComponentTypeToString(ct ComponentType) string

ComponentTypeToString returns the string representation for the given component type.

func IsValidBMCTypeString

func IsValidBMCTypeString(str string) bool

func IsValidComponentTypeString

func IsValidComponentTypeString(str string) bool

IsValidComponentTypeString reports whether str maps to a known, non-Unknown ComponentType.

Types

type BMCType

type BMCType int
const (
	BMCTypeUnknown BMCType = iota
	BMCTypeHost
	BMCTypeDPU
)

func BMCTypeFromString

func BMCTypeFromString(str string) BMCType

BMCTypeFromString returns the BMC type from the given string.

func BMCTypes

func BMCTypes() []BMCType

BMCTypes returns all the supported BMC types

func (BMCType) String

func (bt BMCType) String() string

String return the aligned string representation for the given BMC type

type ComponentType

type ComponentType int

Define component types

const (
	ComponentTypeUnknown ComponentType = iota
	ComponentTypeCompute
	ComponentTypeNVSwitch
	ComponentTypePowerShelf
	ComponentTypeToRSwitch
	ComponentTypeUMS
	ComponentTypeCDU
)

func ComponentTypeFromString

func ComponentTypeFromString(str string) ComponentType

ComponentTypeFromString returns the Component type from the given string.

func ComponentTypes

func ComponentTypes() []ComponentType

ComponentTypes returns all the supported Component types

func (ComponentType) MarshalJSON

func (ct ComponentType) MarshalJSON() ([]byte, error)

MarshalJSON serializes ComponentType as its string name (e.g. "Compute").

func (ComponentType) MarshalText

func (ct ComponentType) MarshalText() ([]byte, error)

MarshalText serializes ComponentType as its string name for use as a JSON map key (e.g. map[ComponentType]... → {"Compute": ...}).

func (ComponentType) String

func (ct ComponentType) String() string

String return the aligned string representation for the given component type

func (*ComponentType) UnmarshalJSON

func (ct *ComponentType) UnmarshalJSON(data []byte) error

UnmarshalJSON parses a ComponentType from its string name (e.g. "compute"). Returns an error only if the string is unrecognized (i.e. not a valid component type name and not the canonical "Unknown" string), so that round-trip serialization of ComponentTypeUnknown is preserved.

func (*ComponentType) UnmarshalText

func (ct *ComponentType) UnmarshalText(data []byte) error

UnmarshalText parses a ComponentType from its string name when used as a JSON map key. Returns an error only if the string is unrecognized (i.e. not a valid component type name and not the canonical "Unknown" string), so that round-trip serialization of ComponentTypeUnknown is preserved.

Jump to

Keyboard shortcuts

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