auditaur_core/protocol/
mod.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
4#[serde(rename_all = "camelCase")]
5pub struct DoctorReport {
6 pub ok: bool,
7 pub checks: Vec<DoctorCheck>,
8}
9
10#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
11#[serde(rename_all = "camelCase")]
12pub struct DoctorCheck {
13 pub name: String,
14 pub ok: bool,
15 pub message: String,
16}
17
18#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
19#[serde(rename_all = "camelCase")]
20pub struct HealthReport {
21 pub ok: bool,
22 pub summary: String,
23 pub apps: Vec<AppHealth>,
24}
25
26#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
27#[serde(rename_all = "camelCase")]
28pub struct AppHealth {
29 pub instance_id: String,
30 pub session_id: String,
31 pub service_name: String,
32 pub status: String,
33 pub ok: bool,
34 pub checks: Vec<HealthCheck>,
35}
36
37#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
38#[serde(rename_all = "camelCase")]
39pub struct HealthCheck {
40 pub name: String,
41 pub ok: bool,
42 pub message: String,
43}
44
45#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
46#[serde(rename_all = "camelCase")]
47pub struct TraceSummary {
48 pub trace_id: String,
49 pub root_span_name: Option<String>,
50 pub start_time_unix_nanos: Option<i64>,
51 pub duration_unix_nanos: Option<i64>,
52 pub status_code: Option<String>,
53 pub span_count: usize,
54 pub error_count: usize,
55}