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) SetCredential ¶
func (b *BMC) SetCredential(cred *credential.Credential)
SetCredential sets the credential for the BMC.
type MACAddress ¶ added in v1.3.0
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 ¶ added in v1.3.0
func (m MACAddress) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*MACAddress) UnmarshalText ¶ added in v1.3.0
func (m *MACAddress) UnmarshalText(text []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
Click to show internal directories.
Click to hide internal directories.