Skip to main content

Module service_gcal

Module service_gcal 

Source
Expand description

Google Calendar’s plug-in to the generic service lifecycle.

Everything Google-specific lives here: the OAuth 2.0 three-field credential shape, the flags that let the user paste in a pre-minted refresh token (or run the interactive loopback flow), and the token → userinfo call that validates a credential set. The generic plumbing (flag parsing, path resolution, JSON envelopes, human banners, keychain I/O sequencing) lives in src/cli/lifecycle.rs and is shared with every other service.

See docs/services.md#adding-a-new-service for the full recipe.

Structs§

CreateArgs
GcalLifecycle
GcalSecrets
Google Calendar’s credential shape — OAuth 2.0 “Desktop app”: client_id + client_secret + a long-lived refresh_token. All three are persisted in the OS keychain; the access token is re-minted at each CLI invocation.

Functions§

google_scopes_for
Compute the minimal set of Google OAuth scopes to request, given the zad-level scopes the operator declared. We keep the consent screen as narrow as possible.