Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BMCTypeToString ¶
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 IsValidComponentTypeString ¶
IsValidComponentTypeString reports whether str maps to a known, non-Unknown ComponentType.
Types ¶
type BMCType ¶
type BMCType int
func BMCTypeFromString ¶
BMCTypeFromString returns the BMC type from the given string.
type ComponentType ¶
type ComponentType int
Define component types
const ( ComponentTypeUnknown ComponentType = iota ComponentTypeCompute ComponentTypeNVLSwitch 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.