pub struct GoogleCalendarAccessService { /* private fields */ }Expand description
Checks current EME permissions and resolves the owner’s credential for a read.
Implementations§
Source§impl GoogleCalendarAccessService
impl GoogleCalendarAccessService
pub fn new( calendars: Arc<dyn ConnectedCalendarStore>, connections: Arc<dyn ExternalConnectionStore>, families: Arc<FamilyService>, ) -> Self
Sourcepub async fn list_readable_calendars(
&self,
user_id: &str,
family_id: Option<&str>,
) -> Result<Vec<ConnectedCalendar>, GoogleCalendarAccessError>
pub async fn list_readable_calendars( &self, user_id: &str, family_id: Option<&str>, ) -> Result<Vec<ConnectedCalendar>, GoogleCalendarAccessError>
List calendars visible to the caller without decrypting any credentials.
The optional family ID must come from trusted ToolContext. Family roster membership is resolved live, so stale shares for departed owners vanish.
Sourcepub async fn list_readable_calendars_with_permissions(
&self,
user_id: &str,
family_id: Option<&str>,
) -> Result<Vec<(ConnectedCalendar, bool)>, GoogleCalendarAccessError>
pub async fn list_readable_calendars_with_permissions( &self, user_id: &str, family_id: Option<&str>, ) -> Result<Vec<(ConnectedCalendar, bool)>, GoogleCalendarAccessError>
List calendars visible to the caller together with their effective write permission, combining EME settings, family sharing and Google OAuth scopes.
Authorize a read using trusted caller and selected-family context.
Authorize a write. EME permissions and Google’s granted write scope are checked before the owner’s refresh token is decrypted.
Auto Trait Implementations§
impl !RefUnwindSafe for GoogleCalendarAccessService
impl !UnwindSafe for GoogleCalendarAccessService
impl Freeze for GoogleCalendarAccessService
impl Send for GoogleCalendarAccessService
impl Sync for GoogleCalendarAccessService
impl Unpin for GoogleCalendarAccessService
impl UnsafeUnpin for GoogleCalendarAccessService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more