bmc

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: 4 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

This section is empty.

Types

type BMC

type BMC struct {
	MAC        MACAddress             `json:"mac"`
	IP         net.IP                 `json:"ip"`
	Credential *credential.Credential `json:"credential"`
}

BMC specifies the information for a BMC which includes MAC address, IP address, and access credential.

func New

func New(s string, cred *credential.Credential, ip string) (*BMC, error)

New creates a new BMC instance with the given MAC address, credential and IP address.

func (*BMC) Patch

func (b *BMC) Patch(nb BMC) bool

Patch updates the BMC instance with the values from another BMC instance.

func (*BMC) SetCredential

func (b *BMC) SetCredential(cred *credential.Credential)

SetCredential sets the credential for the BMC.

func (*BMC) SetIP

func (b *BMC) SetIP(ip string)

SetIP sets the IP address for the BMC.

type MACAddress

type MACAddress struct {
	net.HardwareAddr
}

MACAddress wraps net.HardwareAddr and implements encoding.TextMarshaler and encoding.TextUnmarshaler so that JSON serialization produces the human-readable colon-separated MAC address string (e.g. "aa:bb:cc:dd:ee:ff") rather than a base64-encoded byte array.

func (MACAddress) MarshalText

func (m MACAddress) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*MACAddress) UnmarshalText

func (m *MACAddress) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

Jump to

Keyboard shortcuts

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