Skip to main content

ripestat_common/resources/
atlas_probes.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
4pub struct AtlasProbesRequest {
5    pub resource: String,
6}
7
8#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
9pub struct AtlasProbesResponse {
10    pub probes: Vec<Probe>,
11    pub stats: AtlasProbesStats,
12    pub resource: String,
13    pub cache: Option<bool>,
14}
15
16#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
17pub struct Probe {
18    pub prefix_v4: Option<String>,
19    pub status: i64,
20    pub status_name: String,
21    pub prefix_v6: Option<String>,
22    pub is_anchor: bool,
23    pub last_connected: Option<i64>,
24    pub tags: Vec<String>,
25    #[serde(rename = "type")]
26    pub type_field: String,
27    pub address_v6: Option<String>,
28    pub latitude: f64,
29    pub longitude: f64,
30    pub id: i64,
31    pub address_v4: Option<String>,
32    pub country_code: String,
33    pub is_public: bool,
34    pub asn_v4: Option<i64>,
35    pub asn_v6: Option<i64>,
36    pub status_since: Option<i64>,
37    pub first_connected: Option<i64>,
38    pub total_uptime: i64,
39}
40
41#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
42pub struct AtlasProbesStats {
43    pub total: i64,
44}