2024-03-20 16:31:54 +00:00
|
|
|
pub mod namespace;
|
|
|
|
|
2024-03-26 14:08:04 +00:00
|
|
|
use anyhow::Result;
|
2024-03-27 09:33:46 +00:00
|
|
|
use tokio::sync::RwLock;
|
2024-03-26 14:08:04 +00:00
|
|
|
|
2024-03-27 09:33:46 +00:00
|
|
|
use aero_bayou::Bayou;
|
2024-03-26 14:08:04 +00:00
|
|
|
use aero_user::login::Credentials;
|
2024-03-27 09:33:46 +00:00
|
|
|
use aero_user::cryptoblob::{self, gen_key, open_deserialize, seal_serialize, Key};
|
|
|
|
use aero_user::storage::{self, BlobRef, BlobVal, RowRef, RowVal, Selector, Store};
|
2024-03-26 14:08:04 +00:00
|
|
|
|
|
|
|
use crate::unique_ident::*;
|
2024-03-27 09:33:46 +00:00
|
|
|
use crate::davdag::DavDag;
|
2024-03-26 14:08:04 +00:00
|
|
|
|
2024-03-20 16:31:54 +00:00
|
|
|
pub struct Calendar {
|
2024-03-27 09:33:46 +00:00
|
|
|
pub(super) id: UniqueIdent,
|
|
|
|
internal: RwLock<CalendarInternal>,
|
2024-03-20 16:31:54 +00:00
|
|
|
}
|
2024-03-26 14:08:04 +00:00
|
|
|
|
|
|
|
impl Calendar {
|
|
|
|
pub(crate) async fn open(
|
|
|
|
creds: &Credentials,
|
|
|
|
id: UniqueIdent,
|
|
|
|
) -> Result<Self> {
|
|
|
|
todo!();
|
|
|
|
}
|
|
|
|
}
|
2024-03-27 09:33:46 +00:00
|
|
|
|
|
|
|
struct CalendarInternal {
|
|
|
|
id: UniqueIdent,
|
|
|
|
cal_path: String,
|
|
|
|
encryption_key: Key,
|
|
|
|
storage: Store,
|
|
|
|
uid_index: Bayou<DavDag>,
|
|
|
|
}
|