carddav: Implement DAV Push

This commit is contained in:
Lennart
2025-01-15 17:14:33 +01:00
parent 618ed3b327
commit 751c2d1ce7
15 changed files with 276 additions and 113 deletions

View File

@@ -1,5 +1,6 @@
use super::ChangeOperation;
use async_trait::async_trait;
use derive_more::derive::Constructor;
use rustical_store::synctoken::format_synctoken;
use rustical_store::{Calendar, CalendarObject, CalendarStore, Error};
use rustical_store::{CollectionOperation, CollectionOperationType};
@@ -65,18 +66,12 @@ async fn log_object_operation(
Ok(format_synctoken(synctoken))
}
#[derive(Debug)]
#[derive(Debug, Constructor)]
pub struct SqliteCalendarStore {
db: SqlitePool,
sender: Sender<CollectionOperation>,
}
impl SqliteCalendarStore {
pub fn new(db: SqlitePool, sender: Sender<CollectionOperation>) -> Self {
Self { db, sender }
}
}
#[async_trait]
impl CalendarStore for SqliteCalendarStore {
#[instrument]