espresso_api/v1/database.rs
1//! V1 database API.
2//!
3//! Diagnostic-only; the response shape is not part of the stable API.
4
5use async_trait::async_trait;
6use serde::Serialize;
7
8#[async_trait]
9pub trait DatabaseApi {
10 type TableSizes: Serialize + Send + Sync + 'static;
11 type MigrationStatus: Serialize + Send + Sync + 'static;
12
13 async fn get_table_sizes(&self) -> anyhow::Result<Self::TableSizes>;
14 async fn get_migration_status(&self) -> anyhow::Result<Self::MigrationStatus>;
15}