feat: Add doctate-client-core crate
Introduces a new crate `doctate-client-core` to house shared client-side logic. This includes: - `case_store`: Manages local case marker files and merging with server snapshots. - `snapshot_cache`: Placeholder for caching server responses. - `oneliner_poller`: Placeholder for the background polling task. The workspace configuration and `Cargo.lock` have been updated to include the new crate.
This commit is contained in:
@@ -18,7 +18,8 @@ use axum::extract::{Query, State};
|
||||
use axum::http::{header, HeaderMap, StatusCode};
|
||||
use axum::response::{IntoResponse, Response};
|
||||
use axum::Json;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use doctate_common::oneliners::{OnelinerEntry, OnelinersResponse};
|
||||
use serde::Deserialize;
|
||||
use time::format_description::well_known::Rfc3339;
|
||||
use time::{Duration, OffsetDateTime};
|
||||
use tracing::warn;
|
||||
@@ -35,21 +36,6 @@ pub struct OnelinersQuery {
|
||||
hours: Option<u32>,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct OnelinersResponse {
|
||||
as_of: String,
|
||||
window_hours: u32,
|
||||
oneliners: Vec<OnelinerEntry>,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct OnelinerEntry {
|
||||
case_id: String,
|
||||
oneliner: Option<String>,
|
||||
created_at: String,
|
||||
updated_at: Option<String>,
|
||||
}
|
||||
|
||||
pub async fn handle_oneliners(
|
||||
user: AuthenticatedUser,
|
||||
State(watermark): State<OnelinerWatermark>,
|
||||
|
||||
Reference in New Issue
Block a user