mirror of
https://github.com/trafficlunar/api.git
synced 2026-06-27 22:24:08 +00:00
feat: keys, clicks, and totals in computer statistics
This commit is contained in:
parent
19bdd27de1
commit
8407a1258f
6 changed files with 85 additions and 10 deletions
|
|
@ -3,17 +3,27 @@ package model
|
|||
import "time"
|
||||
|
||||
type ComputerWebSocketMessage struct {
|
||||
Cpu uint8 `json:"cpu"`
|
||||
Ram uint8 `json:"ram"`
|
||||
Cpu uint8 `json:"cpu"`
|
||||
Ram uint8 `json:"ram"`
|
||||
Keys uint16 `json:"keys"`
|
||||
Clicks uint16 `json:"clicks"`
|
||||
}
|
||||
|
||||
type ComputerData struct {
|
||||
Online bool `json:"online"`
|
||||
Totals ComputerTotals `json:"totals"`
|
||||
Graph []ComputerGraphData `json:"graph"`
|
||||
}
|
||||
|
||||
type ComputerTotals struct {
|
||||
Keys float64 `json:"keys"`
|
||||
Clicks float64 `json:"clicks"`
|
||||
}
|
||||
|
||||
type ComputerGraphData struct {
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
Cpu int `json:"cpu"`
|
||||
Ram int `json:"ram"`
|
||||
Keys int `json:"keys"`
|
||||
Clicks int `json:"clicks"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue