Documentation
¶
Index ¶
- type Api
- func (a *Api) ChassisStatus(host string) (*ChassisStatus, error)
- func (a *Api) GetSensorsList(host string) ([]*Sensor, error)
- func (a *Api) Login(host string, user string, password string) (*Session, error)
- func (a *Api) Logout(host string) error
- func (a *Api) PowerOff(host string) error
- func (a *Api) PowerOn(host string) error
- type ApiOptions
- type AuthorizationError
- type BMCAPIError
- type ChassisStatus
- type NoSessionError
- type Sensor
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
Api is the main struct for interacting with the BMC
func NewApi ¶
func NewApi(opts ...func(*ApiOptions)) *Api
func (*Api) ChassisStatus ¶
func (a *Api) ChassisStatus(host string) (*ChassisStatus, error)
ChassisStatus is a function that gets the power status of the server using the BMC API
func (*Api) GetSensorsList ¶
GetSensorsList returns a list of sensors from the BMC
type ApiOptions ¶
ApiOptions is a struct that holds the options for the API
type AuthorizationError ¶
func (*AuthorizationError) Error ¶
func (e *AuthorizationError) Error() string
type BMCAPIError ¶
func (*BMCAPIError) Error ¶
func (e *BMCAPIError) Error() string
type ChassisStatus ¶
type NoSessionError ¶
type NoSessionError struct {
Message string
}
func (*NoSessionError) Error ¶
func (e *NoSessionError) Error() string
type Sensor ¶
type Sensor struct { ID int `json:"id"` SensorNumber int `json:"sensor_number"` Name string `json:"name"` Reading string `json:"reading"` Unit string `json:"unit"` Type string `json:"type"` State string `json:"state"` Accessible string `json:"accessible"` LowerNonRecoverableThreshold string `json:"lower_non_recoverable_threshold"` LowerCriticalThreshold string `json:"lower_critical_threshold"` LowerNonCriticalThreshold string `json:"lower_non_critical_threshold"` HigherNonCriticalThreshold string `json:"higher_non_critical_threshold"` HigherCriticalThreshold string `json:"higher_critical_threshold"` Alert string `json:"alert"` }
Click to show internal directories.
Click to hide internal directories.