river_data_core/models/
backend.rs1use chrono::{DateTime, Utc};
2use uuid::Uuid;
3
4use crate::models::streams::{IngestReading, IngestStatusEvent};
5
6#[derive(Debug, Clone)]
8pub struct StreamDescriptor {
9 pub source_key: String,
11 pub source_name: String,
13 pub source_path: String,
15 pub metadata: serde_json::Value,
16 pub measurement_type: Option<String>,
18}
19
20#[derive(Debug, Clone)]
22pub struct StreamFetchRequest {
23 pub stream_id: Uuid,
24 pub source_key: String,
25 pub since: Option<DateTime<Utc>>,
27}
28
29#[derive(Debug)]
31pub struct StreamReadings {
32 pub stream_id: Uuid,
33 pub source_key: String,
34 pub readings: Vec<IngestReading>,
35}
36
37#[derive(Debug)]
39pub struct StreamStatusEvents {
40 pub stream_id: Uuid,
41 pub source_key: String,
42 pub events: Vec<IngestStatusEvent>,
43}