|
@@ -4,35 +4,41 @@ type SystemConfig struct {
|
|
|
LiveSystem bool `mapstructure:"LIVE_SYSTEM"`
|
|
|
}
|
|
|
|
|
|
-type BasicSystemInformation struct {
|
|
|
- Value string `json:"value" validate:"required"`
|
|
|
- Percentage float64 `json:"percentage" validate:"required"`
|
|
|
+type LiveStorageInformation struct {
|
|
|
+ Value string `json:"value"`
|
|
|
+ Percentage float64 `json:"percentage"`
|
|
|
}
|
|
|
|
|
|
type LiveInformation struct {
|
|
|
- CPU CpuSystemInformation `json:"cpu" validate:"required"`
|
|
|
- Ram BasicSystemInformation `json:"ram" validate:"required"`
|
|
|
- Disk BasicSystemInformation `json:"disk" validate:"required"`
|
|
|
- ServerUptime uint64 `json:"server_uptime" validate:"required"`
|
|
|
+ CPU float64 `json:"cpu"`
|
|
|
+ Ram LiveStorageInformation `json:"ram"`
|
|
|
+ Disk LiveStorageInformation `json:"disk"`
|
|
|
+ ServerUptime uint64 `json:"server_uptime"`
|
|
|
}
|
|
|
|
|
|
-type StaticInformation struct {
|
|
|
- CPU CPU `json:"cpu" validate:"required"`
|
|
|
- Ram string `json:"ram" validate:"required"`
|
|
|
- Disk string `json:"disk" validate:"required"`
|
|
|
+type CPU struct {
|
|
|
+ Name string `json:"name"`
|
|
|
+ Threads string `json:"threads"`
|
|
|
+ Architecture string `json:"architecture"`
|
|
|
}
|
|
|
|
|
|
-type System struct {
|
|
|
- Live LiveInformation `json:"live" validate:"required"`
|
|
|
- Static StaticInformation `json:"static" validate:"required"`
|
|
|
+type Ram struct {
|
|
|
+ Total string `json:"total"`
|
|
|
+ Swap string `json:"swap"`
|
|
|
}
|
|
|
|
|
|
-type CPU struct {
|
|
|
- Name string `json:"name" validate:"required"`
|
|
|
- Threads int `json:"threads" validate:"required"`
|
|
|
- Architecture string `json:"architecture" validate:"required"`
|
|
|
+type Disk struct {
|
|
|
+ Total string `json:"total"`
|
|
|
+ Partitions string `json:"partitions"`
|
|
|
}
|
|
|
|
|
|
-type CpuSystemInformation struct {
|
|
|
- Percentage float64 `json:"percentage" validate:"required"`
|
|
|
+type StaticInformation struct {
|
|
|
+ CPU CPU `json:"cpu"`
|
|
|
+ Ram Ram `json:"ram"`
|
|
|
+ Disk Disk `json:"disk"`
|
|
|
+}
|
|
|
+
|
|
|
+type System struct {
|
|
|
+ Live LiveInformation `json:"live"`
|
|
|
+ Static StaticInformation `json:"static"`
|
|
|
}
|