Migrate RPC to new schema

This commit is contained in:
Quentin
2020-12-14 21:46:49 +01:00
parent 96388acf23
commit d0eb6a457f
2 changed files with 14 additions and 6 deletions
+10 -4
View File
@@ -55,14 +55,20 @@ impl CRDT for BucketParams {
}
}
impl BucketParams {
pub fn new() -> Self {
BucketParams {
authorized_keys: crdt::LWWMap::new(),
website: crdt::LWW::new(false)
}
}
}
impl Bucket {
pub fn new(name: String) -> Self {
Bucket {
name,
state: crdt::LWW::new(BucketState::Present(BucketParams {
authorized_keys: crdt::LWWMap::new(),
website: crdt::LWW::new(false)
})),
state: crdt::LWW::new(BucketState::Present(BucketParams::new())),
}
}
pub fn is_deleted(&self) -> bool {