-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfo.go
32 lines (29 loc) · 971 Bytes
/
info.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package gofiery
import (
"net/http"
"time"
)
type Info struct {
DiskAvailable int64 `json:"disk_available"`
DiskTotal int64 `json:"disk_total"`
EpochTime time.Time `json:"epoch_time"`
FieryLocale string `json:"fiery_locale"`
Locale string `json:"locale"`
MemoryAvailable int64 `json:"memory_available"`
MemoryTotal int64 `json:"memory_total"`
Name string `json:"name"`
OSLocale string `json:"os_locale"`
SerialNumber string `json:"serial_number"`
Timezone string `json:"timezone"`
Uptime int64 `json:"uptime"`
Version string `json:"version"`
Host string `json:"host"`
Username string `json:"username"`
AppId string `json:"app_id"`
}
func (fc *FieryClient) GetInfo() *Info {
var info Info
response := fc.Run(fc.Endpoint("info"), http.MethodGet)
info = response.data.item.(Info)
return &info
}