aboutsummaryrefslogtreecommitdiff
path: root/aero-collections/src/calendar/mod.rs
blob: 6537a4e4bc234867af02d9a77fe87a871bb34646 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
pub mod namespace;

use anyhow::Result;
use tokio::sync::RwLock;

use aero_bayou::Bayou;
use aero_user::login::Credentials;
use aero_user::cryptoblob::{self, gen_key, open_deserialize, seal_serialize, Key};
use aero_user::storage::{self, BlobRef, BlobVal, RowRef, RowVal, Selector, Store};

use crate::unique_ident::*;
use crate::davdag::DavDag;

pub struct Calendar {
    pub(super) id: UniqueIdent,
    internal: RwLock<CalendarInternal>,
}

impl Calendar {
    pub(crate) async fn open(
        creds: &Credentials,
        id: UniqueIdent,
    ) -> Result<Self> {
        todo!();
    }
}

struct CalendarInternal {
    id: UniqueIdent,
    cal_path: String,
    encryption_key: Key,
    storage: Store,
    uid_index: Bayou<DavDag>,
}