aboutsummaryrefslogtreecommitdiff
path: root/src/api/admin/mod.rs
blob: e64eca7e2a0568acbc375d65dec56f1817af707a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
pub mod api_server;
mod error;

pub mod api;
mod router_v0;
mod router_v1;

mod bucket;
mod cluster;
mod key;

use std::sync::Arc;

use async_trait::async_trait;
use serde::Serialize;

use garage_model::garage::Garage;

#[async_trait]
pub trait EndpointHandler {
	type Response: Serialize;

	async fn handle(self, garage: &Arc<Garage>) -> Result<Self::Response, error::Error>;
}