Created
This commit is contained in:
20
system_status.go
Normal file
20
system_status.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package woogo
|
||||
|
||||
import (
|
||||
"git.cloudyne.io/go/woogo/entity"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
)
|
||||
|
||||
type systemStatusService service
|
||||
|
||||
func (s systemStatusService) All() (item entity.SystemStatus, err error) {
|
||||
resp, err := s.httpClient.R().Get("/system_status")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if resp.IsSuccess() {
|
||||
err = jsoniter.Unmarshal(resp.Body(), &item)
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user