diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-11 11:10:28 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-11 11:10:28 +0200 |
commit | 5c00c9fb46305b021b5fc45d7ae7b1e13b72030c (patch) | |
tree | 4c38ca477cd293e4e94b744a8c209d6d159c1ad7 /src/api/admin/api_server.rs | |
parent | f97a7845e9e9ab68c3b8afc0d1091765ed11439c (diff) | |
download | garage-5c00c9fb46305b021b5fc45d7ae7b1e13b72030c.tar.gz garage-5c00c9fb46305b021b5fc45d7ae7b1e13b72030c.zip |
First key endpoints: ListKeys and GetKeyInfo
Diffstat (limited to 'src/api/admin/api_server.rs')
-rw-r--r-- | src/api/admin/api_server.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/api/admin/api_server.rs b/src/api/admin/api_server.rs index 3ae9f591..e44443ff 100644 --- a/src/api/admin/api_server.rs +++ b/src/api/admin/api_server.rs @@ -19,6 +19,7 @@ use crate::error::*; use crate::generic_server::*; use crate::admin::cluster::*; +use crate::admin::key::*; use crate::admin::router::{Authorization, Endpoint}; pub struct AdminApiServer { @@ -125,10 +126,16 @@ impl ApiHandler for AdminApiServer { Endpoint::Options => self.handle_options(&req), Endpoint::Metrics => self.handle_metrics(), Endpoint::GetClusterStatus => handle_get_cluster_status(&self.garage).await, + // Layout Endpoint::GetClusterLayout => handle_get_cluster_layout(&self.garage).await, Endpoint::UpdateClusterLayout => handle_update_cluster_layout(&self.garage, req).await, Endpoint::ApplyClusterLayout => handle_apply_cluster_layout(&self.garage, req).await, Endpoint::RevertClusterLayout => handle_revert_cluster_layout(&self.garage, req).await, + // Keys + Endpoint::ListKeys => handle_list_keys(&self.garage).await, + Endpoint::GetKeyInfo { id, search } => { + handle_get_key_info(&self.garage, id, search).await + } _ => Err(Error::NotImplemented(format!( "Admin endpoint {} not implemented yet", endpoint.name() |