1#[cfg(feature = "host")]
4mod build;
5#[cfg(feature = "host")]
6mod live;
7mod model;
8#[cfg(feature = "host")]
9mod source;
10mod text;
11
12#[cfg(feature = "host")]
13pub use build::{
14 build_ic_boundary_node_data_centers_report,
15 build_ic_boundary_node_data_centers_report_with_source, build_ic_canister_count_report,
16 build_ic_canister_count_report_with_source, build_ic_canister_page_report,
17 build_ic_canister_page_report_with_source, build_ic_daily_stats_report,
18 build_ic_daily_stats_report_with_source, build_ic_metric_report,
19 build_ic_metric_report_with_source,
20};
21#[cfg(feature = "host")]
22pub use build::{build_ic_canister_report, build_ic_canister_report_with_source};
23#[cfg(feature = "host")]
24pub use live::LiveIcSource;
25pub use model::{
26 IcBoundaryNodeDataCenterRow, IcBoundaryNodeDataCentersReport, IcBoundaryNodeDataCentersRequest,
27 IcCanisterCountReport, IcCanisterCountRequest, IcCanisterFilters, IcCanisterPageController,
28 IcCanisterPageReport, IcCanisterPageRequest, IcCanisterPageRow, IcCanisterReport,
29 IcCanisterRequest, IcCanisterUpgrade, IcDailyStatsQuery, IcDailyStatsReport,
30 IcDailyStatsRequest, IcDailyStatsRow, IcDashboardReportProvenance, IcMetricKind,
31 IcMetricObservation, IcMetricQuery, IcMetricReport, IcMetricRequest, IcMetricSeries,
32};
33#[cfg(feature = "host")]
34pub use model::{
35 IcBoundaryNodeDataCentersSourceData, IcCanisterCountSourceData, IcCanisterPageSourceData,
36 IcCanisterSourceData, IcDailyStatsSourceData, IcHostError, IcMetricSourceData, IcSourceRequest,
37};
38#[cfg(feature = "host")]
39pub use source::{IcCanisterCollectionSource, IcCanisterSource, IcMetricSource, IcNetworkSource};
40pub use text::{
41 ic_boundary_node_data_centers_report_text, ic_canister_count_report_text,
42 ic_canister_page_report_text, ic_canister_report_text, ic_daily_stats_report_text,
43 ic_metric_report_text,
44};
45
46pub const DEFAULT_IC_DASHBOARD_SOURCE_ENDPOINT: &str = "https://ic-api.internetcomputer.org/api/v3";
48
49pub const DEFAULT_IC_DASHBOARD_CANISTER_COLLECTION_SOURCE_ENDPOINT: &str =
51 "https://ic-api.internetcomputer.org/api/v4";
52
53pub const DEFAULT_IC_DASHBOARD_METRICS_SOURCE_ENDPOINT: &str =
55 "https://metrics-api.internetcomputer.org/api/v1";
56
57pub const DEFAULT_IC_BOUNDARY_NODE_DATA_CENTERS_SOURCE_ENDPOINT: &str =
59 "https://ic-api.internetcomputer.org/api/v4";
60
61pub const DEFAULT_IC_CANISTER_PAGE_LIMIT: u16 = 50;
63
64pub const MAX_IC_CANISTER_PAGE_LIMIT: u16 = 100;
66
67pub const DEFAULT_IC_METRIC_WINDOW_SECS: u64 = 3_600;
69
70pub const DEFAULT_IC_METRIC_STEP_SECS: u32 = 300;
72
73pub const MIN_IC_METRIC_TIMESTAMP: u64 = 1_620_432_000;
75
76pub const MAX_IC_METRIC_STEP_SECS: u32 = 259_200;
78
79pub const MAX_IC_METRIC_OBSERVATIONS_PER_SERIES: u64 = 1_000;
81
82pub const DEFAULT_IC_DAILY_STATS_WINDOW_SECS: u64 = 7 * 24 * 60 * 60;
84
85pub const MIN_IC_DAILY_STATS_TIMESTAMP: u64 = 1_620_406_800;
87
88pub const MAX_IC_DAILY_STATS_WINDOW_SECS: u64 = 366 * 24 * 60 * 60;
90
91pub const MAX_IC_DAILY_STATS_ROWS: usize = 366;
93
94pub const MAX_IC_BOUNDARY_NODE_DATA_CENTERS: usize = 1_000;
96
97#[cfg(feature = "host")]
98const IC_DASHBOARD_REPORT_SCHEMA_VERSION: u32 = 1;
99#[cfg(feature = "host")]
100const IC_DASHBOARD_AUTHORITY: &str = "official_ic_dashboard_api";
101#[cfg(feature = "host")]
102const IC_DASHBOARD_NETWORK: &str = "ic";
103
104#[cfg(all(test, feature = "host"))]
105mod tests;