aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/stats/structures.rs
blob: a141ce6d0447561b210ef135c8eb98cac5abf1a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyleft (ɔ) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only

use serde_derive::Serialize;

#[derive(Serialize)]
pub struct Statistics {
  pub system:  StatisticsSystem,
  pub process: StatisticsProcess,
}
#[derive(Serialize)]
pub struct StatisticsSystem {
  #[serde(rename = "type")]
  pub os_type: String,
  pub release: String,
  pub uptime:  String,
}
#[derive(Serialize)]
pub struct StatisticsProcess {
  pub memory_usage: String,
  pub cpu_usage:    String,
  // pub uptime:       String,
}