admin api: new router_v2 with unified path syntax

This commit is contained in:
Alex Auvolat
2025-01-28 15:12:03 +01:00
parent 831f2b0207
commit c99bfe69ea
16 changed files with 451 additions and 292 deletions
+9 -2
View File
@@ -4,21 +4,28 @@ mod error;
pub mod api;
mod router_v0;
mod router_v1;
mod router_v2;
mod bucket;
mod cluster;
mod key;
mod special;
use std::sync::Arc;
use async_trait::async_trait;
use serde::Serialize;
use garage_model::garage::Garage;
pub enum Authorization {
None,
MetricsToken,
AdminToken,
}
#[async_trait]
pub trait EndpointHandler {
type Response: Serialize;
type Response;
async fn handle(self, garage: &Arc<Garage>) -> Result<Self::Response, error::Error>;
}