diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-17 16:42:13 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-17 16:42:13 +0200 |
commit | 8ff95f09c9edf218b6302470cd57868147316e59 (patch) | |
tree | 78d0f99a0a8b005690fc2ec25a59ba9f5a09ce33 /src/api/admin/key.rs | |
parent | 86a3fe8ec56d0ea180b48970fb626d10000dba8d (diff) | |
download | garage-8ff95f09c9edf218b6302470cd57868147316e59.tar.gz garage-8ff95f09c9edf218b6302470cd57868147316e59.zip |
Return website config in GetBucketInfo, use serde(rename_all)
Diffstat (limited to 'src/api/admin/key.rs')
-rw-r--r-- | src/api/admin/key.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/api/admin/key.rs b/src/api/admin/key.rs index 1e910d52..be37088b 100644 --- a/src/api/admin/key.rs +++ b/src/api/admin/key.rs @@ -203,28 +203,27 @@ async fn key_info_results(garage: &Arc<Garage>, key: Key) -> Result<Response<Bod } #[derive(Serialize)] +#[serde(rename_all = "camelCase")] struct GetKeyInfoResult { name: String, - #[serde(rename = "accessKeyId")] access_key_id: String, - #[serde(rename = "secretAccessKey")] secret_access_key: String, permissions: KeyPerm, buckets: Vec<KeyInfoBucketResult>, } #[derive(Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] struct KeyPerm { - #[serde(rename = "createBucket", default)] + #[serde(default)] create_bucket: bool, } #[derive(Serialize)] +#[serde(rename_all = "camelCase")] struct KeyInfoBucketResult { id: String, - #[serde(rename = "globalAliases")] global_aliases: Vec<String>, - #[serde(rename = "localAliases")] local_aliases: Vec<String>, permissions: ApiBucketKeyPerm, } |