This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 1ac054d0b feat(doc): add OpenStack Swift document for the website 
(#3494)
1ac054d0b is described below

commit 1ac054d0bde5716b982efd9412d769fd304a591e
Author: Morris Tai <[email protected]>
AuthorDate: Mon Nov 6 20:06:34 2023 -0500

    feat(doc): add OpenStack Swift document for the website (#3494)
    
    * feat: add OpenStack Swift document for the website
    
    * chore: fix typo
---
 website/docs/services/swift.mdx | 70 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/website/docs/services/swift.mdx b/website/docs/services/swift.mdx
new file mode 100644
index 000000000..bec27ea6f
--- /dev/null
+++ b/website/docs/services/swift.mdx
@@ -0,0 +1,70 @@
+---
+title: Swift
+---
+
+[OpenStack Swift](https://docs.openstack.org/api-ref/object-store/) service 
support.
+
+import Docs from '../../../core/src/services/swift/docs.md'
+
+<Docs components={props.components} />
+
+### Via Config
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+<Tabs>
+  <TabItem value="rust" label="Rust" default>
+
+```rust
+use anyhow::Result;
+use opendal::Operator;
+use opendal::Scheme;
+use std::collections::HashMap;
+
+#[tokio::main]
+async fn main() -> Result<()> {
+    let mut map = HashMap::new();
+    map.insert("endpoint".to_string(), "http://127.0.0.1:8080".to_string());
+    map.insert("account".to_string(), "test_account".to_string());
+    map.insert("container".to_string(), "test_container".to_string());
+    map.insert("token".to_string(), "test_token".to_string());
+    map.insert("root".to_string(), "/".to_string());
+
+    let op: Operator = Operator::via_map(Scheme::Swift, map)?;
+    Ok(())
+}
+```
+
+  </TabItem>
+  <TabItem value="node.js" label="Node.js">
+
+```javascript
+import { Operator } from "opendal";
+async function main() {
+  const op = new Operator("swift", {
+    endpoint: "http://127.0.0.1:8080";,
+    account: "test_account",
+    container: "test_container",
+    token: "test_token",
+    root: "/",
+  });
+}
+```
+
+  </TabItem>
+  <TabItem value="python" label="Python">
+
+```python
+import opendal
+op = opendal.Operator("swift",
+    endpoint="http://127.0.0.1:8080";
+    account="test_account",
+    container="test_container",
+    token="test_token",
+    root="/",
+)
+```
+
+  </TabItem>
+</Tabs>
\ No newline at end of file

Reply via email to