store: Add get_deleted_(addressbooks/calendars)

This commit is contained in:
Lennart
2024-11-10 13:18:28 +01:00
parent 5c02ae4cb6
commit 43ff0c6671
6 changed files with 38 additions and 3 deletions

View File

@@ -1,7 +1,8 @@
use crate::synctoken::format_synctoken;
use chrono::NaiveDateTime;
use serde::Serialize;
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize)]
pub struct Addressbook {
pub id: String,
pub principal: String,

View File

@@ -8,6 +8,7 @@ use async_trait::async_trait;
pub trait AddressbookStore: Send + Sync + 'static {
async fn get_addressbook(&self, principal: &str, id: &str) -> Result<Addressbook, Error>;
async fn get_addressbooks(&self, principal: &str) -> Result<Vec<Addressbook>, Error>;
async fn get_deleted_addressbooks(&self, principal: &str) -> Result<Vec<Addressbook>, Error>;
async fn update_addressbook(
&self,

View File

@@ -1,8 +1,8 @@
use crate::synctoken::format_synctoken;
use chrono::NaiveDateTime;
use serde::{Deserialize, Serialize};
use serde::Serialize;
#[derive(Debug, Default, Clone, Deserialize, Serialize)]
#[derive(Debug, Default, Clone, Serialize)]
pub struct Calendar {
pub principal: String,
pub id: String,

View File

@@ -6,6 +6,7 @@ use async_trait::async_trait;
pub trait CalendarStore: Send + Sync + 'static {
async fn get_calendar(&self, principal: &str, id: &str) -> Result<Calendar, Error>;
async fn get_calendars(&self, principal: &str) -> Result<Vec<Calendar>, Error>;
async fn get_deleted_calendars(&self, principal: &str) -> Result<Vec<Calendar>, Error>;
async fn update_calendar(
&self,