Xuanwo commented on code in PR #4002:
URL:
https://github.com/apache/incubator-opendal/pull/4002#discussion_r1455031851
##########
core/src/services/gdrive/builder.rs:
##########
@@ -23,41 +23,63 @@ use std::sync::Arc;
use chrono::DateTime;
use chrono::Utc;
use log::debug;
+use serde::Deserialize;
use tokio::sync::Mutex;
use super::backend::GdriveBackend;
-use crate::raw::HttpClient;
use crate::raw::{normalize_root, PathCacher};
+use crate::raw::{ConfigDeserializer, HttpClient};
use crate::services::gdrive::core::GdriveSigner;
use crate::services::gdrive::core::{GdriveCore, GdrivePathQuery};
use crate::Scheme;
use crate::*;
+/// [GoogleDrive](https://drive.google.com/) configuration.
+#[derive(Default, Deserialize)]
+#[serde(default)]
+#[non_exhaustive]
+pub struct GdriveConfig {
+ /// The root for gdrive
+ pub root: Option<String>,
+ /// Access token for gdrive.
+ pub access_token: Option<String>,
+ /// Refresh token for gdrive.
+ pub refresh_token: Option<String>,
+ /// Client id for gdrive.
+ pub client_id: Option<String>,
+ /// Client secret for gdrive.
+ pub client_secret: Option<String>,
Review Comment:
> Maybe add an option for permanent remove or temporary trash by default?
We can add an option for permanent deletion if users request it in the
future.
> And only judging by config is kind of too dull, we may also extend
OpDelete with an optional field, as an override to the config.
I feel like this idea is not cool since not all services have such concept.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]