aboutsummaryrefslogtreecommitdiff
path: root/src/model/key_table.rs
diff options
context:
space:
mode:
authorTrinity Pointard <trinity.pointard@gmail.com>2021-04-06 05:25:28 +0200
committerAlex Auvolat <alex@adnab.me>2021-04-27 16:47:08 +0200
commit74373aebcfdfcf5c03e4fb6510d8dd664a0b9b88 (patch)
treed33d89915de29eb69e1b527c686f26358fcd2b45 /src/model/key_table.rs
parent16300bbd89235dfb5852413cd451535559664594 (diff)
downloadgarage-74373aebcfdfcf5c03e4fb6510d8dd664a0b9b88.tar.gz
garage-74373aebcfdfcf5c03e4fb6510d8dd664a0b9b88.zip
make most requested changes
Diffstat (limited to 'src/model/key_table.rs')
-rw-r--r--src/model/key_table.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/model/key_table.rs b/src/model/key_table.rs
index 444f3949..e1dcd7f4 100644
--- a/src/model/key_table.rs
+++ b/src/model/key_table.rs
@@ -6,7 +6,7 @@ use garage_table::*;
/// An api key
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
pub struct Key {
- /// The id of the key (immutable)
+ /// The id of the key (immutable), used as partition key
pub key_id: String,
/// The secret_key associated
@@ -19,6 +19,7 @@ pub struct Key {
pub deleted: crdt::Bool,
/// Buckets in which the key is authorized. Empty if `Key` is deleted
+ // CRDT interaction: deleted implies authorized_buckets is empty
pub authorized_buckets: crdt::LWWMap<String, PermissionSet>,
}