Skip to main content

Module drive

Module drive 

Source
Expand description

Google Drive API integration: typed HTTP client, OAuth2 authentication, Files/About API façades, and named-account resolution.

Provides a thin reqwest wrapper around the Drive v3 REST API, authenticated via OAuth2 authorization-code + PKCE (see ADR-0069, which applies ADR-0063 — Gmail’s OAuth2 credential-storage design — to a second Google API). The CLI surface (src/cli/drive.rs, issue #1524) is the first consumer; the MCP surface (issue #1525) is the second, reusing the same façades.

Modules§

about_api
Drive About API wrapper.
account
Named Drive account resolution (mirrors issue #1500/ ADR-0066, applied to Drive by ADR-0069).
auth
Drive OAuth2 authentication: authorization-code + PKCE login, credential storage, and in-memory access-token refresh.
client
Drive REST API client.
content_edit
Drive file content edit — replaces an existing file’s content (issue #1574, ADR-0071).
create
Drive file/folder creation — the first content-mutating capability this feature exists for (issue #1574, ADR-0071).
error
Error types for Drive operations.
file_move
Drive file move — the security-gated capability this whole feature exists for (ADR-0070).
files_api
Drive Files API wrapper.
folder_ancestry
Ancestor folder-chain resolution for crate::drive::write_gate (issue #1574).
permissions_api
Drive Permissions API wrapper.
rename
Drive file rename.
types
Wire types for the Drive v3 REST API.
upload
Drive content upload — creates a new file from local content (issue #1574, ADR-0071).
visibility
Drive move visibility-diff algorithm — the security-critical core of drive move’s safety gate (ADR-0070).
write_gate
Folder-scoped write-permission gate (issue #1574).