diff --git a/website/docs/binding-java.md b/website/docs/binding-java.md new file mode 100644 index 00000000000..5c680736d87 --- /dev/null +++ b/website/docs/binding-java.md @@ -0,0 +1,8 @@ +--- +title: Java API +sidebar_position: 4 +--- + +Read the nightly version of Java API docs at [here](pathname:///docs/java/). + +Read the latest stable version instead at https://javadoc.io/doc/org.apache.opendal/opendal-java/latest/index.html. diff --git a/website/docs/binding-nodejs.md b/website/docs/binding-nodejs.md new file mode 100644 index 00000000000..5676c786d59 --- /dev/null +++ b/website/docs/binding-nodejs.md @@ -0,0 +1,8 @@ +--- +title: Node.js API +sidebar_position: 6 +--- + +Read the nightly version of Node.js API docs at [here](pathname:///docs/nodejs/). + +Read the README of latest stable version instead at https://www.npmjs.com/package/opendal. diff --git a/website/docs/binding-python.md b/website/docs/binding-python.md new file mode 100644 index 00000000000..1ecef1bcea2 --- /dev/null +++ b/website/docs/binding-python.md @@ -0,0 +1,8 @@ +--- +title: Python API +sidebar_position: 5 +--- + +Read the nightly version of Python API docs at [here](pathname:///docs/python/). + +Read the README of latest stable version instead at https://pypi.org/project/opendal/. diff --git a/website/docs/dav-server.md b/website/docs/dav-server.md new file mode 100644 index 00000000000..25ee30f44c4 --- /dev/null +++ b/website/docs/dav-server.md @@ -0,0 +1,8 @@ +--- +title: WebDAV Integration +sidebar_position: 8 +--- + +Read the nightly version of the API docs at [here](pathname:///docs/dav-server-opendalfs/dav_server_opendalfs). + +Read the latest stable version instead at https://docs.rs/dav-server-opendalfs/latest/dav_server_opendalfs/index.html. diff --git a/website/docs/integrations/_category_.yml b/website/docs/integrations/_category_.yml deleted file mode 100644 index d0564dc61a8..00000000000 --- a/website/docs/integrations/_category_.yml +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - -position: 5 -label: 'Integrations' -collapsible: true -collapsed: true -link: - type: generated-index - title: Integrations diff --git a/website/docs/integrations/dav-server-opendalfs.mdx b/website/docs/integrations/dav-server-opendalfs.mdx deleted file mode 100644 index 6c0c8d03aee..00000000000 --- a/website/docs/integrations/dav-server-opendalfs.mdx +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: dav-server-opendalfs ---- - -import Docs from '../../../integrations/dav-server/README.md' - - diff --git a/website/docs/integrations/object_store_opendal.mdx b/website/docs/integrations/object_store_opendal.mdx deleted file mode 100644 index 28f1c474830..00000000000 --- a/website/docs/integrations/object_store_opendal.mdx +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: object_store_opendal ---- - -[`object_store_opendal`](https://crates.io/crates/object_store_opendal) is an integration which uses OpenDAL as a backend for the [object_store](https://docs.rs/object_store/latest/object_store/). - -import Docs from '../../../integrations/object_store/README.md' - - diff --git a/website/docs/object-store.md b/website/docs/object-store.md new file mode 100644 index 00000000000..1678ef9f7b7 --- /dev/null +++ b/website/docs/object-store.md @@ -0,0 +1,8 @@ +--- +title: object_store Integration +sidebar_position: 7 +--- + +Read the nightly version of the API docs at [here](pathname:///docs/object-store-opendal/object_store_opendal). + +Read the latest stable version instead at https://docs.rs/object_store_opendal/latest/object_store_opendal/index.html. diff --git a/website/docs/quickstart.md b/website/docs/quickstart.md index ee1397df294..b79320cb63f 100644 --- a/website/docs/quickstart.md +++ b/website/docs/quickstart.md @@ -1,6 +1,6 @@ --- title: Quickstart -sidebar_position: 3 +sidebar_position: 2 --- Apache OpenDAL™ can be easily integrated into different software with its Rust core and multilingual bindings. @@ -20,7 +20,7 @@ cargo add opendal Or add the following line to your Cargo.toml: ```shell -opendal = "0.40.0" +opendal = "0.46.0" ``` ### Demo diff --git a/website/docs/rust-core.md b/website/docs/rust-core.md new file mode 100644 index 00000000000..e1b5c373078 --- /dev/null +++ b/website/docs/rust-core.md @@ -0,0 +1,18 @@ +--- +title: Rust Core +sidebar_position: 3 +--- + +Read the nightly version of Rust API docs at [here](pathname:///docs/rust/opendal/). + +Read the latest stable version instead at https://docs.rs/opendal/latest/opendal/index.html. + +Below are selected docs you should read: + +| Topic | Link | +| -------- | --------------------------------------------------------------- | +| Usage | https://docs.rs/opendal/latest/opendal/index.html | +| Concepts | https://docs.rs/opendal/latest/opendal/docs/concepts/index.html | +| Services | https://docs.rs/opendal/latest/opendal/services/index.html | +| Layers | https://docs.rs/opendal/latest/opendal/layers/index.html | +| Upgrade | https://docs.rs/opendal/latest/opendal/docs/upgrade/index.html | diff --git a/website/docs/services/_category_.yml b/website/docs/services/_category_.yml deleted file mode 100644 index 4c79c1c6d4b..00000000000 --- a/website/docs/services/_category_.yml +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - -position: 4 -label: 'Services' -collapsible: true -collapsed: true -link: - type: generated-index - title: Services diff --git a/website/docs/services/atomicserver.mdx b/website/docs/services/atomicserver.mdx deleted file mode 100644 index f2b65d503f6..00000000000 --- a/website/docs/services/atomicserver.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: AtomicServer ---- - -[Atomic-Server](https://docs.atomicdata.dev/) services support. - -import Docs from '../../../core/src/services/atomicserver/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```rust -use anyhow::Result; -use opendal::services::Sqlite; -use opendal::Operator; - -#[tokio::main] -async fn main() -> Result<()> { - - let mut map = HashMap::new(); - map.insert("endpoint".to_string(), "http://localhost:9883".to_string()); - map.insert("private_key".to_string(), "your_private_key".to_string()); - map.insert("public_key".to_string(), "your_public_key".to_string()); - map.insert("parent_resource_id".to_string(), "your_resource_id".to_string()); - - let op: Operator = Operator::via_map(Scheme::Atomicserver, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from require('opendal'); - -async function main() { - const op = new Operator("atomicserver", { - endpoint: 'http://localhost:9883', - private_key: 'your_private_key', - public_key: 'your_public_key', - parent_resource_id: 'your_resource_id', - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("atomicserver", { - "connection_string": "http://localhost:9883", - "private_key": "your_private_key", - "public_key": "your_public_key", - "parent_resource_id": "your_resource_id", -}) -``` - - - \ No newline at end of file diff --git a/website/docs/services/azblob.mdx b/website/docs/services/azblob.mdx deleted file mode 100644 index 53ebe3ce8ae..00000000000 --- a/website/docs/services/azblob.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Azblob ---- - -Azure Storage Blob services support. - -import Docs from '../../../core/src/services/azblob/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - map.insert("container".to_string(), "test".to_string()); - map.insert("endpoint".to_string(), "http://127.0.0.1:10000/devstoreaccount1".to_string()); - map.insert("account_name".to_string(), "devstoreaccount1".to_string()); - map.insert("account_key".to_string(), "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==".to_string()); - - let op: Operator = Operator::via_map(Scheme::Azblob, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("azblob", { - root: "/path/to/dir", - container: "test", - endpoint: "http://127.0.0.1:10000/devstoreaccount1", - account_name: "devstoreaccount1", - account_key: "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("azblob", - root="/path/to/dir", - container="test", - endpoint="http://127.0.0.1:10000/devstoreaccount1", - account_name="devstoreaccount1", - account_key="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==", -) -``` - - - diff --git a/website/docs/services/azdls.mdx b/website/docs/services/azdls.mdx deleted file mode 100644 index 92555b2f645..00000000000 --- a/website/docs/services/azdls.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: Azdls ---- - -Azure Data Lake Storage Gen2 Support. - -import Docs from '../../../core/src/services/azdls/docs.md' - - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - map.insert("filesystem".to_string(), "test".to_string()); - map.insert("endpoint".to_string(), "https://accountname.dfs.core.windows.net".to_string()); - map.insert("account_name".to_string(), "account_name".to_string()); - map.insert("account_key".to_string(), "account_key".to_string()); - - let op: Operator = Operator::via_map(Scheme::Azdls, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("azdls", { - root: "/path/to/dir", - filesystem: "test", - endpoint: "https://accountname.dfs.core.windows.net", - account_name: "account_name", - account_key: "account_key", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("azdls", - root="/path/to/dir", - filesystem="test", - endpoint="https://accountname.dfs.core.windows.net", - account_name="account_name", - account_key="account_key", -) -``` - - - diff --git a/website/docs/services/cacache.mdx b/website/docs/services/cacache.mdx deleted file mode 100644 index d3262cbf6d7..00000000000 --- a/website/docs/services/cacache.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Cacache ---- - -[Cacache](https://github.com/zkat/cacache-rs) services support. - -import Docs from '../../../core/src/services/cacache/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```rust -use anyhow::Result; -use opendal::services::Cacache; -use opendal::Operator; - -#[tokio::main] -async fn main() -> Result<()> { - - let mut map = HashMap::new(); - map.insert("datadir".to_string(), "/tmp/opendal/cacache".to_string()); - - let op: Operator = Operator::via_map(Scheme::Cacache, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from require('opendal'); - -async function main() { - const op = new Operator("cacache", { - datadir: '/tmp/opendal/cacache' - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("cacache", { - "datadir": "/tmp/opendal/cacache" -}) -``` - - - diff --git a/website/docs/services/cos.mdx b/website/docs/services/cos.mdx deleted file mode 100644 index d2b9d25c5cc..00000000000 --- a/website/docs/services/cos.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: COS ---- - -Tencent Cloud COS services support. - -import Docs from '../../../core/src/services/cos/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("bucket".to_string(), "test".to_string()); - map.insert("endpoint".to_string(), "https://cos.ap-singapore.myqcloud.com".to_string()); - map.insert("secret_id".to_string(), "secret_id".to_string()); - map.insert("secret_key".to_string(), "secret_access_key".to_string()); - - let op: Operator = Operator::via_map(Scheme::Cos, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("cos", { - bucket: "test", - endpoint: "https://cos.ap-singapore.myqcloud.com", - secret_id: "secret_id", - secret_key: "secret_access_key", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("cos", - bucket="test", - endpoint="https://cos.ap-singapore.myqcloud.com", - secret_id="secret_id", - secret_key="secret_access_key", -) -``` - - - - diff --git a/website/docs/services/d1.mdx b/website/docs/services/d1.mdx deleted file mode 100644 index b7c3a1a4158..00000000000 --- a/website/docs/services/d1.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: D1 ---- - -[D1](https://developers.cloudflare.com/d1/) services support. - -import Docs from '../../../core/src/services/d1/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("token".to_string(), "token".to_string()); - map.insert("account_id".to_string(), "account_id".to_string()); - map.insert("database_id".to_string(), "database_id".to_string()); - map.insert("table".to_string(), "table".to_string()); - map.insert("key_field".to_string(), "key_field".to_string()); - map.insert("value_field".to_string(), "value_field".to_string()); - - let op: Operator = Operator::via_map(Scheme::D1, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const config = { - token: "token", - account_id: "account_id", - database_id: "database_id", - table: "table", - key_field: "key_field", - value_field: "value_field" - }; - const op = new Operator("d1", config); -} -``` - - - - -```python -import opendal - -config = { - "token": "token", - "account_id": "account_id", - "database_id": "database_id", - "table": "table", - "key_field": "key_field", - "value_field": "value_field" -} - -op = opendal.Operator("d1", **config) -``` - - - \ No newline at end of file diff --git a/website/docs/services/dashmap.mdx b/website/docs/services/dashmap.mdx deleted file mode 100644 index 952acb11525..00000000000 --- a/website/docs/services/dashmap.mdx +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: DashMap ---- - -[dashmap](https://github.com/xacrimon/dashmap) backend support. - -import Docs from '../../../core/src/services/dashmap/docs.md' - - diff --git a/website/docs/services/dropbox.mdx b/website/docs/services/dropbox.mdx deleted file mode 100644 index 6b04605aa59..00000000000 --- a/website/docs/services/dropbox.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Dropbox ---- - -[Dropbox](https://www.dropbox.com/) services support. - -import Docs from '../../../core/src/services/dropbox/docs.md' - - - -### Via Config - - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - map.insert("access_token".to_string(), "your_access_token".to_string()); - - let op: Operator = Operator::via_map(Scheme::Dropbox, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("dropbox", { - root: "/path/to/dir", - access_token: "your_access_token", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("dropbox", - root="/path/to/dir", - access_token="your_access_token", -) -``` - - - - - diff --git a/website/docs/services/etcd.mdx b/website/docs/services/etcd.mdx deleted file mode 100644 index e0ca963a74a..00000000000 --- a/website/docs/services/etcd.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Etcd ---- - -[Etcd](https://etcd.io/) services support. - -import Docs from '../../../core/src/services/etcd/docs.md' - - - -### Via Config - - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - map.insert("endpoints".to_string(), "http://127.0.0.1:2379".to_string()); - map.insert("username".to_string(), "your_username".to_string()); - map.insert("password".to_string(), "your_password".to_string()); - - let op: Operator = Operator::via_map(Scheme::Etcd, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("etcd", { - root: "/path/to/dir", - endpoint: "http://127.0.0.1:2379", - username: "your_username", - password: "your_password", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("etcd", - root="/path/to/dir", - endpoint="http://127.0.0.1:2379", - username="your_username", - password="your_password", -) -``` - - - - - diff --git a/website/docs/services/foundationdb.mdx b/website/docs/services/foundationdb.mdx deleted file mode 100644 index b148ec2ed2e..00000000000 --- a/website/docs/services/foundationdb.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: FoundationDB ---- - -[FoundationDB](https://www.foundationdb.org/) services support. - -import Docs from '../../../core/src/services/foundationdb/docs.md' - - - -### Via Config - - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - map.insert("config_path".to_string(), "/path/to/config".to_string()); - - let op: Operator = Operator::via_map(Scheme::Foundationdb, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("foundationdb", { - root: "/path/to/dir", - config_path: "/path/to/config", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("foundationdb", - root="/path/to/dir", - config_path="/path/to/config", -) -``` - - - - - diff --git a/website/docs/services/fs.mdx b/website/docs/services/fs.mdx deleted file mode 100644 index 46707cbd367..00000000000 --- a/website/docs/services/fs.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: Fs ---- - -POSIX file system support. - -import Docs from '../../../core/src/services/fs/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - - let op: Operator = Operator::via_map(Scheme::Fs, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("fs", { - root: "/path/to/dir", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("fs", - root="/path/to/dir", -) -``` - - - - - diff --git a/website/docs/services/ftp.mdx b/website/docs/services/ftp.mdx deleted file mode 100644 index 6bb870dbef0..00000000000 --- a/website/docs/services/ftp.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: FTP ---- - -FTP and FTPS services support. - -import Docs from '../../../core/src/services/ftp/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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(), "127.0.0.1".to_string()); - - let op: Operator = Operator::via_map(Scheme::Ftp, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("ftp", { - endpoint: "127.0.0.1", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("ftp", - endpoint="127.0.0.1", -) -``` - - - - - diff --git a/website/docs/services/gcs.mdx b/website/docs/services/gcs.mdx deleted file mode 100644 index 3a84d4bfaa1..00000000000 --- a/website/docs/services/gcs.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: Gcs ---- - -Google Cloud Storage Support - -import Docs from '../../../core/src/services/gcs/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("bucket".to_string(), "test".to_string()); - map.insert("root".to_string(), "/path/to/dir".to_string()); - map.insert("credential".to_string(), "authentication token".to_string()); - map.insert("predefined_acl".to_string(), "publicRead".to_string()); - map.insert("default_storage_class".to_string(), "STANDARD".to_string()); - - let op: Operator = Operator::via_map(Scheme::Gcs, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; -async function main() { - const op = new Operator("gcs", { - bucket: "test", - root: "/path/to/dir", - credential: "authentication token", - predefined_acl: "publicRead", - default_storage_class: "STANDARD", - }); -} -``` - - - - -```python -import opendal -op = opendal.Operator("gcs", - bucket="test", - root="/path/to/dir", - credential="authentication token", - predefined_acl="publicRead", - default_storage_class="STANDARD", -) -``` - - - \ No newline at end of file diff --git a/website/docs/services/gdrive.mdx b/website/docs/services/gdrive.mdx deleted file mode 100644 index bff0af362e1..00000000000 --- a/website/docs/services/gdrive.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Gdrive ---- - -[Google Drive](https://drive.google.com) services support. - -import Docs from '../../../core/src/services/gdrive/docs.md' - - - -### Via Config - - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - map.insert("access_token".to_string(), "your_access_token".to_string()); - - let op: Operator = Operator::via_map(Scheme::Gdrive, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("gdrive", { - root: "/path/to/dir", - access_token: "your_access_token", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("gdrive", - root="/path/to/dir", - access_token="your_access_token", -) -``` - - - - diff --git a/website/docs/services/ghac.mdx b/website/docs/services/ghac.mdx deleted file mode 100644 index f71dfb1db49..00000000000 --- a/website/docs/services/ghac.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: GHAC ---- - -[GitHub Action Cache](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows) service support - -import Docs from '../../../core/src/services/ghac/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```rust -use anyhow::Result; -use opendal::services::Ghac; -use opendal::Operator; - -#[tokio::main] -async fn main() -> Result<()> { - - let mut map = HashMap::new(); - map.insert("root".to_string(), "/path/to/dir".to_string()); - - let op: Operator = Operator::via_map(Scheme::Ghac, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from require('opendal'); - -async function main() { - const op = new Operator("ghac", { - root: '/path/to/dir' - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("ghac", { - "root": "/path/to/dir" -}) -``` - - - diff --git a/website/docs/services/gridfs.mdx b/website/docs/services/gridfs.mdx deleted file mode 100644 index d33137f751c..00000000000 --- a/website/docs/services/gridfs.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: Gridfs ---- - -[Gridfs](https://www.mongodb.com/docs/manual/core/gridfs/) services support. - -import Docs from '../../../core/src/services/gridfs/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("connection_string".to_string(), "connection_string".to_string()); - map.insert("database".to_string(), "database".to_string()); - map.insert("bucket".to_string(), "bucket".to_string()); - let op: Operator = Operator::via_map(Scheme::Gridfs, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const config = { - connection_string: "connection_string", - database: "database", - bucket: "bucket", - }; - const op = new Operator("gridfs", config); -} -``` - - - - -```python -import opendal - -config = { - "connection_string": "connection_string", - "database": "database", - "bucket": "bucket", -} - -op = opendal.Operator("gridfs", **config) -``` - - - \ No newline at end of file diff --git a/website/docs/services/hdfs.mdx b/website/docs/services/hdfs.mdx deleted file mode 100644 index c8125898a38..00000000000 --- a/website/docs/services/hdfs.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: HDFS ---- - -[Hadoop Distributed File System (HDFS™)](https://hadoop.apache.org/) support. - -import Docs from '../../../core/src/services/hdfs/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("name_node".to_string(), "hdfs://127.0.0.1:9000".to_string()); - map.insert("root".to_string(), "/tmp".to_string()); - - let op: Operator = Operator::via_map(Scheme::Hdfs, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("hdfs", { - name_node: "hdfs://127.0.0.1:9000", - root: "/tmp", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("hdfs", - name_node="hdfs://127.0.0.1:9000", - root="/tmp", -) -``` - - - - - diff --git a/website/docs/services/http.mdx b/website/docs/services/http.mdx deleted file mode 100644 index 522da54fd29..00000000000 --- a/website/docs/services/http.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: HTTP ---- - -HTTP Read-only service support like [Nginx](https://www.nginx.com/) and [Caddy](https://caddyserver.com/). - -import Docs from '../../../core/src/services/http/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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(), "127.0.0.1".to_string()); - - let op: Operator = Operator::via_map(Scheme::Http, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; -async function main() { - const op = new Operator("http", { - endpoint: "127.0.0.1", - }); -} -``` - - - - -```python -import opendal -op = opendal.Operator("http", - endpoint="127.0.0.1", -) -``` - - - \ No newline at end of file diff --git a/website/docs/services/huggingface.mdx b/website/docs/services/huggingface.mdx deleted file mode 100644 index 93b1eee3b02..00000000000 --- a/website/docs/services/huggingface.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: Hugging Face ---- - -[Hugging Face](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi) services support. - -import Docs from '../../../core/src/services/huggingface/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("repo_type".to_string(), "dataset".to_string()); - map.insert("repo_id".to_string(), "databricks/databricks-dolly-15k".to_string()); - map.insert("revision".to_string(), "main".to_string()); - map.insert("root".to_string(), "/path/to/dir".to_string()); - map.insert("token".to_string(), "access_token".to_string()); - - let op: Operator = Operator::via_map(Scheme::Huggingface, map)?; - - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - // Use `huggingface` or `hf` for scheme name - const op = new Operator("huggingface", { - repo_type: "dataset", - repo_id: "databricks/databricks-dolly-15k", - revision: "main", - root: "/path/to/dir", - token: "access_token", - }); -} -``` - - - - -```python -import opendal - -# Use `huggingface` or `hf` for scheme name -op = opendal.Operator("huggingface", - repo_type="dataset", - repo_id="databricks/databricks-dolly-15k", - revision="main", - root: "/path/to/dir", - token: "access_token", -) -``` - - - \ No newline at end of file diff --git a/website/docs/services/ipfs.mdx b/website/docs/services/ipfs.mdx deleted file mode 100644 index b858b7a0fe5..00000000000 --- a/website/docs/services/ipfs.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: IPFS ---- - -IPFS file system support based on [IPFS HTTP Gateway](https://docs.ipfs.tech/concepts/ipfs-gateway/). - - -import Docs from '../../../core/src/services/ipfs/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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(), "https://ipfs.io".to_string()); - map.insert("root".to_string(), "/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ".to_string()); - - let op: Operator = Operator::via_map(Scheme::Ipfs, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("ipfs", { - endpoint: "https://ipfs.io", - root: "/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("ipfs", - endpoint="https://ipfs.io", - root="/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ", -) -``` - - - - - diff --git a/website/docs/services/ipmfs.mdx b/website/docs/services/ipmfs.mdx deleted file mode 100644 index 8b7ac6c36fb..00000000000 --- a/website/docs/services/ipmfs.mdx +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: IPMFS ---- - -IPFS Mutable File System (IPMFS) support - -import Docs from "../../../core/src/services/ipmfs/docs.md" - - diff --git a/website/docs/services/libsql.mdx b/website/docs/services/libsql.mdx deleted file mode 100644 index b9a042e905e..00000000000 --- a/website/docs/services/libsql.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: LibSQL ---- - -[libSQL](https://github.com/tursodatabase/libsql) service support. - -import Docs from '../../../core/src/services/libsql/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/".to_string()); - map.insert("connection_string".to_string(), "https://example.com/db".to_string()); - map.insert("auth_token".to_string(), "secret".to_string()); - map.insert("table".to_string(), "your_table".to_string()); - map.insert("key_field".to_string(), "key".to_string()); - map.insert("value_field".to_string(), "value".to_string()); - - let op: Operator = Operator::via_map(Scheme::Libsql, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("libsql", { - root: "/", - connection_string: "https://example.com/db", - auth_token: "secret", - table: "your_table", - key_field: "key", - value_field: "value", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("libsql", - root="/", - connection_string="https://example.com/db", - auth_token="secret", - table="your_table", - key_field="key", - value_field="value" -) -``` - - - diff --git a/website/docs/services/memcached.mdx b/website/docs/services/memcached.mdx deleted file mode 100644 index 8e3a1d98ad6..00000000000 --- a/website/docs/services/memcached.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: Memcached ---- - -[Memcached](https://memcached.org/) service support. - -import Docs from '../../../core/src/services/memcached/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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(), "tcp://127.0.0.1:11211".to_string()); - - let op: Operator = Operator::via_map(Scheme::Memcached, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; -async function main() { - const op = new Operator("memcached", { - endpoint: "tcp://127.0.0.1:11211", - }); -} -``` - - - - -```python -import opendal -op = opendal.Operator("memcached", - endpoint="tcp://127.0.0.1:11211", -) -``` - - - \ No newline at end of file diff --git a/website/docs/services/memory.mdx b/website/docs/services/memory.mdx deleted file mode 100644 index aff2e146518..00000000000 --- a/website/docs/services/memory.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Memory ---- - -In memory service support. (BTreeMap Based) - -import Docs from '../../../core/src/services/memory/docs.md' - - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - - let op: Operator = Operator::via_map(Scheme::Memory, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("memory", { - root: "/path/to/dir", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("memory", - root="/path/to/dir", -) -``` - - - - - diff --git a/website/docs/services/moka.mdx b/website/docs/services/moka.mdx deleted file mode 100644 index 8c8f42850b0..00000000000 --- a/website/docs/services/moka.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Moka ---- - -[Moka](https://github.com/moka-rs/moka) services support. - -import Docs from '../../../core/src/services/moka/docs.md' - - - -### Via Config - - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("name".to_string(), "your_cache_name".to_string()); - - let op: Operator = Operator::via_map(Scheme::Moka, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("moka", { - name: "your_cache_name", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("moka", - name="your_cache_name", -) -``` - - - - - diff --git a/website/docs/services/mongodb.mdx b/website/docs/services/mongodb.mdx deleted file mode 100644 index 0bac8e0f581..00000000000 --- a/website/docs/services/mongodb.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: MongoDB ---- - -[MongoDB](https://www.mongodb.com/) services support. - -import Docs from '../../../core/src/services/mongodb/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/".to_string()); - map.insert("connection_string".to_string(), "mongodb://myUser:myPassword@localhost:27017/myAuthDB".to_string()); - map.insert("database".to_string(), "your_database".to_string()); - map.insert("collection".to_string(), "your_collection".to_string()); - map.insert("key_field".to_string(), "key".to_string()); - map.insert("value_field".to_string(), "value".to_string()); - - let op: Operator = Operator::via_map(Scheme::Mongodb, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("mongodb", { - root: "/", - connection_string: "mongodb://myUser:myPassword@localhost:27017/myAuthDB", - database: "your_database", - collection: "your_collection", - key_field: "key", - value_field: "value" - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("mongodb", - root="/", - connection_string="mongodb://myUser:myPassword@localhost:27017/myAuthDB", - database="your_database", - collection="your_collection", - key_field="key", - value_field="value" -) -``` - - - \ No newline at end of file diff --git a/website/docs/services/mysql.mdx b/website/docs/services/mysql.mdx deleted file mode 100644 index a6fb7bc5bbd..00000000000 --- a/website/docs/services/mysql.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: MySQL ---- - -[MySQL](https://www.mysql.com/) services support. - -import Docs from '../../../core/src/services/mysql/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```rust -use anyhow::Result; -use opendal::services::Mysql; -use opendal::Operator; - -#[tokio::main] -async fn main() -> Result<()> { - - let mut map = HashMap::new(); - map.insert("connection_string".to_string(), "mysql://you_username:your_password@127.0.0.1:5432/your_database".to_string()); - map.insert("table".to_string(), "your_table".to_string()); - map.insert("key_field".to_string(), "your_key_field".to_string()); - map.insert("value_field".to_string(), "your_value_field".to_string()); - - let op: Operator = Operator::via_map(Scheme::Mysql, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from require('opendal'); - -async function main() { - const op = new Operator("mysql", { - connection_string: 'mysql://you_username:your_password@127.0.0.1:5432/your_database', - table: 'your_table', - key_field: 'your_key_field', - value_field: 'your_value_field', - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("mysql", { - "connection_string": "mysql://you_username:your_password@127.0.0.1:5432/your_database", - "table": "your_table", - "key_field": "your_key_field", - "value_field": "your_value_field", -}) -``` - - - \ No newline at end of file diff --git a/website/docs/services/obs.mdx b/website/docs/services/obs.mdx deleted file mode 100644 index 5b02fa59097..00000000000 --- a/website/docs/services/obs.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: Obs ---- - -Huawei-Cloud Object Storage Service (OBS) support - -import Docs from '../../../core/src/services/obs/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("bucket".to_string(), "test".to_string()); - map.insert("endpoint".to_string(), "obs.cn-north-1.myhuaweicloud.com".to_string()); - map.insert("access_key_id".to_string(), "access_key_id".to_string()); - map.insert("secret_access_key".to_string(), "secret_access_key".to_string()); - - let op: Operator = Operator::via_map(Scheme::Obs, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; -async function main() { - const op = new Operator("obs", { - bucket: "test", - endpoint: "obs.cn-north-1.myhuaweicloud.com", - access_key_id: "access_key_id", - secret_access_key: "secret_access_key", - }); -} -``` - - - - -```python -import opendal -op = opendal.Operator("obs", - bucket="test", - endpoint="obs.cn-north-1.myhuaweicloud.com", - access_key_id="access_key_id", - secret_access_key="secret_access_key", -) -``` - - - \ No newline at end of file diff --git a/website/docs/services/onedrive.mdx b/website/docs/services/onedrive.mdx deleted file mode 100644 index 61ab439434e..00000000000 --- a/website/docs/services/onedrive.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: OneDrive ---- - -[OneDrive](https://onedrive.com) services support. - -import Docs from '../../../core/src/services/onedrive/docs.md' - - - -### Via Config - - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - map.insert("access_token".to_string(), "your_access_token".to_string()); - - let op: Operator = Operator::via_map(Scheme::Onedrive, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("onedrive", { - root: "/path/to/dir", - access_token: "your_access_token", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("onedrive", - root="/path/to/dir", - access_token="your_access_token", -) -``` - - - - diff --git a/website/docs/services/oss.mdx b/website/docs/services/oss.mdx deleted file mode 100644 index 24575f58aff..00000000000 --- a/website/docs/services/oss.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: OSS ---- - -Aliyun Object Storage Service (OSS) support. - -import Docs from '../../../core/src/services/oss/docs.md' - - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - map.insert("bucket".to_string(), "test".to_string()); - map.insert("endpoint".to_string(), "https://oss-cn-beijing.aliyuncs.com".to_string()); - map.insert("access_key_id".to_string(), "access_key_id".to_string()); - map.insert("access_key_secret".to_string(), "access_key_secret".to_string()); - - let op: Operator = Operator::via_map(Scheme::Oss, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("oss", { - root: "/path/to/dir", - bucket: "test", - endpoint: "https://oss-cn-beijing.aliyuncs.com", - access_key_id: "access_key_id", - access_key_secret: "access_key_secret", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("oss", - root="/path/to/dir", - bucket="test", - endpoint="https://oss-cn-beijing.aliyuncs.com", - access_key_id="access_key_id", - access_key_secret="access_key_secret", -) -``` - - - - diff --git a/website/docs/services/persy.mdx b/website/docs/services/persy.mdx deleted file mode 100644 index 15ffd92e570..00000000000 --- a/website/docs/services/persy.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Persy ---- - -[Persy](https://persy.rs/) service support. - -import Docs from '../../../core/src/services/persy/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```rust -use anyhow::Result; -use opendal::Operator; -use opendal::Scheme; -use std::collections::HashMap; - -#[tokio::main] -async fn main() -> Result<()> { - let mut config = HashMap::new(); - config.insert("datafile".to_string(), "./test.persy".to_string()); - config.insert("segment".to_string(), "data".to_string()); - config.insert("index".to_string(), "index".to_string()); - - let op: Operator = Operator::via_map(Scheme::Persy, config)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const config = { - datafile: "./test.persy", - segment: "data", - index: "index" - }; - const op = new Operator("persy", config); -} -``` - - - - -```python -import opendal - -config = { - "datafile": "./test.persy", - "segment": "data", - "index": "index" -} - -op = opendal.Operator("persy", **config) -``` - - - diff --git a/website/docs/services/postgresql.mdx b/website/docs/services/postgresql.mdx deleted file mode 100644 index 3f9605f50af..00000000000 --- a/website/docs/services/postgresql.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: PostgreSQL ---- - -[PostgreSQL](https://www.postgresql.org/) services support. - -import Docs from '../../../core/src/services/postgresql/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```rust -use anyhow::Result; -use opendal::services::Postgresql; -use opendal::Operator; - -#[tokio::main] -async fn main() -> Result<()> { - - let mut map = HashMap::new(); - map.insert("connection_string".to_string(), "postgresql://you_username:your_password@127.0.0.1:5432/your_database".to_string()); - map.insert("table".to_string(), "your_table".to_string()); - map.insert("key_field".to_string(), "your_key_field".to_string()); - map.insert("value_field".to_string(), "your_value_field".to_string()); - - let op: Operator = Operator::via_map(Scheme::Postgresql, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from require('opendal'); - -async function main() { - const op = new Operator("postgresql", { - connection_string: 'postgresql://you_username:your_password@127.0.0.1:5432/your_database', - table: 'your_table', - key_field: 'your_key_field', - value_field: 'your_value_field', - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("postgresql", { - "connection_string": "postgresql://you_username:your_password@127.0.0.1:5432/your_database", - "table": "your_table", - "key_field": "your_key_field", - "value_field": "your_value_field", -}) -``` - - - \ No newline at end of file diff --git a/website/docs/services/redb.mdx b/website/docs/services/redb.mdx deleted file mode 100644 index 008b3b9067d..00000000000 --- a/website/docs/services/redb.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Redb ---- - -[Redb](https://github.com/cberner/redb) services support. - -import Docs from '../../../core/src/services/redb/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```rust -use anyhow::Result; -use opendal::Operator; -use opendal::Scheme; -use std::collections::HashMap; - -#[tokio::main] -async fn main() -> Result<()> { - let mut config = HashMap::new(); - config.insert("datadir".to_string(), "/tmp/opendal/redb".to_string()); - - let op: Operator = Operator::via_map(Scheme::Redb, config)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const config = { - datadir: "/tmp/opendal/redb", - }; - const op = new Operator("redb", config); -} -``` - - - - -```python -import opendal - -config = { - "datadir": "/tmp/opendal/redb", -} - -op = opendal.Operator("redb", **config) -``` - - - \ No newline at end of file diff --git a/website/docs/services/redis.mdx b/website/docs/services/redis.mdx deleted file mode 100644 index 5e4fad2f628..00000000000 --- a/website/docs/services/redis.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: Redis ---- - -[Redis](https://redis.io/) services support. - -import Docs from '../../../core/src/services/redis/docs.md' - - - -### Via Config - - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - map.insert("endpoint".to_string(), "tcp://127.0.0.1:6379".to_string()); - map.insert("username".to_string(), "your_username".to_string()); - map.insert("password".to_string(), "your_password".to_string()); - map.insert("db".to_string(), "0".to_string()); - - let op: Operator = Operator::via_map(Scheme::Redis, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("redis", { - root: "/path/to/dir", - endpoint: "tcp://127.0.0.1:6379", - username: "your_username", - password: "your_password", - db: "0", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("redis", - root="/path/to/dir", - endpoint="tcp://127.0.0.1:6379", - username="your_username", - password="your_password", - db="0", -) -``` - - - - - diff --git a/website/docs/services/rocksdb.mdx b/website/docs/services/rocksdb.mdx deleted file mode 100644 index 13ddde59462..00000000000 --- a/website/docs/services/rocksdb.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: RocksDB ---- - -RocksDB service support. - -import Docs from '../../../core/src/services/rocksdb/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("datadir".to_string(), "/tmp/opendal/rocksdb".to_string()); - - let op: Operator = Operator::via_map(Scheme::Rocksdb, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("rocksdb", { - datadir: "/tmp/opendal/rocksdb", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("rocksdb", - datadir="/tmp/opendal/rocksdb", -) -``` - - - - - diff --git a/website/docs/services/s3.mdx b/website/docs/services/s3.mdx deleted file mode 100644 index f2915a5bef9..00000000000 --- a/website/docs/services/s3.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: S3 ---- - -Aws S3 and compatible services (including minio, digitalocean space, Tencent Cloud Object Storage(COS) and so on) support. - -For more information about s3-compatible services, refer to [Compatible Services](#compatible-services). - -import Docs from '../../../core/src/services/s3/docs.md' - - - -## Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/path/to/dir".to_string()); - map.insert("bucket".to_string(), "test".to_string()); - map.insert("region".to_string(), "us-east-1".to_string()); - map.insert("endpoint".to_string(), "https://s3.amazonaws.com".to_string()); - map.insert("access_key_id".to_string(), "access_key_id".to_string()); - map.insert("secret_access_key".to_string(), "secret_access_key".to_string()); - - let op: Operator = Operator::via_map(Scheme::S3, map)?; - - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("s3", { - root: "/path/to/dir", - bucket: "test", - region: "us-east-1", - endpoint: "https://s3.amazonaws.com", - access_key_id: "access_key_id", - secret_access_key: "secret_access_key", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("s3", - root="/path/to/dir", - bucket="test", - region="us-east-1", - endpoint="https://s3.amazonaws.com", - access_key_id="access_key_id", - secret_access_key="secret_access_key", -) -``` - - - - - -import CompatibleServices from '../../../core/src/services/s3/compatible_services.md' - - diff --git a/website/docs/services/sftp.mdx b/website/docs/services/sftp.mdx deleted file mode 100644 index 55f70ef10c7..00000000000 --- a/website/docs/services/sftp.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: SFTP ---- - -SFTP services support. (only works on unix) - -:::caution - -Maximum number of file holdings is depending on the remote system configuration. - -For example, the default value is 255 in macOS, and 1024 in linux. If you want to open -lots of files, you should pay attention to close the file after using it. - -::: - -import Docs from '../../../core/src/services/sftp/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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(), "127.0.0.1".to_string()); - map.insert("user".to_string(), "test".to_string()); - map.insert("key".to_string(), "test_key".to_string()); - - let op: Operator = Operator::via_map(Scheme::Sftp, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("sftp", { - endpoint: "127.0.0.1", - user: "test", - key: "test_key", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("sftp", - endpoint="127.0.0.1", - user="test", - key="test_key", -) -``` - - - - - diff --git a/website/docs/services/sled.mdx b/website/docs/services/sled.mdx deleted file mode 100644 index 8feec4daab1..00000000000 --- a/website/docs/services/sled.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Sled ---- - -Sled service support. - -import Docs from '../../../core/src/services/sled/docs.md' - - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("datadir".to_string(), "/tmp/opendal/sled".to_string()); - - let op: Operator = Operator::via_map(Scheme::Sled, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("sled", { - datadir: "/tmp/opendal/sled", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("sled", - datadir="/tmp/opendal/sled", -) -``` - - - - - diff --git a/website/docs/services/sqlite.mdx b/website/docs/services/sqlite.mdx deleted file mode 100644 index dc8801d9e32..00000000000 --- a/website/docs/services/sqlite.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Sqlite ---- - -[Sqlite](https://www.sqlite.org/) services support. - -import Docs from '../../../core/src/services/sqlite/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```rust -use anyhow::Result; -use opendal::services::Sqlite; -use opendal::Operator; - -#[tokio::main] -async fn main() -> Result<()> { - - let mut map = HashMap::new(); - map.insert("connection_string".to_string(), "file//abc.db".to_string()); - map.insert("table".to_string(), "your_table".to_string()); - map.insert("key_field".to_string(), "your_key_field".to_string()); - map.insert("value_field".to_string(), "your_value_field".to_string()); - - let op: Operator = Operator::via_map(Scheme::Sqlite, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from require('opendal'); - -async function main() { - const op = new Operator("sqlite", { - connection_string: 'file//abc.db', - table: 'your_table', - key_field: 'your_key_field', - value_field: 'your_value_field', - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("sqlite", { - "connection_string": "file//abc.db", - "table": "your_table", - "key_field": "your_key_field", - "value_field": "your_value_field", -}) -``` - - - \ No newline at end of file diff --git a/website/docs/services/supabase.mdx b/website/docs/services/supabase.mdx deleted file mode 100644 index 447f74d38ab..00000000000 --- a/website/docs/services/supabase.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: Supabase ---- - -[Supabase](https://supabase.com/) service support. - -import Docs from '../../../core/src/services/supabase/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("root".to_string(), "/".to_string()); - map.insert("bucket".to_string(), "test_bucket".to_string()); - map.insert("endpoint".to_string(), "http://127.0.0.1:54321".to_string()); - map.insert("key".to_string(), "some_anon_key".to_string()); - - let op: Operator = Operator::via_map(Scheme::Supabase, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; -async function main() { - const op = new Operator("supabase", { - root: "/", - bucket: "test_bucket", - endpoint: "http://127.0.0.1:54321", - key: "some_anon_key", - }); -} -``` - - - - -```python -import opendal -op = opendal.Operator("supabase", - root="/", - bucket="test_bucket", - endpoint="http://127.0.0.1:54321", - key="some_anon_key", -) -``` - - - \ No newline at end of file diff --git a/website/docs/services/swift.mdx b/website/docs/services/swift.mdx deleted file mode 100644 index 29973994cfb..00000000000 --- a/website/docs/services/swift.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: Swift ---- - -[OpenStack Swift](https://docs.openstack.org/api-ref/object-store/) and compatible services support. - -For more information about swift-compatible services, refer to [Compatible Services](#compatible-services). - -import Docs from '../../../core/src/services/swift/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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/v1/AUTH_test".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(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("swift", { - endpoint: "http://127.0.0.1:8080/v1/AUTH_test", - container: "test_container", - token: "test_token", - root: "/", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("swift", - endpoint="http://127.0.0.1:8080/v1/AUTH_test" - container="test_container", - token="test_token", - root="/", -) -``` - - - - -import CompatibleServices from '../../../core/src/services/swift/compatible_services.md' - - diff --git a/website/docs/services/tikv.mdx b/website/docs/services/tikv.mdx deleted file mode 100644 index 4ac7ffc4c1f..00000000000 --- a/website/docs/services/tikv.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: TiKV ---- - -[TiKV](https://tikv.org/) services support. - -import Docs from '../../../core/src/services/tikv/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```rust -use anyhow::Result; -use opendal::Operator; -use opendal::Scheme; -use std::collections::HashMap; - -#[tokio::main] -async fn main() -> Result<()> { - let mut config = HashMap::new(); - config.insert("endpoints".to_string(), "127.0.0.1:2379".to_string()); - - let op: Operator = Operator::via_map(Scheme::TiKV, config)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const config = { - endpoints: "127.0.0.1:2379", - }; - const op = new Operator("tikv", config); -} -``` - - - - -```python -import opendal - -config = { - "endpoints": "127.0.0.1:2379", -} - -op = opendal.Operator("tikv", **config) -``` - - - diff --git a/website/docs/services/vercel_artifacts.mdx b/website/docs/services/vercel_artifacts.mdx deleted file mode 100644 index d000360294f..00000000000 --- a/website/docs/services/vercel_artifacts.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Vercel Artifacts ---- - -[Vercel Cache](https://vercel.com/docs/concepts/monorepos/remote-caching) service support. - -import Docs from '../../../core/src/services/vercel_artifacts/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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("access_token".to_string(), "your_access_token".to_string()); - - let op: Operator = Operator::via_map(Scheme::VercelArtifacts, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("vercel_artifacts", { - access_token: "your_access_token", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("vercel_artifacts", - access_token="your_access_token", -) -``` - - - \ No newline at end of file diff --git a/website/docs/services/webdav.mdx b/website/docs/services/webdav.mdx deleted file mode 100644 index ce0cd2c6f83..00000000000 --- a/website/docs/services/webdav.mdx +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: WebDAV ---- - -[WebDAV](https://datatracker.ietf.org/doc/html/rfc4918) backend support. - -import Docs from '../../../core/src/services/webdav/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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(), "127.0.0.1".to_string()); - map.insert("username".to_string(), "xxx".to_string()); - map.insert("password".to_string(), "xxx".to_string()); - - let op: Operator = Operator::via_map(Scheme::Webdav, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; -async function main() { - const op = new Operator("webdav", { - endpoint: "127.0.0.1", - username: "xxx", - password: "xxx", - }); -} -``` - - - - -```python -import opendal -op = opendal.Operator("webdav", - endpoint="127.0.0.1", - username="xxx", - password="xxx", -) -``` - - - \ No newline at end of file diff --git a/website/docs/services/webhdfs.mdx b/website/docs/services/webhdfs.mdx deleted file mode 100644 index 1a1f251f8e2..00000000000 --- a/website/docs/services/webhdfs.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: WebHDFS ---- - -[WebHDFS](https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/WebHDFS.html)'s REST API support. - - -import Docs from '../../../core/src/services/webhdfs/docs.md' - - - -### Via Config - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - -```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:9870".to_string()); - map.insert("root".to_string(), "/path/to/dir".to_string()); - map.insert("delegation".to_string(), "delegation_token".to_string()); - - let op: Operator = Operator::via_map(Scheme::Webhdfs, map)?; - Ok(()) -} -``` - - - - -```javascript -import { Operator } from "opendal"; - -async function main() { - const op = new Operator("webhdfs", { - endpoint: "http://127.0.0.1:9870", - root: "/path/to/dir", - delegation: "delegation_token", - }); -} -``` - - - - -```python -import opendal - -op = opendal.Operator("webhdfs", - endpoint="http://127.0.0.1:9870", - root="/path/to/dir", - delegation="delegation_token", -) -``` - - - - - diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 4dfbb36038c..25826760234 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -152,36 +152,6 @@ const config = { position: 'right', label: 'Docs', }, - { - position: 'right', - label: 'API', - items: [ - { - label: 'Rust Core', - to: 'pathname:///docs/rust/opendal/' - }, - { - label: 'Node.js Binding', - to: 'pathname:///docs/nodejs/' - }, - { - label: 'Python Binding', - to: 'pathname:///docs/python/' - }, - { - label: 'Java Binding', - to: 'pathname:///docs/java/' - }, - { - label: 'object-store-opendal', - to: 'pathname:///docs/object-store-opendal/object_store_opendal' - }, - { - label: 'dav-server-opendalfs', - to: 'pathname:///docs/dav-server-opendalfs/dav_server_opendalfs' - } - ] - }, { to: '/blog', label: 'Blog',