Xuanwo commented on code in PR #3604:
URL: 
https://github.com/apache/incubator-opendal/pull/3604#discussion_r1400014422


##########
core/src/services/b2/backend.rs:
##########
@@ -0,0 +1,550 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::collections::HashMap;
+use std::fmt::Debug;
+use std::fmt::Formatter;
+use std::sync::Arc;
+
+use async_trait::async_trait;
+use http::Request;
+use http::StatusCode;
+use log::debug;
+use serde::Deserialize;
+use tokio::sync::RwLock;
+
+use crate::raw::*;
+use crate::services::b2::core::B2Signer;
+use crate::services::b2::core::ListFileNamesResponse;
+use crate::*;
+
+use super::core::constants;
+use super::core::parse_file_info;
+use super::core::B2Core;
+use super::error::parse_error;
+use super::lister::B2Lister;
+use super::writer::B2Writer;
+use super::writer::B2Writers;
+
+/// Config for backblaze b2 services support.
+#[derive(Default, Deserialize)]
+#[serde(default)]
+#[non_exhaustive]
+pub struct B2Config {
+    /// root of this backend.
+    ///
+    /// All operations will happen under this root.
+    pub root: Option<String>,
+    /// keyID of this backend.
+    ///
+    /// - If key_id is set, we will take user's input first.
+    /// - If not, we will try to load it from environment.
+    pub key_id: Option<String>,
+    /// applicationKey of this backend.
+    ///
+    /// - If application_key is set, we will take user's input first.
+    /// - If not, we will try to load it from environment.
+    pub application_key: Option<String>,
+    /// bucket of this backend.
+    ///
+    /// required.
+    pub bucket: String,
+    /// bucket id of this backend.
+    ///
+    /// required.
+    pub bucket_id: String,

Review Comment:
   You can create an issue to track this.



##########
core/src/services/b2/backend.rs:
##########
@@ -0,0 +1,550 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::collections::HashMap;
+use std::fmt::Debug;
+use std::fmt::Formatter;
+use std::sync::Arc;
+
+use async_trait::async_trait;
+use http::Request;
+use http::StatusCode;
+use log::debug;
+use serde::Deserialize;
+use tokio::sync::RwLock;
+
+use crate::raw::*;
+use crate::services::b2::core::B2Signer;
+use crate::services::b2::core::ListFileNamesResponse;
+use crate::*;
+
+use super::core::constants;
+use super::core::parse_file_info;
+use super::core::B2Core;
+use super::error::parse_error;
+use super::lister::B2Lister;
+use super::writer::B2Writer;
+use super::writer::B2Writers;
+
+/// Config for backblaze b2 services support.
+#[derive(Default, Deserialize)]
+#[serde(default)]
+#[non_exhaustive]
+pub struct B2Config {
+    /// root of this backend.
+    ///
+    /// All operations will happen under this root.
+    pub root: Option<String>,
+    /// keyID of this backend.
+    ///
+    /// - If key_id is set, we will take user's input first.
+    /// - If not, we will try to load it from environment.
+    pub key_id: Option<String>,
+    /// applicationKey of this backend.
+    ///
+    /// - If application_key is set, we will take user's input first.
+    /// - If not, we will try to load it from environment.
+    pub application_key: Option<String>,
+    /// bucket of this backend.
+    ///
+    /// required.
+    pub bucket: String,
+    /// bucket id of this backend.
+    ///
+    /// required.
+    pub bucket_id: String,

Review Comment:
   You can create an issue to track this review.



-- 
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]

Reply via email to