Skip to main content

gdrive

6 configuration options · available in Rust, Java, Python, Node.js, Go

Quick start
use opendal::Operator;

let operator = Operator::via_iter("gdrive", [
])?;
All configuration options (copy & trim)
Full reference
use opendal::Operator;

let operator = Operator::via_iter("gdrive", [
// The root for gdrive
// ("root".to_string(), "...".to_string()),

// Access token for gdrive.
// ("access_token".to_string(), "...".to_string()),

// Refresh token for gdrive.
// ("refresh_token".to_string(), "...".to_string()),

// Client id for gdrive.
// ("client_id".to_string(), "...".to_string()),

// Client secret for gdrive.
// ("client_secret".to_string(), "...".to_string()),

// Shared drive (formerly Team Drive) id for gdrive.
//
// When set, gdrive resolves `root` inside this shared drive instead of
// the user's My Drive.
// ("drive_id".to_string(), "...".to_string()),
])?;

Every option is passed as a string key; OpenDAL parses it into the right type. Some services may require building the binding with the matching services-* feature enabled.

Configuration reference

General6
KeyTypeRequiredDescription
rootstringnoThe root for gdrive
access_tokenstringnoAccess token for gdrive.
refresh_tokenstringnoRefresh token for gdrive.
client_idstringnoClient id for gdrive.
client_secretstringnoClient secret for gdrive.
drive_idstringnoShared drive (formerly Team Drive) id for gdrive. When set, gdrive resolves root inside this shared drive instead of the user's My Drive.