mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-12 07:16:52 +00:00
admin api: create structs for all requests/responess in src/api/admin/api.rs
This commit is contained in:
@@ -1,8 +1,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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user