|
| 1 | +package rpc |
| 2 | + |
| 3 | +type GatewayStatusRequest struct { |
| 4 | + Battery int `json:"battery,omitempty"` |
| 5 | + Rssi int `json:"rssi,omitempty"` |
| 6 | + Cpu int `json:"cpu,omitempty"` |
| 7 | + Mem int `json:"mem,omitempty"` |
| 8 | +} |
| 9 | + |
| 10 | +type GatewayStatusResponse struct{} |
| 11 | + |
| 12 | +type GatewayEventRequest struct { |
| 13 | + Name string `json:"name,omitempty"` |
| 14 | + Type string `json:"type,omitempty"` |
| 15 | + Level int `json:"level,omitempty"` |
| 16 | +} |
| 17 | + |
| 18 | +type GatewaySettingRequest struct { |
| 19 | + Server string `json:"server,omitempty"` |
| 20 | + Port uint16 `json:"port,omitempty"` |
| 21 | +} |
| 22 | + |
| 23 | +type GatewaySettingResponse struct{} |
| 24 | + |
| 25 | +type GatewayMetricsRequest struct{} |
| 26 | + |
| 27 | +type GatewayMetricsResponse struct { |
| 28 | + Modules []string `json:"modules,omitempty"` |
| 29 | + Os string `json:"os,omitempty"` |
| 30 | + Platform string `json:"platform,omitempty"` |
| 31 | + Kernel string `json:"kernel,omitempty"` |
| 32 | + Boot int64 `json:"boot,omitempty"` |
| 33 | + Cpu GatewayMetricsCpu `json:"cpu"` |
| 34 | + Memory GatewayMetricsMemory `json:"memory"` |
| 35 | + Network []GatewayMetricsNetwork `json:"network,omitempty"` |
| 36 | + Disk []GatewayMetricsDisk `json:"disk,omitempty"` |
| 37 | +} |
| 38 | + |
| 39 | +type GatewayMetricsCpu struct { |
| 40 | + Cores int `json:"cores,omitempty"` |
| 41 | + Usage int `json:"usage,omitempty"` |
| 42 | + Mhz int `json:"mhz,omitempty"` |
| 43 | + Model string `json:"model,omitempty"` |
| 44 | +} |
| 45 | +type GatewayMetricsMemory struct { |
| 46 | + Total int `json:"total,omitempty"` |
| 47 | + Free int `json:"free,omitempty"` |
| 48 | + Used int `json:"used,omitempty"` |
| 49 | + Usage int `json:"usage,omitempty"` |
| 50 | +} |
| 51 | + |
| 52 | +type GatewayMetricsNetwork struct { |
| 53 | + Name string `json:"name,omitempty"` |
| 54 | + Mac string `json:"mac,omitempty"` |
| 55 | + Flags []string `json:"flags,omitempty"` |
| 56 | + Address []string `json:"address,omitempty"` |
| 57 | + Tx int `json:"tx,omitempty"` |
| 58 | + Rx int `json:"rx,omitempty"` |
| 59 | +} |
| 60 | + |
| 61 | +type GatewayMetricsDisk struct { |
| 62 | + Name string `json:"name,omitempty"` |
| 63 | + Mount string `json:"mount,omitempty"` |
| 64 | + Type string `json:"type,omitempty"` |
| 65 | + Total int `json:"total,omitempty"` |
| 66 | + Free int `json:"free,omitempty"` |
| 67 | + Used int `json:"used,omitempty"` |
| 68 | + Usage int `json:"usage,omitempty"` |
| 69 | +} |
0 commit comments