Documentation
¶
Index ¶
- type Api
- func (api *Api) Delete(path string) (*http.Response, error)
- func (api *Api) Do(req *http.Request) (*http.Response, error)
- func (api *Api) Get(path string) (*http.Response, error)
- func (api *Api) GetJson(path string, obj interface{}) error
- func (api *Api) GetMetrics() (string, error)
- func (api *Api) GetSensors() (*model.ServerSensorReadings, error)
- func (api *Api) GetSensorsRaw() (interface{}, error)
- func (api *Api) Login(username, password string) error
- func (api *Api) Logout() error
- func (api *Api) Name() string
- func (api *Api) NewRequest(method, path string, body io.Reader) (*http.Request, error)
- func (api *Api) Post(path string, data interface{}) (*http.Response, error)
- func (api *Api) PowerCommand(command int) error
- func (api *Api) SessionId() string
- type SensorResult
- type SensorsResult
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct { ServerAddr string // contains filtered or unexported fields }
func (*Api) GetMetrics ¶
func (*Api) GetSensors ¶
func (api *Api) GetSensors() (*model.ServerSensorReadings, error)
func (*Api) GetSensorsRaw ¶
func (*Api) NewRequest ¶
func (*Api) PowerCommand ¶
type SensorResult ¶
type SensorResult struct { Id int `json:"id"` SensorNumber int `json:"sensor_number"` Name string `json:"name"` OwnerId int `json:"owner_id"` OwnerLun int `json:"owner_lun"` RawReading float64 `json:"raw_reading"` Reading float64 `json:"reading"` Type string `json:"type"` TypeNumber int `json:"type_number"` SensorState int `json:"sensor_state"` DiscreteState int `json:"discrete_state"` Accessible int `json:"accessible"` SettableFlag int `json:"settable_flag"` //LowerNonRecoverableThreshold string `json:"lower_non_recoverable_threshold"` //LowerCriticalThreshold float64 `json:"lower_critical_threshold"` //LowerNonCriticalThreshold float64 `json:"lower_non_critical_threshold"` //HigherNonCriticalThreshold float64 `json:"higher_non_critical_threshold"` //HigherCriticalThreshold float64 `json:"higher_critical_threshold"` //HigherNonRecoverableThreshold string `json:"higher_non_recoverable_threshold"` Unit string `json:"unit"` }
type SensorsResult ¶
type SensorsResult []SensorResult
Click to show internal directories.
Click to hide internal directories.