From 702529b64a79773ccd8029465337cf3c8c8186a3 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Fri, 9 Feb 2024 06:09:26 +0000 Subject: [PATCH] deploy: 688fde20d8b9072432c5b3f9be40dd1703b98ade --- 404.html | 4 +- ...cd2fb.7fb77413.js => 054cd2fb.300f2b6d.js} | 2 +- ...5a481.b050f3b9.js => 0605a481.d9ef883b.js} | 2 +- ...f5f04.e12fced7.js => 093f5f04.ee86dd60.js} | 2 +- ...8124e.853100c7.js => 09d8124e.22b6d153.js} | 2 +- ...e1c50.74aba368.js => 136e1c50.e340d499.js} | 2 +- ...cd40f.5befd2b3.js => 151cd40f.da6f53bd.js} | 2 +- ...7547a.64bba61c.js => 1957547a.829b930e.js} | 2 +- assets/js/1db64337.21dfa61f.js | 1 - assets/js/1db64337.80b76c10.js | 1 + ...8fa67.bad6217a.js => 22d8fa67.7650f82d.js} | 2 +- ...208a4.a7f31f6c.js => 29b208a4.4ec1c1a4.js} | 2 +- ...f1097.f00467d0.js => 2cbf1097.abc52b0c.js} | 2 +- ...2610d.752d730c.js => 3632610d.dccddc34.js} | 2 +- ...c04e3.46eeea24.js => 381c04e3.fb6cc6ba.js} | 2 +- ...95de5.a9638d17.js => 39a95de5.ec02f38b.js} | 2 +- ...47498.a32a7c70.js => 42347498.27faf4e2.js} | 2 +- ...bbc94.e749da08.js => 434bbc94.7f039215.js} | 2 +- ...d8f56.349778ec.js => 4e2d8f56.6a3a99d1.js} | 2 +- ...d55cb.6f07c671.js => 500d55cb.853d6c8d.js} | 2 +- ...16c1d.53fcfb13.js => 57a16c1d.c1c4598c.js} | 2 +- ...d1076.0507ddd8.js => 592d1076.ac92c2ff.js} | 2 +- ...b831b.6c6e7519.js => 621b831b.12eded49.js} | 2 +- ...f2b43.0017c3d9.js => 65bf2b43.797d900c.js} | 2 +- ...cc70e.16eb2d15.js => 67ecc70e.b853346f.js} | 2 +- ...1242b.0a66a4ef.js => 6a41242b.ddda23c1.js} | 2 +- ...695d1.e2efda96.js => 6dc695d1.a62a6276.js} | 2 +- ...d3fa1.d26d09df.js => 6f4d3fa1.03a29c20.js} | 2 +- ...3c0b5.79fbe95c.js => 7263c0b5.22c96f51.js} | 2 +- assets/js/8070e160.07907d7d.js | 1 - assets/js/8070e160.edd5bf6f.js | 1 + ...9519e.65bf3c5a.js => 8cc9519e.8d1888a2.js} | 2 +- ...159f2.31de883f.js => 8f4159f2.b290c7bd.js} | 2 +- ...00c63.55fa52da.js => 8fb00c63.02174c0b.js} | 2 +- ...f74f6.560b3cdf.js => 939f74f6.fae2644a.js} | 2 +- ...05932.3c0491e5.js => a0405932.049de26a.js} | 2 +- assets/js/b114cefa.32ae26c4.js | 1 + assets/js/b114cefa.59bcc56a.js | 1 - ...f9725.49de58c5.js => b56f9725.c79979b0.js} | 2 +- ...b2057.2c831502.js => bb5b2057.a672d192.js} | 2 +- ...00a1b.44ab92a8.js => c0600a1b.caef7777.js} | 2 +- ...c6b55.f2ce15fd.js => c46c6b55.4c1f6eb0.js} | 2 +- ...b695b.8c41f546.js => c6ab695b.53f5eeda.js} | 2 +- ...2039a.621bca3e.js => cc62039a.ff84ee63.js} | 2 +- ...0d8d5.08792998.js => d3c0d8d5.ffdfbe35.js} | 2 +- ...cef4c.92f66ee2.js => ddccef4c.33d34d8d.js} | 2 +- ...2cec6.7e5de66d.js => e892cec6.f0305c4d.js} | 2 +- ...267e4.67033eae.js => eec267e4.81118d8b.js} | 2 +- ...a5a39.b31952c1.js => f1ca5a39.c5ac8d5a.js} | 2 +- ...45722.8485308c.js => f9145722.f3da9ce7.js} | 2 +- ...7cc64.1a42e061.js => fde7cc64.569e278a.js} | 2 +- ...n.4d04377e.js => runtime~main.c97fb7e4.js} | 2 +- blog/apache-opendal-graduated/index.html | 4 +- blog/archive/index.html | 4 +- blog/how-opendal-read-data/index.html | 4 +- blog/index.html | 4 +- blog/opendal-access-data-freely/index.html | 4 +- .../index.html | 4 +- blog/owo-1/index.html | 4 +- blog/tags/announcement/index.html | 4 +- blog/tags/index.html | 4 +- blog/tags/internal/index.html | 4 +- blog/tags/owo/index.html | 4 +- community/category/committers/index.html | 4 +- community/category/pmc-members/index.html | 4 +- community/category/reference/index.html | 4 +- community/committers/onboarding/index.html | 4 +- .../generate_release_note/index.html | 4 +- .../committers/reference/setup_gpg/index.html | 4 +- community/committers/release/index.html | 4 +- .../request_for_adding_secrets/index.html | 4 +- community/committers/verify/index.html | 4 +- community/index.html | 4 +- community/maturity/index.html | 4 +- community/news/index.html | 4 +- .../pmc_members/nominate-committer/index.html | 4 +- .../nominate-pmc-member/index.html | 4 +- community/pmc_members/onboarding/index.html | 4 +- .../pmc_members/podling-report/index.html | 4 +- community/security/index.html | 4 +- docs/category/services/index.html | 4 +- docs/lua/classes/opendal.metadata.html | 2 +- docs/lua/classes/opendal.operator.html | 2 +- docs/lua/index.html | 2 +- docs/nodejs/classes/BlockingLister.html | 4 +- docs/nodejs/classes/BlockingReader.html | 4 +- docs/nodejs/classes/BlockingWriter.html | 8 +- docs/nodejs/classes/Capability.html | 80 ++-- docs/nodejs/classes/Entry.html | 4 +- docs/nodejs/classes/ExternalObject.html | 4 +- docs/nodejs/classes/Layer.html | 2 +- docs/nodejs/classes/Lister.html | 4 +- docs/nodejs/classes/Metadata.html | 18 +- docs/nodejs/classes/Operator.html | 66 +-- docs/nodejs/classes/Reader.html | 6 +- docs/nodejs/classes/RetryLayer.html | 14 +- docs/nodejs/classes/Writer.html | 8 +- docs/nodejs/interfaces/ListOptions.html | 4 +- docs/nodejs/interfaces/PresignedRequest.html | 8 +- docs/overview/index.html | 6 +- docs/python/opendal.html | 422 +++++++++--------- docs/python/search.js | 2 +- docs/quickstart/index.html | 6 +- docs/rust/opendal/services/index.html | 3 +- .../opendal/services/struct.HdfsNative.html | 39 +- .../services/hdfs_native/backend.rs.html | 132 +++++- docs/services/atomicserver/index.html | 6 +- docs/services/azblob/index.html | 6 +- docs/services/azdls/index.html | 6 +- docs/services/cacache/index.html | 6 +- docs/services/cos/index.html | 6 +- docs/services/d1/index.html | 6 +- docs/services/dashmap/index.html | 6 +- docs/services/dropbox/index.html | 6 +- docs/services/etcd/index.html | 6 +- docs/services/foundationdb/index.html | 6 +- docs/services/fs/index.html | 6 +- docs/services/ftp/index.html | 6 +- docs/services/gcs/index.html | 6 +- docs/services/gdrive/index.html | 6 +- docs/services/ghac/index.html | 6 +- docs/services/gridfs/index.html | 6 +- docs/services/hdfs/index.html | 6 +- docs/services/http/index.html | 6 +- docs/services/huggingface/index.html | 6 +- docs/services/ipfs/index.html | 6 +- docs/services/ipmfs/index.html | 6 +- docs/services/libsql/index.html | 6 +- docs/services/memcached/index.html | 6 +- docs/services/memory/index.html | 6 +- docs/services/moka/index.html | 6 +- docs/services/mongodb/index.html | 6 +- docs/services/mysql/index.html | 6 +- docs/services/obs/index.html | 6 +- docs/services/onedrive/index.html | 6 +- docs/services/oss/index.html | 6 +- docs/services/persy/index.html | 6 +- docs/services/postgresql/index.html | 6 +- docs/services/redb/index.html | 6 +- docs/services/redis/index.html | 6 +- docs/services/rocksdb/index.html | 6 +- docs/services/s3/index.html | 6 +- docs/services/sftp/index.html | 6 +- docs/services/sled/index.html | 6 +- docs/services/sqlite/index.html | 6 +- docs/services/supabase/index.html | 6 +- docs/services/swift/index.html | 6 +- docs/services/tikv/index.html | 6 +- docs/services/vercel_artifacts/index.html | 6 +- docs/services/webdav/index.html | 6 +- docs/services/webhdfs/index.html | 6 +- download/index.html | 4 +- index.html | 4 +- 153 files changed, 745 insertions(+), 599 deletions(-) rename assets/js/{054cd2fb.7fb77413.js => 054cd2fb.300f2b6d.js} (84%) rename assets/js/{0605a481.b050f3b9.js => 0605a481.d9ef883b.js} (83%) rename assets/js/{093f5f04.e12fced7.js => 093f5f04.ee86dd60.js} (83%) rename assets/js/{09d8124e.853100c7.js => 09d8124e.22b6d153.js} (83%) rename assets/js/{136e1c50.74aba368.js => 136e1c50.e340d499.js} (83%) rename assets/js/{151cd40f.5befd2b3.js => 151cd40f.da6f53bd.js} (86%) rename assets/js/{1957547a.64bba61c.js => 1957547a.829b930e.js} (72%) delete mode 100644 assets/js/1db64337.21dfa61f.js create mode 100644 assets/js/1db64337.80b76c10.js rename assets/js/{22d8fa67.bad6217a.js => 22d8fa67.7650f82d.js} (85%) rename assets/js/{29b208a4.a7f31f6c.js => 29b208a4.4ec1c1a4.js} (84%) rename assets/js/{2cbf1097.f00467d0.js => 2cbf1097.abc52b0c.js} (91%) rename assets/js/{3632610d.752d730c.js => 3632610d.dccddc34.js} (85%) rename assets/js/{381c04e3.46eeea24.js => 381c04e3.fb6cc6ba.js} (84%) rename assets/js/{39a95de5.a9638d17.js => 39a95de5.ec02f38b.js} (83%) rename assets/js/{42347498.a32a7c70.js => 42347498.27faf4e2.js} (85%) rename assets/js/{434bbc94.e749da08.js => 434bbc94.7f039215.js} (85%) rename assets/js/{4e2d8f56.349778ec.js => 4e2d8f56.6a3a99d1.js} (83%) rename assets/js/{500d55cb.6f07c671.js => 500d55cb.853d6c8d.js} (80%) rename assets/js/{57a16c1d.53fcfb13.js => 57a16c1d.c1c4598c.js} (80%) rename assets/js/{592d1076.0507ddd8.js => 592d1076.ac92c2ff.js} (83%) rename assets/js/{621b831b.6c6e7519.js => 621b831b.12eded49.js} (84%) rename assets/js/{65bf2b43.0017c3d9.js => 65bf2b43.797d900c.js} (82%) rename assets/js/{67ecc70e.16eb2d15.js => 67ecc70e.b853346f.js} (81%) rename assets/js/{6a41242b.0a66a4ef.js => 6a41242b.ddda23c1.js} (78%) rename assets/js/{6dc695d1.e2efda96.js => 6dc695d1.a62a6276.js} (81%) rename assets/js/{6f4d3fa1.d26d09df.js => 6f4d3fa1.03a29c20.js} (86%) rename assets/js/{7263c0b5.79fbe95c.js => 7263c0b5.22c96f51.js} (86%) delete mode 100644 assets/js/8070e160.07907d7d.js create mode 100644 assets/js/8070e160.edd5bf6f.js rename assets/js/{8cc9519e.65bf3c5a.js => 8cc9519e.8d1888a2.js} (89%) rename assets/js/{8f4159f2.31de883f.js => 8f4159f2.b290c7bd.js} (88%) rename assets/js/{8fb00c63.55fa52da.js => 8fb00c63.02174c0b.js} (84%) rename assets/js/{939f74f6.560b3cdf.js => 939f74f6.fae2644a.js} (85%) rename assets/js/{a0405932.3c0491e5.js => a0405932.049de26a.js} (84%) create mode 100644 assets/js/b114cefa.32ae26c4.js delete mode 100644 assets/js/b114cefa.59bcc56a.js rename assets/js/{b56f9725.49de58c5.js => b56f9725.c79979b0.js} (83%) rename assets/js/{bb5b2057.2c831502.js => bb5b2057.a672d192.js} (84%) rename assets/js/{c0600a1b.44ab92a8.js => c0600a1b.caef7777.js} (82%) rename assets/js/{c46c6b55.f2ce15fd.js => c46c6b55.4c1f6eb0.js} (84%) rename assets/js/{c6ab695b.8c41f546.js => c6ab695b.53f5eeda.js} (87%) rename assets/js/{cc62039a.621bca3e.js => cc62039a.ff84ee63.js} (90%) rename assets/js/{d3c0d8d5.08792998.js => d3c0d8d5.ffdfbe35.js} (84%) rename assets/js/{ddccef4c.92f66ee2.js => ddccef4c.33d34d8d.js} (85%) rename assets/js/{e892cec6.7e5de66d.js => e892cec6.f0305c4d.js} (86%) rename assets/js/{eec267e4.67033eae.js => eec267e4.81118d8b.js} (83%) rename assets/js/{f1ca5a39.b31952c1.js => f1ca5a39.c5ac8d5a.js} (87%) rename assets/js/{f9145722.8485308c.js => f9145722.f3da9ce7.js} (86%) rename assets/js/{fde7cc64.1a42e061.js => fde7cc64.569e278a.js} (85%) rename assets/js/{runtime~main.4d04377e.js => runtime~main.c97fb7e4.js} (58%) diff --git a/404.html b/404.html index 43b20d18e7a7..723bf598aa02 100644 --- a/404.html +++ b/404.html @@ -5,13 +5,13 @@ Page Not Found | Apache OpenDAL™ - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/054cd2fb.7fb77413.js b/assets/js/054cd2fb.300f2b6d.js similarity index 84% rename from assets/js/054cd2fb.7fb77413.js rename to assets/js/054cd2fb.300f2b6d.js index 9bc369e78d5f..d75148087b10 100644 --- a/assets/js/054cd2fb.7fb77413.js +++ b/assets/js/054cd2fb.300f2b6d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1846],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),c=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,o=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,k=p["".concat(o,".").concat(m)]||p[m]||d[m]||s;return n?a.createElement(k,i(i({ref:t},u),{},{components:n})):a.createElement(k,i({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,i=new Array(s);i[0]=m;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[p]="string"==typeof e?e:r,i[1]=l;for(var c=2;c{n.d(t,{Z:()=>i});var a=n(9496),r=n(5924);const s={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(s.tabItem,i),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),s=n(5924),i=n(3053),l=n(3442),o=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:n}=e;const a=(0,l.k6)(),s=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,o._X)(s),(0,r.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(a.location.search);t.set(s,e),a.replace({...a.location,search:t.toString()})}),[s,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,s=d(e),[i,l]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:s}))),[o,c]=k({queryString:n,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,s]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&s.set(e)}),[n,s])]}({groupId:a}),f=(()=>{const e=o??p;return m({value:e,tabValues:s})?e:null})();(0,r.useLayoutEffect)((()=>{f&&l(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),b(e)}),[c,b,s]),tabValues:s}}var f=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:n,selectedValue:l,selectValue:o,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==l&&(p(t),o(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:l===t?0:-1,"aria-selected":l===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,s.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":l===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const s=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=s.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},s.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,s.Z)("tabs-container",h.tabList)},r.createElement(y,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},3208:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var a=n(8126),r=(n(9496),n(9613));const s={toc:[{value:"Via Builder",id:"via-builder",level:2}]},i="wrapper";function l(e){let{components:t,...n}=e;return(0,r.kt)(i,(0,a.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","append"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h1",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"presign_endpoint"),": Set the endpoint for presign."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"access_key_id"),": Set the access_key_id for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"access_key_secret"),": Set the access_key_secret for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"role_arn"),": Set the role of backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"oidc_token"),": Set the oidc_token for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"allow_anonymous"),": Set the backend access OSS in anonymous way.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"OssBuilder"),"]","'s public API docs for more information."),(0,r.kt)("h1",{id:"example"},"Example"),(0,r.kt)("h2",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Oss;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create OSS backend builder.\n let mut builder = Oss::default();\n // Set the root for oss, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/path/to/dir");\n // Set the bucket name, this is required.\n builder.bucket("test");\n // Set the endpoint.\n //\n // For example:\n // - "https://oss-ap-northeast-1.aliyuncs.com"\n // - "https://oss-hangzhou.aliyuncs.com"\n builder.endpoint("https://oss-cn-beijing.aliyuncs.com");\n // Set the access_key_id and access_key_secret.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.access_key_id("access_key_id");\n builder.access_key_secret("access_key_secret");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}l.isMDXComponent=!0;var o=n(8750),c=n(5810);const u={title:"OSS"},p=void 0,d={unversionedId:"services/oss",id:"services/oss",title:"OSS",description:"Aliyun Object Storage Service (OSS) support.",source:"@site/docs/services/oss.mdx",sourceDirName:"services",slug:"/services/oss",permalink:"/docs/services/oss",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/oss.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"OSS"},sidebar:"docs",previous:{title:"OneDrive",permalink:"/docs/services/onedrive"},next:{title:"Persy",permalink:"/docs/services/persy"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},f="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Aliyun Object Storage Service (OSS) support."),(0,r.kt)(l,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("bucket".to_string(), "test".to_string());\n map.insert("endpoint".to_string(), "https://oss-cn-beijing.aliyuncs.com".to_string());\n map.insert("access_key_id".to_string(), "access_key_id".to_string());\n map.insert("access_key_secret".to_string(), "access_key_secret".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Oss, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("oss", {\n root: "/path/to/dir",\n bucket: "test",\n endpoint: "https://oss-cn-beijing.aliyuncs.com",\n access_key_id: "access_key_id",\n access_key_secret: "access_key_secret",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("oss",\n root="/path/to/dir",\n bucket="test",\n endpoint="https://oss-cn-beijing.aliyuncs.com",\n access_key_id="access_key_id",\n access_key_secret="access_key_secret",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1846],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),c=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,o=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,k=p["".concat(o,".").concat(m)]||p[m]||d[m]||s;return n?a.createElement(k,i(i({ref:t},u),{},{components:n})):a.createElement(k,i({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,i=new Array(s);i[0]=m;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[p]="string"==typeof e?e:r,i[1]=l;for(var c=2;c{n.d(t,{Z:()=>i});var a=n(9496),r=n(5924);const s={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(s.tabItem,i),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),s=n(5924),i=n(3053),l=n(3442),o=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:n}=e;const a=(0,l.k6)(),s=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,o._X)(s),(0,r.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(a.location.search);t.set(s,e),a.replace({...a.location,search:t.toString()})}),[s,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,s=d(e),[i,l]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:s}))),[o,c]=k({queryString:n,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,s]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&s.set(e)}),[n,s])]}({groupId:a}),f=(()=>{const e=o??p;return m({value:e,tabValues:s})?e:null})();(0,r.useLayoutEffect)((()=>{f&&l(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),b(e)}),[c,b,s]),tabValues:s}}var f=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:n,selectedValue:l,selectValue:o,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==l&&(p(t),o(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:l===t?0:-1,"aria-selected":l===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,s.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":l===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const s=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=s.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},s.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,s.Z)("tabs-container",h.tabList)},r.createElement(y,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},3208:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var a=n(8126),r=(n(9496),n(9613));const s={toc:[{value:"Via Builder",id:"via-builder",level:2}]},i="wrapper";function l(e){let{components:t,...n}=e;return(0,r.kt)(i,(0,a.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","append"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h1",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"presign_endpoint"),": Set the endpoint for presign."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"access_key_id"),": Set the access_key_id for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"access_key_secret"),": Set the access_key_secret for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"role_arn"),": Set the role of backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"oidc_token"),": Set the oidc_token for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"allow_anonymous"),": Set the backend access OSS in anonymous way.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"OssBuilder"),"]","'s public API docs for more information."),(0,r.kt)("h1",{id:"example"},"Example"),(0,r.kt)("h2",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Oss;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create OSS backend builder.\n let mut builder = Oss::default();\n // Set the root for oss, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/path/to/dir");\n // Set the bucket name, this is required.\n builder.bucket("test");\n // Set the endpoint.\n //\n // For example:\n // - "https://oss-ap-northeast-1.aliyuncs.com"\n // - "https://oss-hangzhou.aliyuncs.com"\n builder.endpoint("https://oss-cn-beijing.aliyuncs.com");\n // Set the access_key_id and access_key_secret.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.access_key_id("access_key_id");\n builder.access_key_secret("access_key_secret");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}l.isMDXComponent=!0;var o=n(8750),c=n(5810);const u={title:"OSS"},p=void 0,d={unversionedId:"services/oss",id:"services/oss",title:"OSS",description:"Aliyun Object Storage Service (OSS) support.",source:"@site/docs/services/oss.mdx",sourceDirName:"services",slug:"/services/oss",permalink:"/docs/services/oss",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/oss.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"OSS"},sidebar:"docs",previous:{title:"OneDrive",permalink:"/docs/services/onedrive"},next:{title:"Persy",permalink:"/docs/services/persy"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},f="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Aliyun Object Storage Service (OSS) support."),(0,r.kt)(l,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("bucket".to_string(), "test".to_string());\n map.insert("endpoint".to_string(), "https://oss-cn-beijing.aliyuncs.com".to_string());\n map.insert("access_key_id".to_string(), "access_key_id".to_string());\n map.insert("access_key_secret".to_string(), "access_key_secret".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Oss, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("oss", {\n root: "/path/to/dir",\n bucket: "test",\n endpoint: "https://oss-cn-beijing.aliyuncs.com",\n access_key_id: "access_key_id",\n access_key_secret: "access_key_secret",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("oss",\n root="/path/to/dir",\n bucket="test",\n endpoint="https://oss-cn-beijing.aliyuncs.com",\n access_key_id="access_key_id",\n access_key_secret="access_key_secret",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0605a481.b050f3b9.js b/assets/js/0605a481.d9ef883b.js similarity index 83% rename from assets/js/0605a481.b050f3b9.js rename to assets/js/0605a481.d9ef883b.js index 89287475e761..d12db226aea0 100644 --- a/assets/js/0605a481.b050f3b9.js +++ b/assets/js/0605a481.d9ef883b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2113],{9613:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>k});var a=r(9496);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(r),d=n,k=p["".concat(s,".").concat(d)]||p[d]||m[d]||i;return r?a.createElement(k,l(l({ref:t},u),{},{components:r})):a.createElement(k,l({ref:t},u))}));function k(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,l=new Array(i);l[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:n,l[1]=o;for(var c=2;c{r.d(t,{Z:()=>l});var a=r(9496),n=r(5924);const i={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:r,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(i.tabItem,l),hidden:r},t)}},8750:(e,t,r)=>{r.d(t,{Z:()=>N});var a=r(8126),n=r(9496),i=r(5924),l=r(3053),o=r(3442),s=r(9356),c=r(4634),u=r(6038);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:a,default:n}}=e;return{value:t,label:r,attributes:a,default:n}}))}function m(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??p(r);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function d(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:r}=e;const a=(0,o.k6)(),i=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(i),(0,n.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function b(e){const{defaultValue:t,queryString:r=!1,groupId:a}=e,i=m(e),[l,o]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=r.find((e=>e.default))??r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[s,c]=k({queryString:r,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,u.Nk)(r);return[a,(0,n.useCallback)((e=>{r&&i.set(e)}),[r,i])]}({groupId:a}),v=(()=>{const e=s??p;return d({value:e,tabValues:i})?e:null})();(0,n.useLayoutEffect)((()=>{v&&o(v)}),[v]);return{selectedValue:l,selectValue:(0,n.useCallback)((e=>{if(!d({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),b(e)}),[c,b,i]),tabValues:i}}var v=r(5667);const f={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:r,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,r=u.indexOf(t),a=c[r].value;a!==o&&(p(t),s(a))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const r=u.indexOf(e.currentTarget)+1;t=u[r]??u[0];break}case"ArrowLeft":{const r=u.indexOf(e.currentTarget)-1;t=u[r]??u[u.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":r},t)},c.map((e=>{let{value:t,label:r,attributes:l}=e;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:d,onClick:m},l,{className:(0,i.Z)("tabs__item",f.tabItem,l?.className,{"tabs__item--active":o===t})}),r??t)})))}function h(e){let{lazy:t,children:r,selectedValue:a}=e;const i=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=b(e);return n.createElement("div",{className:(0,i.Z)("tabs-container",f.tabList)},n.createElement(y,(0,a.Z)({},e,t)),n.createElement(h,(0,a.Z)({},e,t)))}function N(e){const t=(0,v.Z)();return n.createElement(g,(0,a.Z)({key:String(t)},e))}},7247:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>f,frontMatter:()=>u,metadata:()=>m,toc:()=>k});var a=r(8126),n=(r(9496),r(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},l="wrapper";function o(e){let{components:t,...r}=e;return(0,n.kt)(l,(0,a.Z)({},i,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"list")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"presign")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,n.kt)("h2",{id:"configuration"},"Configuration"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,n.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the server address for ",(0,n.kt)("inlineCode",{parentName:"li"},"Atomicserver")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"private_key"),": Set the private key for agent used for ",(0,n.kt)("inlineCode",{parentName:"li"},"Atomicserver")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"public_key"),": Set the public key for agent used for ",(0,n.kt)("inlineCode",{parentName:"li"},"Atomicserver")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"parent_resource_id"),": Set the parent resource id (url) that ",(0,n.kt)("inlineCode",{parentName:"li"},"Atomicserver")," uses to store resources under")),(0,n.kt)("p",null,"You can refer to ","[",(0,n.kt)("inlineCode",{parentName:"p"},"AtomicserverBuilder"),"]","'s docs for more information."),(0,n.kt)("h2",{id:"example"},"Example"),(0,n.kt)("h3",{id:"via-builder"},"Via Builder"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Atomicserver;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Atomicserver::default();\n\n // Set the server address for Atomicserver\n builder.endpoint("http://localhost:9883");\n // Set the public/private key for agent for Atomicserver\n builder.private_key("");\n builder.public_key("");\n // Set the parent resource id for Atomicserver. In this case\n // We are using the root resource (Drive)\n builder.parent_resource_id("http://localhost:9883");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=r(8750),c=r(5810);const u={title:"AtomicServer"},p=void 0,m={unversionedId:"services/atomicserver",id:"services/atomicserver",title:"AtomicServer",description:"Atomic-Server services support.",source:"@site/docs/services/atomicserver.mdx",sourceDirName:"services",slug:"/services/atomicserver",permalink:"/docs/services/atomicserver",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/atomicserver.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"AtomicServer"},sidebar:"docs",previous:{title:"Services",permalink:"/docs/category/services"},next:{title:"Azblob",permalink:"/docs/services/azblob"}},d={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},v="wrapper";function f(e){let{components:t,...r}=e;return(0,n.kt)(v,(0,a.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://docs.atomicdata.dev/"},"Atomic-Server")," services support."),(0,n.kt)(o,{components:r.components,mdxType:"Docs"}),(0,n.kt)("h3",{id:"via-config"},"Via Config"),(0,n.kt)(s.Z,{mdxType:"Tabs"},(0,n.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Sqlite;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "http://localhost:9883".to_string());\n map.insert("private_key".to_string(), "your_private_key".to_string());\n map.insert("public_key".to_string(), "your_public_key".to_string());\n map.insert("parent_resource_id".to_string(), "your_resource_id".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Atomicserver, map)?;\n Ok(())\n}\n'))),(0,n.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"atomicserver\", {\n endpoint: 'http://localhost:9883',\n private_key: 'your_private_key',\n public_key: 'your_public_key',\n parent_resource_id: 'your_resource_id',\n });\n}\n"))),(0,n.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("atomicserver", {\n "connection_string": "http://localhost:9883",\n "private_key": "your_private_key",\n "public_key": "your_public_key",\n "parent_resource_id": "your_resource_id",\n})\n')))))}f.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2113],{9613:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>k});var a=r(9496);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(r),d=n,k=p["".concat(s,".").concat(d)]||p[d]||m[d]||i;return r?a.createElement(k,l(l({ref:t},u),{},{components:r})):a.createElement(k,l({ref:t},u))}));function k(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,l=new Array(i);l[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:n,l[1]=o;for(var c=2;c{r.d(t,{Z:()=>l});var a=r(9496),n=r(5924);const i={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:r,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(i.tabItem,l),hidden:r},t)}},8750:(e,t,r)=>{r.d(t,{Z:()=>N});var a=r(8126),n=r(9496),i=r(5924),l=r(3053),o=r(3442),s=r(9356),c=r(4634),u=r(6038);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:a,default:n}}=e;return{value:t,label:r,attributes:a,default:n}}))}function m(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??p(r);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function d(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:r}=e;const a=(0,o.k6)(),i=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(i),(0,n.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function b(e){const{defaultValue:t,queryString:r=!1,groupId:a}=e,i=m(e),[l,o]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=r.find((e=>e.default))??r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[s,c]=k({queryString:r,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,u.Nk)(r);return[a,(0,n.useCallback)((e=>{r&&i.set(e)}),[r,i])]}({groupId:a}),v=(()=>{const e=s??p;return d({value:e,tabValues:i})?e:null})();(0,n.useLayoutEffect)((()=>{v&&o(v)}),[v]);return{selectedValue:l,selectValue:(0,n.useCallback)((e=>{if(!d({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),b(e)}),[c,b,i]),tabValues:i}}var v=r(5667);const f={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:r,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,r=u.indexOf(t),a=c[r].value;a!==o&&(p(t),s(a))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const r=u.indexOf(e.currentTarget)+1;t=u[r]??u[0];break}case"ArrowLeft":{const r=u.indexOf(e.currentTarget)-1;t=u[r]??u[u.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":r},t)},c.map((e=>{let{value:t,label:r,attributes:l}=e;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:d,onClick:m},l,{className:(0,i.Z)("tabs__item",f.tabItem,l?.className,{"tabs__item--active":o===t})}),r??t)})))}function h(e){let{lazy:t,children:r,selectedValue:a}=e;const i=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=b(e);return n.createElement("div",{className:(0,i.Z)("tabs-container",f.tabList)},n.createElement(y,(0,a.Z)({},e,t)),n.createElement(h,(0,a.Z)({},e,t)))}function N(e){const t=(0,v.Z)();return n.createElement(g,(0,a.Z)({key:String(t)},e))}},7247:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>f,frontMatter:()=>u,metadata:()=>m,toc:()=>k});var a=r(8126),n=(r(9496),r(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},l="wrapper";function o(e){let{components:t,...r}=e;return(0,n.kt)(l,(0,a.Z)({},i,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"list")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"presign")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,n.kt)("h2",{id:"configuration"},"Configuration"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,n.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the server address for ",(0,n.kt)("inlineCode",{parentName:"li"},"Atomicserver")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"private_key"),": Set the private key for agent used for ",(0,n.kt)("inlineCode",{parentName:"li"},"Atomicserver")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"public_key"),": Set the public key for agent used for ",(0,n.kt)("inlineCode",{parentName:"li"},"Atomicserver")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"parent_resource_id"),": Set the parent resource id (url) that ",(0,n.kt)("inlineCode",{parentName:"li"},"Atomicserver")," uses to store resources under")),(0,n.kt)("p",null,"You can refer to ","[",(0,n.kt)("inlineCode",{parentName:"p"},"AtomicserverBuilder"),"]","'s docs for more information."),(0,n.kt)("h2",{id:"example"},"Example"),(0,n.kt)("h3",{id:"via-builder"},"Via Builder"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Atomicserver;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Atomicserver::default();\n\n // Set the server address for Atomicserver\n builder.endpoint("http://localhost:9883");\n // Set the public/private key for agent for Atomicserver\n builder.private_key("");\n builder.public_key("");\n // Set the parent resource id for Atomicserver. In this case\n // We are using the root resource (Drive)\n builder.parent_resource_id("http://localhost:9883");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=r(8750),c=r(5810);const u={title:"AtomicServer"},p=void 0,m={unversionedId:"services/atomicserver",id:"services/atomicserver",title:"AtomicServer",description:"Atomic-Server services support.",source:"@site/docs/services/atomicserver.mdx",sourceDirName:"services",slug:"/services/atomicserver",permalink:"/docs/services/atomicserver",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/atomicserver.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"AtomicServer"},sidebar:"docs",previous:{title:"Services",permalink:"/docs/category/services"},next:{title:"Azblob",permalink:"/docs/services/azblob"}},d={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},v="wrapper";function f(e){let{components:t,...r}=e;return(0,n.kt)(v,(0,a.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://docs.atomicdata.dev/"},"Atomic-Server")," services support."),(0,n.kt)(o,{components:r.components,mdxType:"Docs"}),(0,n.kt)("h3",{id:"via-config"},"Via Config"),(0,n.kt)(s.Z,{mdxType:"Tabs"},(0,n.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Sqlite;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "http://localhost:9883".to_string());\n map.insert("private_key".to_string(), "your_private_key".to_string());\n map.insert("public_key".to_string(), "your_public_key".to_string());\n map.insert("parent_resource_id".to_string(), "your_resource_id".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Atomicserver, map)?;\n Ok(())\n}\n'))),(0,n.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"atomicserver\", {\n endpoint: 'http://localhost:9883',\n private_key: 'your_private_key',\n public_key: 'your_public_key',\n parent_resource_id: 'your_resource_id',\n });\n}\n"))),(0,n.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("atomicserver", {\n "connection_string": "http://localhost:9883",\n "private_key": "your_private_key",\n "public_key": "your_public_key",\n "parent_resource_id": "your_resource_id",\n})\n')))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/093f5f04.e12fced7.js b/assets/js/093f5f04.ee86dd60.js similarity index 83% rename from assets/js/093f5f04.e12fced7.js rename to assets/js/093f5f04.ee86dd60.js index dbbf9b4afee1..fe75eaeb5c55 100644 --- a/assets/js/093f5f04.e12fced7.js +++ b/assets/js/093f5f04.ee86dd60.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[6915],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>b});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),c=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(b,s(s({ref:t},u),{},{components:n})):a.createElement(b,s({ref:t},u))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,s=new Array(l);s[0]=m;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i[p]="string"==typeof e?e:r,s[1]=i;for(var c=2;c{n.d(t,{Z:()=>s});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function s(e){let{children:t,hidden:n,className:s}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,s),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),s=n(3053),i=n(3442),o=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,o._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function k(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[s,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[o,c]=b({queryString:n,groupId:a}),[p,k]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),f=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:s,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),k(e)}),[c,k,l]),tabValues:l}}var f=n(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:o,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,s.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==i&&(p(t),o(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:s}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},s,{className:(0,l.Z)("tabs__item",y.tabItem,s?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},r.createElement(h,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},8767:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>y,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},s="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(s,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Customizable endpoint setting"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"access_key_id"),": Set the access_key_id for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"secret_access_key"),": Set the secret_access_key for backend.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"ObsBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Obs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Obs::default();\n\n // set the storage bucket for OpenDAL\n builder.bucket("test");\n builder.endpoint("obs.cn-north-1.myhuaweicloud.com");\n // Set the access_key_id and secret_access_key.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}i.isMDXComponent=!0;var o=n(8750),c=n(5810);const u={title:"Obs"},p=void 0,d={unversionedId:"services/obs",id:"services/obs",title:"Obs",description:"Huawei-Cloud Object Storage Service (OBS) support",source:"@site/docs/services/obs.mdx",sourceDirName:"services",slug:"/services/obs",permalink:"/docs/services/obs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/obs.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Obs"},sidebar:"docs",previous:{title:"MySQL",permalink:"/docs/services/mysql"},next:{title:"OneDrive",permalink:"/docs/services/onedrive"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function y(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Huawei-Cloud Object Storage Service (OBS) support"),(0,r.kt)(i,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("bucket".to_string(), "test".to_string());\n map.insert("endpoint".to_string(), "obs.cn-north-1.myhuaweicloud.com".to_string());\n map.insert("access_key_id".to_string(), "access_key_id".to_string());\n map.insert("secret_access_key".to_string(), "secret_access_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Obs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("obs", {\n bucket: "test",\n endpoint: "obs.cn-north-1.myhuaweicloud.com",\n access_key_id: "access_key_id",\n secret_access_key: "secret_access_key",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("obs",\n bucket="test",\n endpoint="obs.cn-north-1.myhuaweicloud.com",\n access_key_id="access_key_id",\n secret_access_key="secret_access_key",\n)\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[6915],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>b});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),c=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(b,s(s({ref:t},u),{},{components:n})):a.createElement(b,s({ref:t},u))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,s=new Array(l);s[0]=m;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i[p]="string"==typeof e?e:r,s[1]=i;for(var c=2;c{n.d(t,{Z:()=>s});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function s(e){let{children:t,hidden:n,className:s}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,s),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),s=n(3053),i=n(3442),o=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,o._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function k(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[s,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[o,c]=b({queryString:n,groupId:a}),[p,k]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),f=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:s,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),k(e)}),[c,k,l]),tabValues:l}}var f=n(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:o,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,s.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==i&&(p(t),o(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:s}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},s,{className:(0,l.Z)("tabs__item",y.tabItem,s?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},r.createElement(h,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},8767:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>y,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},s="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(s,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Customizable endpoint setting"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"access_key_id"),": Set the access_key_id for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"secret_access_key"),": Set the secret_access_key for backend.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"ObsBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Obs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Obs::default();\n\n // set the storage bucket for OpenDAL\n builder.bucket("test");\n builder.endpoint("obs.cn-north-1.myhuaweicloud.com");\n // Set the access_key_id and secret_access_key.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}i.isMDXComponent=!0;var o=n(8750),c=n(5810);const u={title:"Obs"},p=void 0,d={unversionedId:"services/obs",id:"services/obs",title:"Obs",description:"Huawei-Cloud Object Storage Service (OBS) support",source:"@site/docs/services/obs.mdx",sourceDirName:"services",slug:"/services/obs",permalink:"/docs/services/obs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/obs.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Obs"},sidebar:"docs",previous:{title:"MySQL",permalink:"/docs/services/mysql"},next:{title:"OneDrive",permalink:"/docs/services/onedrive"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function y(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Huawei-Cloud Object Storage Service (OBS) support"),(0,r.kt)(i,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("bucket".to_string(), "test".to_string());\n map.insert("endpoint".to_string(), "obs.cn-north-1.myhuaweicloud.com".to_string());\n map.insert("access_key_id".to_string(), "access_key_id".to_string());\n map.insert("secret_access_key".to_string(), "secret_access_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Obs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("obs", {\n bucket: "test",\n endpoint: "obs.cn-north-1.myhuaweicloud.com",\n access_key_id: "access_key_id",\n secret_access_key: "secret_access_key",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("obs",\n bucket="test",\n endpoint="obs.cn-north-1.myhuaweicloud.com",\n access_key_id="access_key_id",\n secret_access_key="secret_access_key",\n)\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/09d8124e.853100c7.js b/assets/js/09d8124e.22b6d153.js similarity index 83% rename from assets/js/09d8124e.853100c7.js rename to assets/js/09d8124e.22b6d153.js index d05fd8d57649..fad49054a798 100644 --- a/assets/js/09d8124e.853100c7.js +++ b/assets/js/09d8124e.22b6d153.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4543],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>k});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(k,i(i({ref:t},u),{},{components:a})):n.createElement(k,i({ref:t},u))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function h(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=k({queryString:a,groupId:n}),[p,h]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),b=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{b&&o(b)}),[b]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),h(e)}),[c,h,l]),tabValues:l}}var b=a(5667);const f={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",f.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function g(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function y(e){const t=h(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",f.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(g,(0,n.Z)({},e,t)))}function N(e){const t=(0,b.Z)();return r.createElement(y,(0,n.Z)({key:String(t)},e))}},502:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>f,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Notes",id:"notes",level:2},{value:"Limitations",id:"limitations",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"notes"},"Notes"),(0,r.kt)("p",null,"This service is mainly provided by github actions."),(0,r.kt)("p",null,"Refer to ",(0,r.kt)("a",{parentName:"p",href:"https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows"},"Caching dependencies to speed up workflows")," for more information."),(0,r.kt)("p",null,"To make this service work as expected, please make sure to either call ",(0,r.kt)("inlineCode",{parentName:"p"},"endpoint")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"token")," to\nconfigure the URL and credentials, or that the following environment has been setup correctly:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ACTIONS_CACHE_URL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ACTIONS_RUNTIME_TOKEN"))),(0,r.kt)("p",null,"They can be exposed by following action:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"- name: Configure Cache Env\n uses: actions/github-script@v6\n with:\n script: |\n core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');\n core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');\n")),(0,r.kt)("p",null,"To make ",(0,r.kt)("inlineCode",{parentName:"p"},"delete")," work as expected, ",(0,r.kt)("inlineCode",{parentName:"p"},"GITHUB_TOKEN")," should also be set via:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n")),(0,r.kt)("h2",{id:"limitations"},"Limitations"),(0,r.kt)("p",null,"Unlike other services, ghac doesn't support create empty files.\nWe provide a ",(0,r.kt)("inlineCode",{parentName:"p"},"enable_create_simulation()")," to support this operation but may result unexpected side effects."),(0,r.kt)("p",null,"Also, ",(0,r.kt)("inlineCode",{parentName:"p"},"ghac")," is a cache service which means the data store inside could\nbe automatically evicted at any time."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"GhacBuilder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-no_run"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Ghac;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create ghac backend builder.\n let mut builder = Ghac::default();\n // Set the root for ghac, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/path/to/dir");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"GHAC"},p=void 0,d={unversionedId:"services/ghac",id:"services/ghac",title:"GHAC",description:"GitHub Action Cache service support",source:"@site/docs/services/ghac.mdx",sourceDirName:"services",slug:"/services/ghac",permalink:"/docs/services/ghac",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/ghac.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"GHAC"},sidebar:"docs",previous:{title:"Gdrive",permalink:"/docs/services/gdrive"},next:{title:"Gridfs",permalink:"/docs/services/gridfs"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],h={toc:k},b="wrapper";function f(e){let{components:t,...a}=e;return(0,r.kt)(b,(0,n.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows"},"GitHub Action Cache")," service support"),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Ghac;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Ghac, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"ghac\", {\n root: '/path/to/dir'\n });\n}\n"))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("ghac", {\n "root": "/path/to/dir"\n})\n')))))}f.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4543],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>k});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(k,i(i({ref:t},u),{},{components:a})):n.createElement(k,i({ref:t},u))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=k({queryString:a,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),h=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{h&&o(h)}),[h]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),b(e)}),[c,b,l]),tabValues:l}}var h=a(5667);const f={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",f.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function g(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function y(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",f.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(g,(0,n.Z)({},e,t)))}function N(e){const t=(0,h.Z)();return r.createElement(y,(0,n.Z)({key:String(t)},e))}},502:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>f,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Notes",id:"notes",level:2},{value:"Limitations",id:"limitations",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"notes"},"Notes"),(0,r.kt)("p",null,"This service is mainly provided by github actions."),(0,r.kt)("p",null,"Refer to ",(0,r.kt)("a",{parentName:"p",href:"https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows"},"Caching dependencies to speed up workflows")," for more information."),(0,r.kt)("p",null,"To make this service work as expected, please make sure to either call ",(0,r.kt)("inlineCode",{parentName:"p"},"endpoint")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"token")," to\nconfigure the URL and credentials, or that the following environment has been setup correctly:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ACTIONS_CACHE_URL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ACTIONS_RUNTIME_TOKEN"))),(0,r.kt)("p",null,"They can be exposed by following action:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"- name: Configure Cache Env\n uses: actions/github-script@v6\n with:\n script: |\n core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');\n core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');\n")),(0,r.kt)("p",null,"To make ",(0,r.kt)("inlineCode",{parentName:"p"},"delete")," work as expected, ",(0,r.kt)("inlineCode",{parentName:"p"},"GITHUB_TOKEN")," should also be set via:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n")),(0,r.kt)("h2",{id:"limitations"},"Limitations"),(0,r.kt)("p",null,"Unlike other services, ghac doesn't support create empty files.\nWe provide a ",(0,r.kt)("inlineCode",{parentName:"p"},"enable_create_simulation()")," to support this operation but may result unexpected side effects."),(0,r.kt)("p",null,"Also, ",(0,r.kt)("inlineCode",{parentName:"p"},"ghac")," is a cache service which means the data store inside could\nbe automatically evicted at any time."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"GhacBuilder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-no_run"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Ghac;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create ghac backend builder.\n let mut builder = Ghac::default();\n // Set the root for ghac, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/path/to/dir");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"GHAC"},p=void 0,d={unversionedId:"services/ghac",id:"services/ghac",title:"GHAC",description:"GitHub Action Cache service support",source:"@site/docs/services/ghac.mdx",sourceDirName:"services",slug:"/services/ghac",permalink:"/docs/services/ghac",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/ghac.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"GHAC"},sidebar:"docs",previous:{title:"Gdrive",permalink:"/docs/services/gdrive"},next:{title:"Gridfs",permalink:"/docs/services/gridfs"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},h="wrapper";function f(e){let{components:t,...a}=e;return(0,r.kt)(h,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows"},"GitHub Action Cache")," service support"),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Ghac;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Ghac, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"ghac\", {\n root: '/path/to/dir'\n });\n}\n"))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("ghac", {\n "root": "/path/to/dir"\n})\n')))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/136e1c50.74aba368.js b/assets/js/136e1c50.e340d499.js similarity index 83% rename from assets/js/136e1c50.74aba368.js rename to assets/js/136e1c50.e340d499.js index ada12a5f74a3..1e9317ed2671 100644 --- a/assets/js/136e1c50.74aba368.js +++ b/assets/js/136e1c50.e340d499.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[3057],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),u=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||i;return a?n.createElement(b,l(l({ref:t},c),{},{components:a})):n.createElement(b,l({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=m;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:r,l[1]=s;for(var u=2;u{a.d(t,{Z:()=>l});var n=a(9496),r=a(5924);const i={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:a,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,l),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),i=a(5924),l=a(3053),s=a(3442),o=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,o._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(n.location.search);t.set(i,e),n.replace({...n.location,search:t.toString()})}),[i,n])]}function k(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,i=d(e),[l,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:i}))),[o,u]=b({queryString:a,groupId:n}),[p,k]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,i]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&i.set(e)}),[a,i])]}({groupId:n}),f=(()=>{const e=o??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{f&&s(f)}),[f]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),k(e)}),[u,k,i]),tabValues:i}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:s,selectValue:o,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==s&&(p(t),o(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:l}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},l,{className:(0,i.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":s===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const i=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},1447:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},l="wrapper";function s(e){let{components:t,...a}=e;return(0,r.kt)(l,(0,n.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the network address of redis server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"cluster_endpoints"),": Set the network address of redis cluster server. This parameter is mutually exclusive with the ",(0,r.kt)("inlineCode",{parentName:"li"},"endponit")," parameter."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"username"),": Set the username of Redis"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"password"),": Set the password for authentication"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"db"),": Set the DB of redis")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"RedisBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},"use anyhow::Result;\nuse opendal::services::Redis;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Redis::default();\n\n // this will build a Operator accessing Redis which runs on tcp://localhost:6379\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n")))}s.isMDXComponent=!0;var o=a(8750),u=a(5810);const c={title:"Redis"},p=void 0,d={unversionedId:"services/redis",id:"services/redis",title:"Redis",description:"Redis services support.",source:"@site/docs/services/redis.mdx",sourceDirName:"services",slug:"/services/redis",permalink:"/docs/services/redis",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/redis.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Redis"},sidebar:"docs",previous:{title:"Redb",permalink:"/docs/services/redb"},next:{title:"RocksDB",permalink:"/docs/services/rocksdb"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://redis.io/"},"Redis")," services support."),(0,r.kt)(s,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("endpoint".to_string(), "tcp://127.0.0.1:6379".to_string());\n map.insert("username".to_string(), "your_username".to_string());\n map.insert("password".to_string(), "your_password".to_string());\n map.insert("db".to_string(), "0".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Redis, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("redis", {\n root: "/path/to/dir",\n endpoint: "tcp://127.0.0.1:6379",\n username: "your_username",\n password: "your_password",\n db: "0",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("redis",\n root="/path/to/dir",\n endpoint="tcp://127.0.0.1:6379",\n username="your_username",\n password="your_password",\n db="0",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[3057],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),u=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||i;return a?n.createElement(b,l(l({ref:t},c),{},{components:a})):n.createElement(b,l({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=m;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:r,l[1]=s;for(var u=2;u{a.d(t,{Z:()=>l});var n=a(9496),r=a(5924);const i={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:a,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,l),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),i=a(5924),l=a(3053),s=a(3442),o=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,o._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(n.location.search);t.set(i,e),n.replace({...n.location,search:t.toString()})}),[i,n])]}function k(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,i=d(e),[l,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:i}))),[o,u]=b({queryString:a,groupId:n}),[p,k]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,i]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&i.set(e)}),[a,i])]}({groupId:n}),f=(()=>{const e=o??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{f&&s(f)}),[f]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),k(e)}),[u,k,i]),tabValues:i}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:s,selectValue:o,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==s&&(p(t),o(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:l}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},l,{className:(0,i.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":s===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const i=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},1447:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},l="wrapper";function s(e){let{components:t,...a}=e;return(0,r.kt)(l,(0,n.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the network address of redis server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"cluster_endpoints"),": Set the network address of redis cluster server. This parameter is mutually exclusive with the ",(0,r.kt)("inlineCode",{parentName:"li"},"endponit")," parameter."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"username"),": Set the username of Redis"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"password"),": Set the password for authentication"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"db"),": Set the DB of redis")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"RedisBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},"use anyhow::Result;\nuse opendal::services::Redis;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Redis::default();\n\n // this will build a Operator accessing Redis which runs on tcp://localhost:6379\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n")))}s.isMDXComponent=!0;var o=a(8750),u=a(5810);const c={title:"Redis"},p=void 0,d={unversionedId:"services/redis",id:"services/redis",title:"Redis",description:"Redis services support.",source:"@site/docs/services/redis.mdx",sourceDirName:"services",slug:"/services/redis",permalink:"/docs/services/redis",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/redis.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Redis"},sidebar:"docs",previous:{title:"Redb",permalink:"/docs/services/redb"},next:{title:"RocksDB",permalink:"/docs/services/rocksdb"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://redis.io/"},"Redis")," services support."),(0,r.kt)(s,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("endpoint".to_string(), "tcp://127.0.0.1:6379".to_string());\n map.insert("username".to_string(), "your_username".to_string());\n map.insert("password".to_string(), "your_password".to_string());\n map.insert("db".to_string(), "0".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Redis, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("redis", {\n root: "/path/to/dir",\n endpoint: "tcp://127.0.0.1:6379",\n username: "your_username",\n password: "your_password",\n db: "0",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("redis",\n root="/path/to/dir",\n endpoint="tcp://127.0.0.1:6379",\n username="your_username",\n password="your_password",\n db="0",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/151cd40f.5befd2b3.js b/assets/js/151cd40f.da6f53bd.js similarity index 86% rename from assets/js/151cd40f.5befd2b3.js rename to assets/js/151cd40f.da6f53bd.js index 2c5b9bc727dd..4c3466915bbb 100644 --- a/assets/js/151cd40f.5befd2b3.js +++ b/assets/js/151cd40f.da6f53bd.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[3702],{9613:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>b});var a=r(9496);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(r),m=n,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||o;return r?a.createElement(b,l(l({ref:t},u),{},{components:r})):a.createElement(b,l({ref:t},u))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var c=2;c{r.d(t,{Z:()=>l});var a=r(9496),n=r(5924);const o={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:r,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(o.tabItem,l),hidden:r},t)}},8750:(e,t,r)=>{r.d(t,{Z:()=>N});var a=r(8126),n=r(9496),o=r(5924),l=r(3053),i=r(3442),s=r(9356),c=r(4634),u=r(6038);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:a,default:n}}=e;return{value:t,label:r,attributes:a,default:n}}))}function d(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??p(r);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function m(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:r}=e;const a=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(o),(0,n.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(a.location.search);t.set(o,e),a.replace({...a.location,search:t.toString()})}),[o,a])]}function k(e){const{defaultValue:t,queryString:r=!1,groupId:a}=e,o=d(e),[l,i]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=r.find((e=>e.default))??r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:o}))),[s,c]=b({queryString:r,groupId:a}),[p,k]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,o]=(0,u.Nk)(r);return[a,(0,n.useCallback)((e=>{r&&o.set(e)}),[r,o])]}({groupId:a}),f=(()=>{const e=s??p;return m({value:e,tabValues:o})?e:null})();(0,n.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:l,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),k(e)}),[c,k,o]),tabValues:o}}var f=r(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:r,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),d=e=>{const t=e.currentTarget,r=u.indexOf(t),a=c[r].value;a!==i&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const r=u.indexOf(e.currentTarget)+1;t=u[r]??u[0];break}case"ArrowLeft":{const r=u.indexOf(e.currentTarget)-1;t=u[r]??u[u.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":r},t)},c.map((e=>{let{value:t,label:r,attributes:l}=e;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},l,{className:(0,o.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":i===t})}),r??t)})))}function y(e){let{lazy:t,children:r,selectedValue:a}=e;const o=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===a));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=k(e);return n.createElement("div",{className:(0,o.Z)("tabs-container",h.tabList)},n.createElement(v,(0,a.Z)({},e,t)),n.createElement(y,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return n.createElement(g,(0,a.Z)({key:String(t)},e))}},4898:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var a=r(8126),n=(r(9496),r(9613));const o={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Credentials related",id:"credentials-related",level:3},{value:"Just provide Access Token (Temporary)",id:"just-provide-access-token-temporary",level:4},{value:"Or provide Client ID and Client Secret and refresh token (Long Term)",id:"or-provide-client-id-and-client-secret-and-refresh-token-long-term",level:4},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},l="wrapper";function i(e){let{components:t,...r}=e;return(0,n.kt)(l,(0,a.Z)({},o,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","batch"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,n.kt)("h2",{id:"configuration"},"Configuration"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for this backend.")),(0,n.kt)("h3",{id:"credentials-related"},"Credentials related"),(0,n.kt)("h4",{id:"just-provide-access-token-temporary"},"Just provide Access Token (Temporary)"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"access_token"),": set the access_token for this backend.\nPlease notice its expiration.")),(0,n.kt)("h4",{id:"or-provide-client-id-and-client-secret-and-refresh-token-long-term"},"Or provide Client ID and Client Secret and refresh token (Long Term)"),(0,n.kt)("p",null,"If you want to let OpenDAL to refresh the access token automatically,\nplease provide the following fields:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"refresh_token"),": set the refresh_token for dropbox api"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"client_id"),": set the client_id for dropbox api"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"client_secret"),": set the client_secret for dropbox api")),(0,n.kt)("p",null,"OpenDAL is a library, it cannot do the first step of OAuth2 for you.\nYou need to get authorization code from user by calling Dropbox's authorize url\nand exchange it for refresh token."),(0,n.kt)("p",null,"Please refer to ",(0,n.kt)("a",{parentName:"p",href:"https://www.dropbox.com/developers/reference/oauth-guide"},"Dropbox OAuth2 Guide"),"\nfor more information."),(0,n.kt)("p",null,"You can refer to ","[",(0,n.kt)("inlineCode",{parentName:"p"},"DropboxBuilder"),"]","'s docs for more information"),(0,n.kt)("h2",{id:"example"},"Example"),(0,n.kt)("h3",{id:"via-builder"},"Via Builder"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::raw::OpWrite;\nuse opendal::services::Dropbox;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Dropbox::default();\n builder.root("/opendal");\n builder.access_token("");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=r(8750),c=r(5810);const u={title:"Dropbox"},p=void 0,d={unversionedId:"services/dropbox",id:"services/dropbox",title:"Dropbox",description:"Dropbox services support.",source:"@site/docs/services/dropbox.mdx",sourceDirName:"services",slug:"/services/dropbox",permalink:"/docs/services/dropbox",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/dropbox.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Dropbox"},sidebar:"docs",previous:{title:"DashMap",permalink:"/docs/services/dashmap"},next:{title:"Etcd",permalink:"/docs/services/etcd"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...r}=e;return(0,n.kt)(f,(0,a.Z)({},k,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://www.dropbox.com/"},"Dropbox")," services support."),(0,n.kt)(i,{components:r.components,mdxType:"Docs"}),(0,n.kt)("h3",{id:"via-config"},"Via Config"),(0,n.kt)(s.Z,{mdxType:"Tabs"},(0,n.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("access_token".to_string(), "your_access_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Dropbox, map)?;\n Ok(())\n}\n'))),(0,n.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("dropbox", {\n root: "/path/to/dir",\n access_token: "your_access_token",\n });\n}\n'))),(0,n.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("dropbox",\n root="/path/to/dir",\n access_token="your_access_token",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[3702],{9613:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>b});var a=r(9496);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(r),m=n,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||o;return r?a.createElement(b,l(l({ref:t},u),{},{components:r})):a.createElement(b,l({ref:t},u))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var c=2;c{r.d(t,{Z:()=>l});var a=r(9496),n=r(5924);const o={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:r,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(o.tabItem,l),hidden:r},t)}},8750:(e,t,r)=>{r.d(t,{Z:()=>N});var a=r(8126),n=r(9496),o=r(5924),l=r(3053),i=r(3442),s=r(9356),c=r(4634),u=r(6038);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:a,default:n}}=e;return{value:t,label:r,attributes:a,default:n}}))}function d(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??p(r);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function m(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:r}=e;const a=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(o),(0,n.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(a.location.search);t.set(o,e),a.replace({...a.location,search:t.toString()})}),[o,a])]}function k(e){const{defaultValue:t,queryString:r=!1,groupId:a}=e,o=d(e),[l,i]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=r.find((e=>e.default))??r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:o}))),[s,c]=b({queryString:r,groupId:a}),[p,k]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,o]=(0,u.Nk)(r);return[a,(0,n.useCallback)((e=>{r&&o.set(e)}),[r,o])]}({groupId:a}),f=(()=>{const e=s??p;return m({value:e,tabValues:o})?e:null})();(0,n.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:l,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),k(e)}),[c,k,o]),tabValues:o}}var f=r(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:r,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),d=e=>{const t=e.currentTarget,r=u.indexOf(t),a=c[r].value;a!==i&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const r=u.indexOf(e.currentTarget)+1;t=u[r]??u[0];break}case"ArrowLeft":{const r=u.indexOf(e.currentTarget)-1;t=u[r]??u[u.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":r},t)},c.map((e=>{let{value:t,label:r,attributes:l}=e;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},l,{className:(0,o.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":i===t})}),r??t)})))}function y(e){let{lazy:t,children:r,selectedValue:a}=e;const o=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===a));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=k(e);return n.createElement("div",{className:(0,o.Z)("tabs-container",h.tabList)},n.createElement(v,(0,a.Z)({},e,t)),n.createElement(y,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return n.createElement(g,(0,a.Z)({key:String(t)},e))}},4898:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var a=r(8126),n=(r(9496),r(9613));const o={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Credentials related",id:"credentials-related",level:3},{value:"Just provide Access Token (Temporary)",id:"just-provide-access-token-temporary",level:4},{value:"Or provide Client ID and Client Secret and refresh token (Long Term)",id:"or-provide-client-id-and-client-secret-and-refresh-token-long-term",level:4},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},l="wrapper";function i(e){let{components:t,...r}=e;return(0,n.kt)(l,(0,a.Z)({},o,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","batch"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,n.kt)("h2",{id:"configuration"},"Configuration"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for this backend.")),(0,n.kt)("h3",{id:"credentials-related"},"Credentials related"),(0,n.kt)("h4",{id:"just-provide-access-token-temporary"},"Just provide Access Token (Temporary)"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"access_token"),": set the access_token for this backend.\nPlease notice its expiration.")),(0,n.kt)("h4",{id:"or-provide-client-id-and-client-secret-and-refresh-token-long-term"},"Or provide Client ID and Client Secret and refresh token (Long Term)"),(0,n.kt)("p",null,"If you want to let OpenDAL to refresh the access token automatically,\nplease provide the following fields:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"refresh_token"),": set the refresh_token for dropbox api"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"client_id"),": set the client_id for dropbox api"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"client_secret"),": set the client_secret for dropbox api")),(0,n.kt)("p",null,"OpenDAL is a library, it cannot do the first step of OAuth2 for you.\nYou need to get authorization code from user by calling Dropbox's authorize url\nand exchange it for refresh token."),(0,n.kt)("p",null,"Please refer to ",(0,n.kt)("a",{parentName:"p",href:"https://www.dropbox.com/developers/reference/oauth-guide"},"Dropbox OAuth2 Guide"),"\nfor more information."),(0,n.kt)("p",null,"You can refer to ","[",(0,n.kt)("inlineCode",{parentName:"p"},"DropboxBuilder"),"]","'s docs for more information"),(0,n.kt)("h2",{id:"example"},"Example"),(0,n.kt)("h3",{id:"via-builder"},"Via Builder"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::raw::OpWrite;\nuse opendal::services::Dropbox;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Dropbox::default();\n builder.root("/opendal");\n builder.access_token("");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=r(8750),c=r(5810);const u={title:"Dropbox"},p=void 0,d={unversionedId:"services/dropbox",id:"services/dropbox",title:"Dropbox",description:"Dropbox services support.",source:"@site/docs/services/dropbox.mdx",sourceDirName:"services",slug:"/services/dropbox",permalink:"/docs/services/dropbox",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/dropbox.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Dropbox"},sidebar:"docs",previous:{title:"DashMap",permalink:"/docs/services/dashmap"},next:{title:"Etcd",permalink:"/docs/services/etcd"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...r}=e;return(0,n.kt)(f,(0,a.Z)({},k,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://www.dropbox.com/"},"Dropbox")," services support."),(0,n.kt)(i,{components:r.components,mdxType:"Docs"}),(0,n.kt)("h3",{id:"via-config"},"Via Config"),(0,n.kt)(s.Z,{mdxType:"Tabs"},(0,n.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("access_token".to_string(), "your_access_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Dropbox, map)?;\n Ok(())\n}\n'))),(0,n.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("dropbox", {\n root: "/path/to/dir",\n access_token: "your_access_token",\n });\n}\n'))),(0,n.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("dropbox",\n root="/path/to/dir",\n access_token="your_access_token",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1957547a.64bba61c.js b/assets/js/1957547a.829b930e.js similarity index 72% rename from assets/js/1957547a.64bba61c.js rename to assets/js/1957547a.829b930e.js index fad19a5d9942..b337b0f15d67 100644 --- a/assets/js/1957547a.64bba61c.js +++ b/assets/js/1957547a.829b930e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4477],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,o(o({ref:t},c),{},{components:a})):n.createElement(b,o({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var u=2;u{a.d(t,{Z:()=>o});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:a,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),o=a(3053),i=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&i(k)}),[k]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==i&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:o}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",h.tabItem,o?.className,{"tabs__item--active":i===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},4272:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...a}=e;return(0,r.kt)(o,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","append"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"li"},"FsBuilder"),"]","'s docs for more information")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Fs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create fs backend builder.\n let mut builder = Fs::default();\n // Set the root for fs, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/tmp");\n\n // `Accessor` provides the low level APIs, we will use `Operator` normally.\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"Fs"},p=void 0,d={unversionedId:"services/fs",id:"services/fs",title:"Fs",description:"POSIX file system support.",source:"@site/docs/services/fs.mdx",sourceDirName:"services",slug:"/services/fs",permalink:"/docs/services/fs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/fs.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Fs"},sidebar:"docs",previous:{title:"FoundationDB",permalink:"/docs/services/foundationdb"},next:{title:"FTP",permalink:"/docs/services/ftp"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"POSIX file system support."),(0,r.kt)(i,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Fs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("fs", {\n root: "/path/to/dir",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("fs",\n root="/path/to/dir",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4477],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},c),{},{components:a})):n.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},4272:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","append"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"li"},"FsBuilder"),"]","'s docs for more information")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Fs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create fs backend builder.\n let mut builder = Fs::default();\n // Set the root for fs, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/tmp");\n\n // `Accessor` provides the low level APIs, we will use `Operator` normally.\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"Fs"},p=void 0,d={unversionedId:"services/fs",id:"services/fs",title:"Fs",description:"POSIX file system support.",source:"@site/docs/services/fs.mdx",sourceDirName:"services",slug:"/services/fs",permalink:"/docs/services/fs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/fs.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Fs"},sidebar:"docs",previous:{title:"FoundationDB",permalink:"/docs/services/foundationdb"},next:{title:"FTP",permalink:"/docs/services/ftp"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"POSIX file system support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Fs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("fs", {\n root: "/path/to/dir",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("fs",\n root="/path/to/dir",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1db64337.21dfa61f.js b/assets/js/1db64337.21dfa61f.js deleted file mode 100644 index 4b84b720a797..000000000000 --- a/assets/js/1db64337.21dfa61f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1372],{9613:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var a=r(9496);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),p=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(r),m=n,f=d["".concat(s,".").concat(m)]||d[m]||u[m]||o;return r?a.createElement(f,i(i({ref:t},c),{},{components:r})):a.createElement(f,i({ref:t},c))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:n,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var a=r(8126),n=(r(9496),r(9613));const o={sidebar_label:"About",sidebar_position:1},i="Welcome to Apache OpenDAL\u2122",l={unversionedId:"overview",id:"overview",title:"Welcome to Apache OpenDAL\u2122",description:"OpenDAL represents Open Data Access Layer. Our vision is to access data freely.",source:"@site/docs/overview.md",sourceDirName:".",slug:"/overview",permalink:"/docs/overview",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/overview.md",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",sidebarPosition:1,frontMatter:{sidebar_label:"About",sidebar_position:1},sidebar:"docs",next:{title:"Quickstart",permalink:"/docs/quickstart"}},s={},p=[{value:"What does OpenDAL do?",id:"what-does-opendal-do",level:2},{value:"Getting started",id:"getting-started",level:2},{value:"Why OpenDAL?",id:"why-opendal",level:2},{value:"1. Free from services",id:"1-free-from-services",level:3},{value:"2. Free from implementations",id:"2-free-from-implementations",level:3},{value:"3. Free to integrate",id:"3-free-to-integrate",level:3},{value:"4. Free of cost",id:"4-free-of-cost",level:3}],c={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(d,(0,a.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"welcome-to-apache-opendal"},"Welcome to Apache OpenDAL\u2122"),(0,n.kt)("p",null,"OpenDAL represents ",(0,n.kt)("strong",{parentName:"p"},"Open")," ",(0,n.kt)("strong",{parentName:"p"},"D"),"ata ",(0,n.kt)("strong",{parentName:"p"},"A"),"ccess ",(0,n.kt)("strong",{parentName:"p"},"L"),"ayer. Our vision is to ",(0,n.kt)("strong",{parentName:"p"},"access data freely"),"."),(0,n.kt)("h2",{id:"what-does-opendal-do"},"What does OpenDAL do?"),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/5351546/222356748-14276998-501b-4d2a-9b09-b8cff3018204.png",alt:null})),(0,n.kt)("h2",{id:"getting-started"},"Getting started"),(0,n.kt)("p",null,"See the page for quick start with multiple languages: ",(0,n.kt)("a",{parentName:"p",href:"/docs/quickstart"},"Quickstart"),"."),(0,n.kt)("h2",{id:"why-opendal"},"Why OpenDAL?"),(0,n.kt)("p",null,'The vision of OpenDAL is access data freely, where "free" refers to four essential aspects:'),(0,n.kt)("h3",{id:"1-free-from-services"},"1. Free from services"),(0,n.kt)("p",null,"OpenDAL must enable users to access various storage services ranging from ",(0,n.kt)("inlineCode",{parentName:"p"},"s3")," to ",(0,n.kt)("inlineCode",{parentName:"p"},"dropbox")," via its own native API. It should provide a unified API for accessing all these services."),(0,n.kt)("p",null,"For example, we DO"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add support for ",(0,n.kt)("a",{parentName:"li",href:"https://www.google.com/drive/"},"Google Drive"),": It allows users to access and manage their data on the ",(0,n.kt)("a",{parentName:"li",href:"https://www.google.com/drive/"},"Google Drive"),"."),(0,n.kt)("li",{parentName:"ul"},"Add support for ",(0,n.kt)("a",{parentName:"li",href:"https://www.alibabacloud.com/product/object-storage-service"},"Object Storage Service (OSS)")," via native API: Users can utilize Aliyun's RAM support."),(0,n.kt)("li",{parentName:"ul"},"Add support for ",(0,n.kt)("a",{parentName:"li",href:"https://supabase.com/docs/guides/storage"},"supabase storage"),": Users can visit ",(0,n.kt)("inlineCode",{parentName:"li"},"supabase storage")," now!")),(0,n.kt)("p",null,"while we DO NOT"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add support for ",(0,n.kt)("a",{parentName:"li",href:"https://cloud.google.com/storage"},"Google Cloud Storage (GCS)")," via ",(0,n.kt)("a",{parentName:"li",href:"https://cloud.google.com/storage/docs/xml-api/overview"},"XML API"),": ",(0,n.kt)("a",{parentName:"li",href:"https://cloud.google.com/storage"},"GCS")," has native ",(0,n.kt)("a",{parentName:"li",href:"https://cloud.google.com/storage/docs/json_api"},"JSON API")," which is more powerful"),(0,n.kt)("li",{parentName:"ul"},"Add support for structural data in ",(0,n.kt)("inlineCode",{parentName:"li"},"MySQL/PostgreSQL"),": We can treat a database as a simple key-value store, but we can't support unified access of structural data.")),(0,n.kt)("h3",{id:"2-free-from-implementations"},"2. Free from implementations"),(0,n.kt)("p",null,"OpenDAL needs to separate the various implementation details of services and enables users to write identical logic for different services."),(0,n.kt)("p",null,"For example, we DO"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add a new capability to indicate whether ",(0,n.kt)("inlineCode",{parentName:"li"},"presign")," is supported: Users can now write logic based on the ",(0,n.kt)("inlineCode",{parentName:"li"},"can_presign")," option."),(0,n.kt)("li",{parentName:"ul"},"Add a ",(0,n.kt)("inlineCode",{parentName:"li"},"default_storage_class")," configuration for the S3 service: Configuration is specific to the S3 service."),(0,n.kt)("li",{parentName:"ul"},"Add an option for ",(0,n.kt)("inlineCode",{parentName:"li"},"content_type")," in the ",(0,n.kt)("inlineCode",{parentName:"li"},"write")," operation: It aligns with HTTP standards.")),(0,n.kt)("p",null,"while we DO NOT"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add a new option in read for ",(0,n.kt)("inlineCode",{parentName:"li"},"storage_class"),": As different services could have varying values for this parameter.")),(0,n.kt)("h3",{id:"3-free-to-integrate"},"3. Free to integrate"),(0,n.kt)("p",null,"OpenDAL needs to be integrated with different systems."),(0,n.kt)("p",null,"For example, we DO"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add Python binding: Python programmers can use OpenDAL."),(0,n.kt)("li",{parentName:"ul"},"Add object_store integration: ",(0,n.kt)("inlineCode",{parentName:"li"},"object_store")," users can adopt OpenDAL.")),(0,n.kt)("h3",{id:"4-free-of-cost"},"4. Free of cost"),(0,n.kt)("p",null,"OpenDAL needs to implement features in a zero cost way which means:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Users need not to pay cost for unused features."),(0,n.kt)("li",{parentName:"ul"},"Users cannot write better implementation for used features.")),(0,n.kt)("p",null,"For example, we DO"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add ",(0,n.kt)("inlineCode",{parentName:"li"},"layer")," support: Users can add logging/metrics/tracing in zero cost way."),(0,n.kt)("li",{parentName:"ul"},"Implement ",(0,n.kt)("inlineCode",{parentName:"li"},"seek")," for Reader: Users cannot write better ",(0,n.kt)("inlineCode",{parentName:"li"},"seek")," support, they all need to pay the same cost.")),(0,n.kt)("p",null,"we DO NOT"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add ",(0,n.kt)("inlineCode",{parentName:"li"},"Arc")," for metadata: Users may only need to use metadata once and never clone it. For those who do want this feature, they can add ",(0,n.kt)("inlineCode",{parentName:"li"},"Arc")," themselves.")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1db64337.80b76c10.js b/assets/js/1db64337.80b76c10.js new file mode 100644 index 000000000000..83c1e0c19c40 --- /dev/null +++ b/assets/js/1db64337.80b76c10.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1372],{9613:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var a=r(9496);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),p=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(r),m=n,f=d["".concat(s,".").concat(m)]||d[m]||u[m]||o;return r?a.createElement(f,i(i({ref:t},c),{},{components:r})):a.createElement(f,i({ref:t},c))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:n,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var a=r(8126),n=(r(9496),r(9613));const o={sidebar_label:"About",sidebar_position:1},i="Welcome to Apache OpenDAL\u2122",l={unversionedId:"overview",id:"overview",title:"Welcome to Apache OpenDAL\u2122",description:"OpenDAL represents Open Data Access Layer. Our vision is to access data freely.",source:"@site/docs/overview.md",sourceDirName:".",slug:"/overview",permalink:"/docs/overview",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/overview.md",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",sidebarPosition:1,frontMatter:{sidebar_label:"About",sidebar_position:1},sidebar:"docs",next:{title:"Quickstart",permalink:"/docs/quickstart"}},s={},p=[{value:"What does OpenDAL do?",id:"what-does-opendal-do",level:2},{value:"Getting started",id:"getting-started",level:2},{value:"Why OpenDAL?",id:"why-opendal",level:2},{value:"1. Free from services",id:"1-free-from-services",level:3},{value:"2. Free from implementations",id:"2-free-from-implementations",level:3},{value:"3. Free to integrate",id:"3-free-to-integrate",level:3},{value:"4. Free of cost",id:"4-free-of-cost",level:3}],c={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(d,(0,a.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"welcome-to-apache-opendal"},"Welcome to Apache OpenDAL\u2122"),(0,n.kt)("p",null,"OpenDAL represents ",(0,n.kt)("strong",{parentName:"p"},"Open")," ",(0,n.kt)("strong",{parentName:"p"},"D"),"ata ",(0,n.kt)("strong",{parentName:"p"},"A"),"ccess ",(0,n.kt)("strong",{parentName:"p"},"L"),"ayer. Our vision is to ",(0,n.kt)("strong",{parentName:"p"},"access data freely"),"."),(0,n.kt)("h2",{id:"what-does-opendal-do"},"What does OpenDAL do?"),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/5351546/222356748-14276998-501b-4d2a-9b09-b8cff3018204.png",alt:null})),(0,n.kt)("h2",{id:"getting-started"},"Getting started"),(0,n.kt)("p",null,"See the page for quick start with multiple languages: ",(0,n.kt)("a",{parentName:"p",href:"/docs/quickstart"},"Quickstart"),"."),(0,n.kt)("h2",{id:"why-opendal"},"Why OpenDAL?"),(0,n.kt)("p",null,'The vision of OpenDAL is access data freely, where "free" refers to four essential aspects:'),(0,n.kt)("h3",{id:"1-free-from-services"},"1. Free from services"),(0,n.kt)("p",null,"OpenDAL must enable users to access various storage services ranging from ",(0,n.kt)("inlineCode",{parentName:"p"},"s3")," to ",(0,n.kt)("inlineCode",{parentName:"p"},"dropbox")," via its own native API. It should provide a unified API for accessing all these services."),(0,n.kt)("p",null,"For example, we DO"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add support for ",(0,n.kt)("a",{parentName:"li",href:"https://www.google.com/drive/"},"Google Drive"),": It allows users to access and manage their data on the ",(0,n.kt)("a",{parentName:"li",href:"https://www.google.com/drive/"},"Google Drive"),"."),(0,n.kt)("li",{parentName:"ul"},"Add support for ",(0,n.kt)("a",{parentName:"li",href:"https://www.alibabacloud.com/product/object-storage-service"},"Object Storage Service (OSS)")," via native API: Users can utilize Aliyun's RAM support."),(0,n.kt)("li",{parentName:"ul"},"Add support for ",(0,n.kt)("a",{parentName:"li",href:"https://supabase.com/docs/guides/storage"},"supabase storage"),": Users can visit ",(0,n.kt)("inlineCode",{parentName:"li"},"supabase storage")," now!")),(0,n.kt)("p",null,"while we DO NOT"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add support for ",(0,n.kt)("a",{parentName:"li",href:"https://cloud.google.com/storage"},"Google Cloud Storage (GCS)")," via ",(0,n.kt)("a",{parentName:"li",href:"https://cloud.google.com/storage/docs/xml-api/overview"},"XML API"),": ",(0,n.kt)("a",{parentName:"li",href:"https://cloud.google.com/storage"},"GCS")," has native ",(0,n.kt)("a",{parentName:"li",href:"https://cloud.google.com/storage/docs/json_api"},"JSON API")," which is more powerful"),(0,n.kt)("li",{parentName:"ul"},"Add support for structural data in ",(0,n.kt)("inlineCode",{parentName:"li"},"MySQL/PostgreSQL"),": We can treat a database as a simple key-value store, but we can't support unified access of structural data.")),(0,n.kt)("h3",{id:"2-free-from-implementations"},"2. Free from implementations"),(0,n.kt)("p",null,"OpenDAL needs to separate the various implementation details of services and enables users to write identical logic for different services."),(0,n.kt)("p",null,"For example, we DO"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add a new capability to indicate whether ",(0,n.kt)("inlineCode",{parentName:"li"},"presign")," is supported: Users can now write logic based on the ",(0,n.kt)("inlineCode",{parentName:"li"},"can_presign")," option."),(0,n.kt)("li",{parentName:"ul"},"Add a ",(0,n.kt)("inlineCode",{parentName:"li"},"default_storage_class")," configuration for the S3 service: Configuration is specific to the S3 service."),(0,n.kt)("li",{parentName:"ul"},"Add an option for ",(0,n.kt)("inlineCode",{parentName:"li"},"content_type")," in the ",(0,n.kt)("inlineCode",{parentName:"li"},"write")," operation: It aligns with HTTP standards.")),(0,n.kt)("p",null,"while we DO NOT"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add a new option in read for ",(0,n.kt)("inlineCode",{parentName:"li"},"storage_class"),": As different services could have varying values for this parameter.")),(0,n.kt)("h3",{id:"3-free-to-integrate"},"3. Free to integrate"),(0,n.kt)("p",null,"OpenDAL needs to be integrated with different systems."),(0,n.kt)("p",null,"For example, we DO"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add Python binding: Python programmers can use OpenDAL."),(0,n.kt)("li",{parentName:"ul"},"Add object_store integration: ",(0,n.kt)("inlineCode",{parentName:"li"},"object_store")," users can adopt OpenDAL.")),(0,n.kt)("h3",{id:"4-free-of-cost"},"4. Free of cost"),(0,n.kt)("p",null,"OpenDAL needs to implement features in a zero cost way which means:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Users need not to pay cost for unused features."),(0,n.kt)("li",{parentName:"ul"},"Users cannot write better implementation for used features.")),(0,n.kt)("p",null,"For example, we DO"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add ",(0,n.kt)("inlineCode",{parentName:"li"},"layer")," support: Users can add logging/metrics/tracing in zero cost way."),(0,n.kt)("li",{parentName:"ul"},"Implement ",(0,n.kt)("inlineCode",{parentName:"li"},"seek")," for Reader: Users cannot write better ",(0,n.kt)("inlineCode",{parentName:"li"},"seek")," support, they all need to pay the same cost.")),(0,n.kt)("p",null,"we DO NOT"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Add ",(0,n.kt)("inlineCode",{parentName:"li"},"Arc")," for metadata: Users may only need to use metadata once and never clone it. For those who do want this feature, they can add ",(0,n.kt)("inlineCode",{parentName:"li"},"Arc")," themselves.")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/22d8fa67.bad6217a.js b/assets/js/22d8fa67.7650f82d.js similarity index 85% rename from assets/js/22d8fa67.bad6217a.js rename to assets/js/22d8fa67.7650f82d.js index 394d3171460b..e315a208064e 100644 --- a/assets/js/22d8fa67.bad6217a.js +++ b/assets/js/22d8fa67.7650f82d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4536],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var r=a(9496);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),c=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=c(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(a),d=n,b=p["".concat(i,".").concat(d)]||p[d]||m[d]||l;return a?r.createElement(b,o(o({ref:t},u),{},{components:a})):r.createElement(b,o({ref:t},u))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,o=new Array(l);o[0]=d;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:n,o[1]=s;for(var c=2;c{a.d(t,{Z:()=>o});var r=a(9496),n=a(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:a,className:o}=e;return r.createElement("div",{role:"tabpanel",className:(0,n.Z)(l.tabItem,o),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var r=a(8126),n=a(9496),l=a(5924),o=a(3053),s=a(3442),i=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:r,default:n}}=e;return{value:t,label:a,attributes:r,default:n}}))}function m(e){const{values:t,children:a}=e;return(0,n.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function d(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const r=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,i._X)(l),(0,n.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:r}=e,l=m(e),[o,s]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=a.find((e=>e.default))??a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[i,c]=b({queryString:a,groupId:r}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,u.Nk)(a);return[r,(0,n.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:r}),k=(()=>{const e=i??p;return d({value:e,tabValues:l})?e:null})();(0,n.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:o,selectValue:(0,n.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);s(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var k=a(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:a,selectedValue:s,selectValue:i,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),m=e=>{const t=e.currentTarget,a=u.indexOf(t),r=c[a].value;r!==s&&(p(t),i(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:o}=e;return n.createElement("li",(0,r.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>u.push(e),onKeyDown:d,onClick:m},o,{className:(0,l.Z)("tabs__item",y.tabItem,o?.className,{"tabs__item--active":s===t})}),a??t)})))}function v(e){let{lazy:t,children:a,selectedValue:r}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function g(e){const t=f(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},n.createElement(h,(0,r.Z)({},e,t)),n.createElement(v,(0,r.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return n.createElement(g,(0,r.Z)({key:String(t)},e))}},7615:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>y,frontMatter:()=>u,metadata:()=>m,toc:()=>b});var r=a(8126),n=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function s(e){let{components:t,...a}=e;return(0,n.kt)(o,(0,r.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,n.kt)("h2",{id:"example"},"Example"),(0,n.kt)("h3",{id:"via-builder"},"Via Builder"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Memory;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Memory::default();\n builder.root("/tmp");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}s.isMDXComponent=!0;var i=a(8750),c=a(5810);const u={title:"Memory"},p=void 0,m={unversionedId:"services/memory",id:"services/memory",title:"Memory",description:"In memory service support. (BTreeMap Based)",source:"@site/docs/services/memory.mdx",sourceDirName:"services",slug:"/services/memory",permalink:"/docs/services/memory",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/memory.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Memory"},sidebar:"docs",previous:{title:"Memcached",permalink:"/docs/services/memcached"},next:{title:"Moka",permalink:"/docs/services/moka"}},d={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function y(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"In memory service support. (BTreeMap Based)"),(0,n.kt)(s,{components:a.components,mdxType:"Docs"}),(0,n.kt)("h3",{id:"via-config"},"Via Config"),(0,n.kt)(i.Z,{mdxType:"Tabs"},(0,n.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Memory, map)?;\n Ok(())\n}\n'))),(0,n.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("memory", {\n root: "/path/to/dir",\n });\n}\n'))),(0,n.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("memory",\n root="/path/to/dir",\n)\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4536],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var r=a(9496);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),c=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=c(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(a),d=n,b=p["".concat(i,".").concat(d)]||p[d]||m[d]||l;return a?r.createElement(b,o(o({ref:t},u),{},{components:a})):r.createElement(b,o({ref:t},u))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,o=new Array(l);o[0]=d;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:n,o[1]=s;for(var c=2;c{a.d(t,{Z:()=>o});var r=a(9496),n=a(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:a,className:o}=e;return r.createElement("div",{role:"tabpanel",className:(0,n.Z)(l.tabItem,o),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var r=a(8126),n=a(9496),l=a(5924),o=a(3053),s=a(3442),i=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:r,default:n}}=e;return{value:t,label:a,attributes:r,default:n}}))}function m(e){const{values:t,children:a}=e;return(0,n.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function d(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const r=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,i._X)(l),(0,n.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:r}=e,l=m(e),[o,s]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=a.find((e=>e.default))??a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[i,c]=b({queryString:a,groupId:r}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,u.Nk)(a);return[r,(0,n.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:r}),k=(()=>{const e=i??p;return d({value:e,tabValues:l})?e:null})();(0,n.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:o,selectValue:(0,n.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);s(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var k=a(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:a,selectedValue:s,selectValue:i,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),m=e=>{const t=e.currentTarget,a=u.indexOf(t),r=c[a].value;r!==s&&(p(t),i(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:o}=e;return n.createElement("li",(0,r.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>u.push(e),onKeyDown:d,onClick:m},o,{className:(0,l.Z)("tabs__item",y.tabItem,o?.className,{"tabs__item--active":s===t})}),a??t)})))}function v(e){let{lazy:t,children:a,selectedValue:r}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function g(e){const t=f(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},n.createElement(h,(0,r.Z)({},e,t)),n.createElement(v,(0,r.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return n.createElement(g,(0,r.Z)({key:String(t)},e))}},7615:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>y,frontMatter:()=>u,metadata:()=>m,toc:()=>b});var r=a(8126),n=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function s(e){let{components:t,...a}=e;return(0,n.kt)(o,(0,r.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,n.kt)("h2",{id:"example"},"Example"),(0,n.kt)("h3",{id:"via-builder"},"Via Builder"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Memory;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Memory::default();\n builder.root("/tmp");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}s.isMDXComponent=!0;var i=a(8750),c=a(5810);const u={title:"Memory"},p=void 0,m={unversionedId:"services/memory",id:"services/memory",title:"Memory",description:"In memory service support. (BTreeMap Based)",source:"@site/docs/services/memory.mdx",sourceDirName:"services",slug:"/services/memory",permalink:"/docs/services/memory",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/memory.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Memory"},sidebar:"docs",previous:{title:"Memcached",permalink:"/docs/services/memcached"},next:{title:"Moka",permalink:"/docs/services/moka"}},d={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function y(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"In memory service support. (BTreeMap Based)"),(0,n.kt)(s,{components:a.components,mdxType:"Docs"}),(0,n.kt)("h3",{id:"via-config"},"Via Config"),(0,n.kt)(i.Z,{mdxType:"Tabs"},(0,n.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Memory, map)?;\n Ok(())\n}\n'))),(0,n.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("memory", {\n root: "/path/to/dir",\n });\n}\n'))),(0,n.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("memory",\n root="/path/to/dir",\n)\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/29b208a4.a7f31f6c.js b/assets/js/29b208a4.4ec1c1a4.js similarity index 84% rename from assets/js/29b208a4.a7f31f6c.js rename to assets/js/29b208a4.4ec1c1a4.js index 22daaa59306a..eeb3a8c40baa 100644 --- a/assets/js/29b208a4.a7f31f6c.js +++ b/assets/js/29b208a4.4ec1c1a4.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[6152],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},c),{},{components:a})):n.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function k(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:a,groupId:n}),[p,k]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),k(e)}),[u,k,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function v(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(y,(0,n.Z)({},e,t)),r.createElement(v,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},2790:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Authorization keys",id:"authorization-keys",level:3},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key"),": Set the authorization key for the backend, do not set if you want to read public bucket")),(0,r.kt)("h3",{id:"authorization-keys"},"Authorization keys"),(0,r.kt)("p",null,"There are two types of key in the Supabase, one is anon_key(Client key), another one is\nservice_role_key(Secret key). The former one can only write public resources while the latter one\ncan access all resources. Note that if you want to read public resources, do not set the key."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Supabase;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Supabase::default();\n \n builder.root("/");\n builder.bucket("test_bucket");\n builder.endpoint("http://127.0.0.1:54321");\n // this sets up the anon_key, which means this operator can only write public resource\n builder.key("some_anon_key");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"Supabase"},p=void 0,d={unversionedId:"services/supabase",id:"services/supabase",title:"Supabase",description:"Supabase service support.",source:"@site/docs/services/supabase.mdx",sourceDirName:"services",slug:"/services/supabase",permalink:"/docs/services/supabase",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/supabase.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Supabase"},sidebar:"docs",previous:{title:"Sqlite",permalink:"/docs/services/sqlite"},next:{title:"Swift",permalink:"/docs/services/swift"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://supabase.com/"},"Supabase")," service support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/".to_string());\n map.insert("bucket".to_string(), "test_bucket".to_string());\n map.insert("endpoint".to_string(), "http://127.0.0.1:54321".to_string());\n map.insert("key".to_string(), "some_anon_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Supabase, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("supabase", {\n root: "/",\n bucket: "test_bucket",\n endpoint: "http://127.0.0.1:54321",\n key: "some_anon_key",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("supabase",\n root="/",\n bucket="test_bucket",\n endpoint="http://127.0.0.1:54321",\n key="some_anon_key",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[6152],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},c),{},{components:a})):n.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function k(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:a,groupId:n}),[p,k]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),k(e)}),[u,k,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function v(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(y,(0,n.Z)({},e,t)),r.createElement(v,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},2790:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Authorization keys",id:"authorization-keys",level:3},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key"),": Set the authorization key for the backend, do not set if you want to read public bucket")),(0,r.kt)("h3",{id:"authorization-keys"},"Authorization keys"),(0,r.kt)("p",null,"There are two types of key in the Supabase, one is anon_key(Client key), another one is\nservice_role_key(Secret key). The former one can only write public resources while the latter one\ncan access all resources. Note that if you want to read public resources, do not set the key."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Supabase;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Supabase::default();\n \n builder.root("/");\n builder.bucket("test_bucket");\n builder.endpoint("http://127.0.0.1:54321");\n // this sets up the anon_key, which means this operator can only write public resource\n builder.key("some_anon_key");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"Supabase"},p=void 0,d={unversionedId:"services/supabase",id:"services/supabase",title:"Supabase",description:"Supabase service support.",source:"@site/docs/services/supabase.mdx",sourceDirName:"services",slug:"/services/supabase",permalink:"/docs/services/supabase",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/supabase.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Supabase"},sidebar:"docs",previous:{title:"Sqlite",permalink:"/docs/services/sqlite"},next:{title:"Swift",permalink:"/docs/services/swift"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://supabase.com/"},"Supabase")," service support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/".to_string());\n map.insert("bucket".to_string(), "test_bucket".to_string());\n map.insert("endpoint".to_string(), "http://127.0.0.1:54321".to_string());\n map.insert("key".to_string(), "some_anon_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Supabase, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("supabase", {\n root: "/",\n bucket: "test_bucket",\n endpoint: "http://127.0.0.1:54321",\n key: "some_anon_key",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("supabase",\n root="/",\n bucket="test_bucket",\n endpoint="http://127.0.0.1:54321",\n key="some_anon_key",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2cbf1097.f00467d0.js b/assets/js/2cbf1097.abc52b0c.js similarity index 91% rename from assets/js/2cbf1097.f00467d0.js rename to assets/js/2cbf1097.abc52b0c.js index ebcf045e1d15..cc12f2616a2c 100644 --- a/assets/js/2cbf1097.f00467d0.js +++ b/assets/js/2cbf1097.abc52b0c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2804],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||i;return n?a.createElement(k,l(l({ref:t},u),{},{components:n})):a.createElement(k,l({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,l[1]=o;for(var c=2;c{n.d(t,{Z:()=>l});var a=n(9496),r=n(5924);const i={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:n,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,l),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(8126),r=n(9496),i=n(5924),l=n(3053),o=n(3442),s=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:n}=e;const a=(0,o.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=d(e),[l,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[s,c]=k({queryString:n,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),h=(()=>{const e=s??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{h&&o(h)}),[h]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),b(e)}),[c,b,i]),tabValues:i}}var h=n(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function g(e){let{className:t,block:n,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==o&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:l}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},l,{className:(0,i.Z)("tabs__item",y.tabItem,l?.className,{"tabs__item--active":o===t})}),n??t)})))}function f(e){let{lazy:t,children:n,selectedValue:a}=e;const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function _(e){const t=b(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",y.tabList)},r.createElement(g,(0,a.Z)({},e,t)),r.createElement(f,(0,a.Z)({},e,t)))}function v(e){const t=(0,h.Z)();return r.createElement(_,(0,a.Z)({key:String(t)},e))}},2536:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>k,default:()=>_,frontMatter:()=>m,metadata:()=>b,toc:()=>y});var a=n(8126),r=(n(9496),n(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Temporary security credentials",id:"temporary-security-credentials",level:2},{value:"Server Side Encryption",id:"server-side-encryption",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:2},{value:"Basic Setup",id:"basic-setup",level:3},{value:"S3 with SSE-C",id:"s3-with-sse-c",level:3},{value:"S3 with SSE-KMS and aws managed kms key",id:"s3-with-sse-kms-and-aws-managed-kms-key",level:3},{value:"S3 with SSE-KMS and customer managed kms key",id:"s3-with-sse-kms-and-customer-managed-kms-key",level:3},{value:"S3 with SSE-S3",id:"s3-with-sse-s3",level:3}]},l="wrapper";function o(e){let{components:t,...n}=e;return(0,r.kt)(l,(0,a.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"region"),": Set the region for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"access_key_id"),": Set the access_key_id for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"secret_access_key"),": Set the secret_access_key for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"security_token"),": Set the security_token for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"default_storage_class"),": Set the default storage_class for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption"),": Set the server_side_encryption for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_aws_kms_key_id"),": Set the server_side_encryption_aws_kms_key_id for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_customer_algorithm"),": Set the server_side_encryption_customer_algorithm for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_customer_key"),": Set the server_side_encryption_customer_key for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_customer_key_md5"),": Set the server_side_encryption_customer_key_md5 for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"disable_config_load"),": Disable aws config load from env"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"enable_virtual_host_style"),": Enable virtual host style.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"S3Builder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"temporary-security-credentials"},"Temporary security credentials"),(0,r.kt)("p",null,"OpenDAL now provides support for S3 temporary security credentials in IAM."),(0,r.kt)("p",null,"The way to take advantage of this feature is to build your S3 backend with ",(0,r.kt)("inlineCode",{parentName:"p"},"Builder::security_token"),"."),(0,r.kt)("p",null,"But OpenDAL will not refresh the temporary security credentials, please keep in mind to refresh those credentials in time."),(0,r.kt)("h2",{id:"server-side-encryption"},"Server Side Encryption"),(0,r.kt)("p",null,"OpenDAL provides full support of S3 Server Side Encryption(SSE) features."),(0,r.kt)("p",null,"The easiest way to configure them is to use helper functions like"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"SSE-KMS: ",(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_with_aws_managed_kms_key")),(0,r.kt)("li",{parentName:"ul"},"SSE-KMS: ",(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_with_customer_managed_kms_key")),(0,r.kt)("li",{parentName:"ul"},"SSE-S3: ",(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_with_s3_key")),(0,r.kt)("li",{parentName:"ul"},"SSE-C: ",(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_with_customer_key"))),(0,r.kt)("p",null,"If those functions don't fulfill need, low-level options are also provided:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Use service managed kms key",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption="aws:kms"')))),(0,r.kt)("li",{parentName:"ul"},"Use customer provided kms key",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption="aws:kms"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption_aws_kms_key_id="your-kms-key"')))),(0,r.kt)("li",{parentName:"ul"},"Use S3 managed key",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption="AES256"')))),(0,r.kt)("li",{parentName:"ul"},"Use customer key",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption_customer_algorithm="AES256"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption_customer_key="base64-of-your-aes256-key"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption_customer_key_md5="base64-of-your-aes256-key-md5"'))))),(0,r.kt)("p",null,"After SSE have been configured, all requests send by this backed will attach those headers."),(0,r.kt)("p",null,"Reference: ",(0,r.kt)("a",{parentName:"p",href:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/serv-side-encryption.html"},"Protecting data using server-side encryption")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h2",{id:"via-builder"},"Via Builder"),(0,r.kt)("h3",{id:"basic-setup"},"Basic Setup"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::S3;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create s3 backend builder.\n let mut builder = S3::default();\n // Set the root for s3, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/path/to/dir");\n // Set the bucket name. This is required.\n builder.bucket("test");\n // Set the region. This is required for some services, if you don\'t care about it, for example Minio service, just set it to "auto", it will be ignored.\n builder.region("us-east-1");\n // Set the endpoint.\n //\n // For examples:\n // - "https://s3.amazonaws.com"\n // - "http://127.0.0.1:9000"\n // - "https://oss-ap-northeast-1.aliyuncs.com"\n // - "https://cos.ap-seoul.myqcloud.com"\n //\n // Default to "https://s3.amazonaws.com"\n builder.endpoint("https://s3.amazonaws.com");\n // Set the access_key_id and secret_access_key.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n\n')),(0,r.kt)("h3",{id:"s3-with-sse-c"},"S3 with SSE-C"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse log::info;\nuse opendal::services::S3;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = S3::default();\n\n // Setup builders\n builder.root("/path/to/dir");\n builder.bucket("test");\n builder.region("us-east-1");\n builder.endpoint("https://s3.amazonaws.com");\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n\n // Enable SSE-C\n builder.server_side_encryption_with_customer_key("AES256", "customer_key".as_bytes());\n\n let op = Operator::new(builder)?.finish();\n info!("operator: {:?}", op);\n\n // Writing your testing code here.\n\n Ok(())\n}\n')),(0,r.kt)("h3",{id:"s3-with-sse-kms-and-aws-managed-kms-key"},"S3 with SSE-KMS and aws managed kms key"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse log::info;\nuse opendal::services::S3;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = S3::default();\n\n // Setup builders\n builder.root("/path/to/dir");\n builder.bucket("test");\n builder.region("us-east-1");\n builder.endpoint("https://s3.amazonaws.com");\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n \n // Enable SSE-KMS with aws managed kms key\n builder.server_side_encryption_with_aws_managed_kms_key();\n\n let op = Operator::new(builder)?.finish();\n info!("operator: {:?}", op);\n\n // Writing your testing code here.\n\n Ok(())\n}\n')),(0,r.kt)("h3",{id:"s3-with-sse-kms-and-customer-managed-kms-key"},"S3 with SSE-KMS and customer managed kms key"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse log::info;\nuse opendal::services::S3;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = S3::default();\n\n // Setup builders\n builder.root("/path/to/dir");\n builder.bucket("test");\n builder.region("us-east-1");\n builder.endpoint("https://s3.amazonaws.com");\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n\n // Enable SSE-KMS with customer managed kms key\n builder.server_side_encryption_with_customer_managed_kms_key("aws_kms_key_id");\n\n let op = Operator::new(builder)?.finish();\n info!("operator: {:?}", op);\n\n // Writing your testing code here.\n\n Ok(())\n}\n')),(0,r.kt)("h3",{id:"s3-with-sse-s3"},"S3 with SSE-S3"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse log::info;\nuse opendal::services::S3;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = S3::default();\n\n // Setup builders\n builder.root("/path/to/dir");\n builder.bucket("test");\n builder.region("us-east-1");\n builder.endpoint("https://s3.amazonaws.com");\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n\n // Enable SSE-S3\n builder.server_side_encryption_with_s3_key();\n\n let op = Operator::new(builder)?.finish();\n info!("operator: {:?}", op);\n\n // Writing your testing code here.\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=n(8750),c=n(5810);const u={toc:[{value:"Compatible Services",id:"compatible-services",level:2},{value:"AWS S3",id:"aws-s3",level:3},{value:"Alibaba Object Storage Service (OSS)",id:"alibaba-object-storage-service-oss",level:3},{value:"Minio",id:"minio",level:3},{value:"QingStor Object Storage",id:"qingstor-object-storage",level:3},{value:"Scaleway Object Storage",id:"scaleway-object-storage",level:3},{value:"Tencent Cloud Object Storage (COS)",id:"tencent-cloud-object-storage-cos",level:3},{value:"Wasabi Object Storage",id:"wasabi-object-storage",level:3},{value:"Cloudflare R2",id:"cloudflare-r2",level:3},{value:"Google Cloud Storage XML API",id:"google-cloud-storage-xml-api",level:3}]},p="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"compatible-services"},"Compatible Services"),(0,r.kt)("h3",{id:"aws-s3"},"AWS S3"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://aws.amazon.com/s3/"},"AWS S3")," is the default implementations of s3 services. Only ",(0,r.kt)("inlineCode",{parentName:"p"},"bucket")," is required."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust,ignore"},'builder.bucket("");\n')),(0,r.kt)("h3",{id:"alibaba-object-storage-service-oss"},"Alibaba Object Storage Service (OSS)"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.alibabacloud.com/product/object-storage-service"},"OSS")," is a s3 compatible service provided by ",(0,r.kt)("a",{parentName:"p",href:"https://www.alibabacloud.com"},"Alibaba Cloud"),"."),(0,r.kt)("p",null,"To connect to OSS, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of oss, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://oss-cn-hangzhou.aliyuncs.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of oss.")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"OSS provide internal endpoint for used at alibabacloud internally, please visit ",(0,r.kt)("a",{parentName:"p",href:"https://www.alibabacloud.com/help/en/object-storage-service/latest/regions-and-endpoints"},"OSS Regions and endpoints")," for more details.")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"OSS only supports the virtual host style, users could meet errors like:"),(0,r.kt)("pre",{parentName:"blockquote"},(0,r.kt)("code",{parentName:"pre",className:"language-xml"},'\n\n SecondLevelDomainForbidden\n The bucket you are attempting to access must be addressed using OSS third level domain.\n 62A1C265292C0632377F021F\n oss-cn-hangzhou.aliyuncs.com\n\n')),(0,r.kt)("p",{parentName:"blockquote"},"In that case, please enable virtual host style for requesting.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust,ignore"},'builder.endpoint("https://oss-cn-hangzhou.aliyuncs.com");\nbuilder.region("");\nbuilder.bucket("");\nbuilder.enable_virtual_host_style();\n')),(0,r.kt)("h3",{id:"minio"},"Minio"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://min.io/"},"minio")," is an open-source s3 compatible services."),(0,r.kt)("p",null,"To connect to minio, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of minio, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"http://127.0.0.1:9000")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"region"),': The region of minio. If you don\'t care about it, just set it to "auto", it will be ignored.'),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of minio.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust,ignore"},'builder.endpoint("http://127.0.0.1:9000");\nbuilder.region("");\nbuilder.bucket("");\n')),(0,r.kt)("h3",{id:"qingstor-object-storage"},"QingStor Object Storage"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.qingcloud.com/products/qingstor"},"QingStor Object Storage")," is a S3-compatible service provided by ",(0,r.kt)("a",{parentName:"p",href:"https://www.qingcloud.com/"},"QingCloud"),"."),(0,r.kt)("p",null,"To connect to QingStor Object Storage, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of QingStor s3 compatible endpoint, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://s3.pek3b.qingstor.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name.")),(0,r.kt)("h3",{id:"scaleway-object-storage"},"Scaleway Object Storage"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.scaleway.com/en/object-storage/"},"Scaleway Object Storage")," is a S3-compatible and multi-AZ redundant object storage service."),(0,r.kt)("p",null,"To connect to Scaleway Object Storage, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of scaleway, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://s3.nl-ams.scw.cloud")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"region"),": The region of scaleway."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of scaleway.")),(0,r.kt)("h3",{id:"tencent-cloud-object-storage-cos"},"Tencent Cloud Object Storage (COS)"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://intl.cloud.tencent.com/products/cos"},"COS")," is a s3 compatible service provided by ",(0,r.kt)("a",{parentName:"p",href:"https://intl.cloud.tencent.com/"},"Tencent Cloud"),"."),(0,r.kt)("p",null,"To connect to COS, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of cos, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://cos.ap-beijing.myqcloud.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of cos.")),(0,r.kt)("h3",{id:"wasabi-object-storage"},"Wasabi Object Storage"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://wasabi.com/"},"Wasabi")," is a s3 compatible service."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Cloud storage pricing that is 80% less than Amazon S3.")),(0,r.kt)("p",null,"To connect to wasabi, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of wasabi, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://s3.us-east-2.wasabisys.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of wasabi.")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Refer to ",(0,r.kt)("a",{parentName:"p",href:"https://wasabi-support.zendesk.com/hc/en-us/articles/360015106031"},"What are the service URLs for Wasabi's different storage regions?")," for more details.")),(0,r.kt)("h3",{id:"cloudflare-r2"},"Cloudflare R2"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://developers.cloudflare.com/r2/"},"Cloudflare R2")," provides s3 compatible API."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Cloudflare R2 Storage allows developers to store large amounts of unstructured data without the costly egress bandwidth fees associated with typical cloud storage services.")),(0,r.kt)("p",null,"To connect to r2, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of r2, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://.r2.cloudflarestorage.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of r2."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"region"),": When you create a new bucket, the data location is set to Automatic by default. So please use ",(0,r.kt)("inlineCode",{parentName:"li"},"auto")," for region."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"batch_max_operations"),": R2's delete objects will return ",(0,r.kt)("inlineCode",{parentName:"li"},"Internal Error")," if the batch is larger than ",(0,r.kt)("inlineCode",{parentName:"li"},"700"),". Please set this value ",(0,r.kt)("inlineCode",{parentName:"li"},"<= 700")," to make sure batch delete work as expected."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"enable_exact_buf_write"),": R2 requires the non-tailing parts size to be exactly the same. Please enable this option to avoid the error ",(0,r.kt)("inlineCode",{parentName:"li"},"All non-trailing parts must have the same length"),".")),(0,r.kt)("h3",{id:"google-cloud-storage-xml-api"},"Google Cloud Storage XML API"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://cloud.google.com/storage/docs/xml-api/overview"},"Google Cloud Storage XML API")," provides s3 compatible API."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of Google Cloud Storage XML API, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://storage.googleapis.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name."),(0,r.kt)("li",{parentName:"ul"},"To access GCS via S3 API, please enable ",(0,r.kt)("inlineCode",{parentName:"li"},'features = ["native-tls"]')," in your ",(0,r.kt)("inlineCode",{parentName:"li"},"Cargo.toml")," to avoid connection being reset when using ",(0,r.kt)("inlineCode",{parentName:"li"},"rustls"),". Tracking in ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/seanmonstar/reqwest/issues/1809"},"https://github.com/seanmonstar/reqwest/issues/1809"))))}d.isMDXComponent=!0;const m={title:"S3"},k=void 0,b={unversionedId:"services/s3",id:"services/s3",title:"S3",description:"Aws S3 and compatible services (including minio, digitalocean space, Tencent Cloud Object Storage(COS) and so on) support.",source:"@site/docs/services/s3.mdx",sourceDirName:"services",slug:"/services/s3",permalink:"/docs/services/s3",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/s3.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"S3"},sidebar:"docs",previous:{title:"RocksDB",permalink:"/docs/services/rocksdb"},next:{title:"SFTP",permalink:"/docs/services/sftp"}},h={},y=[{value:"Via Config",id:"via-config",level:2}],g={toc:y},f="wrapper";function _(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Aws S3 and compatible services (including minio, digitalocean space, Tencent Cloud Object Storage(COS) and so on) support."),(0,r.kt)("p",null,"For more information about s3-compatible services, refer to ",(0,r.kt)("a",{parentName:"p",href:"#compatible-services"},"Compatible Services"),"."),(0,r.kt)(o,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h2",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("bucket".to_string(), "test".to_string());\n map.insert("region".to_string(), "us-east-1".to_string());\n map.insert("endpoint".to_string(), "https://s3.amazonaws.com".to_string());\n map.insert("access_key_id".to_string(), "access_key_id".to_string());\n map.insert("secret_access_key".to_string(), "secret_access_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::S3, map)?;\n\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("s3", {\n root: "/path/to/dir",\n bucket: "test",\n region: "us-east-1",\n endpoint: "https://s3.amazonaws.com",\n access_key_id: "access_key_id",\n secret_access_key: "secret_access_key",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("s3",\n root="/path/to/dir",\n bucket="test",\n region="us-east-1",\n endpoint="https://s3.amazonaws.com",\n access_key_id="access_key_id",\n secret_access_key="secret_access_key",\n)\n')))),(0,r.kt)(d,{components:n.components,mdxType:"CompatibleServices"}))}_.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2804],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||i;return n?a.createElement(k,l(l({ref:t},u),{},{components:n})):a.createElement(k,l({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,l[1]=o;for(var c=2;c{n.d(t,{Z:()=>l});var a=n(9496),r=n(5924);const i={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:n,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,l),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(8126),r=n(9496),i=n(5924),l=n(3053),o=n(3442),s=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:n}=e;const a=(0,o.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=d(e),[l,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[s,c]=k({queryString:n,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),h=(()=>{const e=s??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{h&&o(h)}),[h]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),b(e)}),[c,b,i]),tabValues:i}}var h=n(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function g(e){let{className:t,block:n,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==o&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:l}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},l,{className:(0,i.Z)("tabs__item",y.tabItem,l?.className,{"tabs__item--active":o===t})}),n??t)})))}function f(e){let{lazy:t,children:n,selectedValue:a}=e;const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function _(e){const t=b(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",y.tabList)},r.createElement(g,(0,a.Z)({},e,t)),r.createElement(f,(0,a.Z)({},e,t)))}function v(e){const t=(0,h.Z)();return r.createElement(_,(0,a.Z)({key:String(t)},e))}},2536:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>k,default:()=>_,frontMatter:()=>m,metadata:()=>b,toc:()=>y});var a=n(8126),r=(n(9496),n(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Temporary security credentials",id:"temporary-security-credentials",level:2},{value:"Server Side Encryption",id:"server-side-encryption",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:2},{value:"Basic Setup",id:"basic-setup",level:3},{value:"S3 with SSE-C",id:"s3-with-sse-c",level:3},{value:"S3 with SSE-KMS and aws managed kms key",id:"s3-with-sse-kms-and-aws-managed-kms-key",level:3},{value:"S3 with SSE-KMS and customer managed kms key",id:"s3-with-sse-kms-and-customer-managed-kms-key",level:3},{value:"S3 with SSE-S3",id:"s3-with-sse-s3",level:3}]},l="wrapper";function o(e){let{components:t,...n}=e;return(0,r.kt)(l,(0,a.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"region"),": Set the region for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"access_key_id"),": Set the access_key_id for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"secret_access_key"),": Set the secret_access_key for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"security_token"),": Set the security_token for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"default_storage_class"),": Set the default storage_class for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption"),": Set the server_side_encryption for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_aws_kms_key_id"),": Set the server_side_encryption_aws_kms_key_id for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_customer_algorithm"),": Set the server_side_encryption_customer_algorithm for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_customer_key"),": Set the server_side_encryption_customer_key for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_customer_key_md5"),": Set the server_side_encryption_customer_key_md5 for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"disable_config_load"),": Disable aws config load from env"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"enable_virtual_host_style"),": Enable virtual host style.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"S3Builder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"temporary-security-credentials"},"Temporary security credentials"),(0,r.kt)("p",null,"OpenDAL now provides support for S3 temporary security credentials in IAM."),(0,r.kt)("p",null,"The way to take advantage of this feature is to build your S3 backend with ",(0,r.kt)("inlineCode",{parentName:"p"},"Builder::security_token"),"."),(0,r.kt)("p",null,"But OpenDAL will not refresh the temporary security credentials, please keep in mind to refresh those credentials in time."),(0,r.kt)("h2",{id:"server-side-encryption"},"Server Side Encryption"),(0,r.kt)("p",null,"OpenDAL provides full support of S3 Server Side Encryption(SSE) features."),(0,r.kt)("p",null,"The easiest way to configure them is to use helper functions like"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"SSE-KMS: ",(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_with_aws_managed_kms_key")),(0,r.kt)("li",{parentName:"ul"},"SSE-KMS: ",(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_with_customer_managed_kms_key")),(0,r.kt)("li",{parentName:"ul"},"SSE-S3: ",(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_with_s3_key")),(0,r.kt)("li",{parentName:"ul"},"SSE-C: ",(0,r.kt)("inlineCode",{parentName:"li"},"server_side_encryption_with_customer_key"))),(0,r.kt)("p",null,"If those functions don't fulfill need, low-level options are also provided:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Use service managed kms key",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption="aws:kms"')))),(0,r.kt)("li",{parentName:"ul"},"Use customer provided kms key",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption="aws:kms"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption_aws_kms_key_id="your-kms-key"')))),(0,r.kt)("li",{parentName:"ul"},"Use S3 managed key",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption="AES256"')))),(0,r.kt)("li",{parentName:"ul"},"Use customer key",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption_customer_algorithm="AES256"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption_customer_key="base64-of-your-aes256-key"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'server_side_encryption_customer_key_md5="base64-of-your-aes256-key-md5"'))))),(0,r.kt)("p",null,"After SSE have been configured, all requests send by this backed will attach those headers."),(0,r.kt)("p",null,"Reference: ",(0,r.kt)("a",{parentName:"p",href:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/serv-side-encryption.html"},"Protecting data using server-side encryption")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h2",{id:"via-builder"},"Via Builder"),(0,r.kt)("h3",{id:"basic-setup"},"Basic Setup"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::S3;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create s3 backend builder.\n let mut builder = S3::default();\n // Set the root for s3, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/path/to/dir");\n // Set the bucket name. This is required.\n builder.bucket("test");\n // Set the region. This is required for some services, if you don\'t care about it, for example Minio service, just set it to "auto", it will be ignored.\n builder.region("us-east-1");\n // Set the endpoint.\n //\n // For examples:\n // - "https://s3.amazonaws.com"\n // - "http://127.0.0.1:9000"\n // - "https://oss-ap-northeast-1.aliyuncs.com"\n // - "https://cos.ap-seoul.myqcloud.com"\n //\n // Default to "https://s3.amazonaws.com"\n builder.endpoint("https://s3.amazonaws.com");\n // Set the access_key_id and secret_access_key.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n\n')),(0,r.kt)("h3",{id:"s3-with-sse-c"},"S3 with SSE-C"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse log::info;\nuse opendal::services::S3;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = S3::default();\n\n // Setup builders\n builder.root("/path/to/dir");\n builder.bucket("test");\n builder.region("us-east-1");\n builder.endpoint("https://s3.amazonaws.com");\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n\n // Enable SSE-C\n builder.server_side_encryption_with_customer_key("AES256", "customer_key".as_bytes());\n\n let op = Operator::new(builder)?.finish();\n info!("operator: {:?}", op);\n\n // Writing your testing code here.\n\n Ok(())\n}\n')),(0,r.kt)("h3",{id:"s3-with-sse-kms-and-aws-managed-kms-key"},"S3 with SSE-KMS and aws managed kms key"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse log::info;\nuse opendal::services::S3;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = S3::default();\n\n // Setup builders\n builder.root("/path/to/dir");\n builder.bucket("test");\n builder.region("us-east-1");\n builder.endpoint("https://s3.amazonaws.com");\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n \n // Enable SSE-KMS with aws managed kms key\n builder.server_side_encryption_with_aws_managed_kms_key();\n\n let op = Operator::new(builder)?.finish();\n info!("operator: {:?}", op);\n\n // Writing your testing code here.\n\n Ok(())\n}\n')),(0,r.kt)("h3",{id:"s3-with-sse-kms-and-customer-managed-kms-key"},"S3 with SSE-KMS and customer managed kms key"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse log::info;\nuse opendal::services::S3;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = S3::default();\n\n // Setup builders\n builder.root("/path/to/dir");\n builder.bucket("test");\n builder.region("us-east-1");\n builder.endpoint("https://s3.amazonaws.com");\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n\n // Enable SSE-KMS with customer managed kms key\n builder.server_side_encryption_with_customer_managed_kms_key("aws_kms_key_id");\n\n let op = Operator::new(builder)?.finish();\n info!("operator: {:?}", op);\n\n // Writing your testing code here.\n\n Ok(())\n}\n')),(0,r.kt)("h3",{id:"s3-with-sse-s3"},"S3 with SSE-S3"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse log::info;\nuse opendal::services::S3;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = S3::default();\n\n // Setup builders\n builder.root("/path/to/dir");\n builder.bucket("test");\n builder.region("us-east-1");\n builder.endpoint("https://s3.amazonaws.com");\n builder.access_key_id("access_key_id");\n builder.secret_access_key("secret_access_key");\n\n // Enable SSE-S3\n builder.server_side_encryption_with_s3_key();\n\n let op = Operator::new(builder)?.finish();\n info!("operator: {:?}", op);\n\n // Writing your testing code here.\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=n(8750),c=n(5810);const u={toc:[{value:"Compatible Services",id:"compatible-services",level:2},{value:"AWS S3",id:"aws-s3",level:3},{value:"Alibaba Object Storage Service (OSS)",id:"alibaba-object-storage-service-oss",level:3},{value:"Minio",id:"minio",level:3},{value:"QingStor Object Storage",id:"qingstor-object-storage",level:3},{value:"Scaleway Object Storage",id:"scaleway-object-storage",level:3},{value:"Tencent Cloud Object Storage (COS)",id:"tencent-cloud-object-storage-cos",level:3},{value:"Wasabi Object Storage",id:"wasabi-object-storage",level:3},{value:"Cloudflare R2",id:"cloudflare-r2",level:3},{value:"Google Cloud Storage XML API",id:"google-cloud-storage-xml-api",level:3}]},p="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"compatible-services"},"Compatible Services"),(0,r.kt)("h3",{id:"aws-s3"},"AWS S3"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://aws.amazon.com/s3/"},"AWS S3")," is the default implementations of s3 services. Only ",(0,r.kt)("inlineCode",{parentName:"p"},"bucket")," is required."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust,ignore"},'builder.bucket("");\n')),(0,r.kt)("h3",{id:"alibaba-object-storage-service-oss"},"Alibaba Object Storage Service (OSS)"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.alibabacloud.com/product/object-storage-service"},"OSS")," is a s3 compatible service provided by ",(0,r.kt)("a",{parentName:"p",href:"https://www.alibabacloud.com"},"Alibaba Cloud"),"."),(0,r.kt)("p",null,"To connect to OSS, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of oss, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://oss-cn-hangzhou.aliyuncs.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of oss.")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"OSS provide internal endpoint for used at alibabacloud internally, please visit ",(0,r.kt)("a",{parentName:"p",href:"https://www.alibabacloud.com/help/en/object-storage-service/latest/regions-and-endpoints"},"OSS Regions and endpoints")," for more details.")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"OSS only supports the virtual host style, users could meet errors like:"),(0,r.kt)("pre",{parentName:"blockquote"},(0,r.kt)("code",{parentName:"pre",className:"language-xml"},'\n\n SecondLevelDomainForbidden\n The bucket you are attempting to access must be addressed using OSS third level domain.\n 62A1C265292C0632377F021F\n oss-cn-hangzhou.aliyuncs.com\n\n')),(0,r.kt)("p",{parentName:"blockquote"},"In that case, please enable virtual host style for requesting.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust,ignore"},'builder.endpoint("https://oss-cn-hangzhou.aliyuncs.com");\nbuilder.region("");\nbuilder.bucket("");\nbuilder.enable_virtual_host_style();\n')),(0,r.kt)("h3",{id:"minio"},"Minio"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://min.io/"},"minio")," is an open-source s3 compatible services."),(0,r.kt)("p",null,"To connect to minio, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of minio, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"http://127.0.0.1:9000")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"region"),': The region of minio. If you don\'t care about it, just set it to "auto", it will be ignored.'),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of minio.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust,ignore"},'builder.endpoint("http://127.0.0.1:9000");\nbuilder.region("");\nbuilder.bucket("");\n')),(0,r.kt)("h3",{id:"qingstor-object-storage"},"QingStor Object Storage"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.qingcloud.com/products/qingstor"},"QingStor Object Storage")," is a S3-compatible service provided by ",(0,r.kt)("a",{parentName:"p",href:"https://www.qingcloud.com/"},"QingCloud"),"."),(0,r.kt)("p",null,"To connect to QingStor Object Storage, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of QingStor s3 compatible endpoint, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://s3.pek3b.qingstor.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name.")),(0,r.kt)("h3",{id:"scaleway-object-storage"},"Scaleway Object Storage"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.scaleway.com/en/object-storage/"},"Scaleway Object Storage")," is a S3-compatible and multi-AZ redundant object storage service."),(0,r.kt)("p",null,"To connect to Scaleway Object Storage, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of scaleway, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://s3.nl-ams.scw.cloud")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"region"),": The region of scaleway."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of scaleway.")),(0,r.kt)("h3",{id:"tencent-cloud-object-storage-cos"},"Tencent Cloud Object Storage (COS)"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://intl.cloud.tencent.com/products/cos"},"COS")," is a s3 compatible service provided by ",(0,r.kt)("a",{parentName:"p",href:"https://intl.cloud.tencent.com/"},"Tencent Cloud"),"."),(0,r.kt)("p",null,"To connect to COS, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of cos, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://cos.ap-beijing.myqcloud.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of cos.")),(0,r.kt)("h3",{id:"wasabi-object-storage"},"Wasabi Object Storage"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://wasabi.com/"},"Wasabi")," is a s3 compatible service."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Cloud storage pricing that is 80% less than Amazon S3.")),(0,r.kt)("p",null,"To connect to wasabi, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of wasabi, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://s3.us-east-2.wasabisys.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of wasabi.")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Refer to ",(0,r.kt)("a",{parentName:"p",href:"https://wasabi-support.zendesk.com/hc/en-us/articles/360015106031"},"What are the service URLs for Wasabi's different storage regions?")," for more details.")),(0,r.kt)("h3",{id:"cloudflare-r2"},"Cloudflare R2"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://developers.cloudflare.com/r2/"},"Cloudflare R2")," provides s3 compatible API."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Cloudflare R2 Storage allows developers to store large amounts of unstructured data without the costly egress bandwidth fees associated with typical cloud storage services.")),(0,r.kt)("p",null,"To connect to r2, we need to set:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of r2, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://.r2.cloudflarestorage.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name of r2."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"region"),": When you create a new bucket, the data location is set to Automatic by default. So please use ",(0,r.kt)("inlineCode",{parentName:"li"},"auto")," for region."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"batch_max_operations"),": R2's delete objects will return ",(0,r.kt)("inlineCode",{parentName:"li"},"Internal Error")," if the batch is larger than ",(0,r.kt)("inlineCode",{parentName:"li"},"700"),". Please set this value ",(0,r.kt)("inlineCode",{parentName:"li"},"<= 700")," to make sure batch delete work as expected."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"enable_exact_buf_write"),": R2 requires the non-tailing parts size to be exactly the same. Please enable this option to avoid the error ",(0,r.kt)("inlineCode",{parentName:"li"},"All non-trailing parts must have the same length"),".")),(0,r.kt)("h3",{id:"google-cloud-storage-xml-api"},"Google Cloud Storage XML API"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://cloud.google.com/storage/docs/xml-api/overview"},"Google Cloud Storage XML API")," provides s3 compatible API."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of Google Cloud Storage XML API, for example: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://storage.googleapis.com")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": The bucket name."),(0,r.kt)("li",{parentName:"ul"},"To access GCS via S3 API, please enable ",(0,r.kt)("inlineCode",{parentName:"li"},'features = ["native-tls"]')," in your ",(0,r.kt)("inlineCode",{parentName:"li"},"Cargo.toml")," to avoid connection being reset when using ",(0,r.kt)("inlineCode",{parentName:"li"},"rustls"),". Tracking in ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/seanmonstar/reqwest/issues/1809"},"https://github.com/seanmonstar/reqwest/issues/1809"))))}d.isMDXComponent=!0;const m={title:"S3"},k=void 0,b={unversionedId:"services/s3",id:"services/s3",title:"S3",description:"Aws S3 and compatible services (including minio, digitalocean space, Tencent Cloud Object Storage(COS) and so on) support.",source:"@site/docs/services/s3.mdx",sourceDirName:"services",slug:"/services/s3",permalink:"/docs/services/s3",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/s3.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"S3"},sidebar:"docs",previous:{title:"RocksDB",permalink:"/docs/services/rocksdb"},next:{title:"SFTP",permalink:"/docs/services/sftp"}},h={},y=[{value:"Via Config",id:"via-config",level:2}],g={toc:y},f="wrapper";function _(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Aws S3 and compatible services (including minio, digitalocean space, Tencent Cloud Object Storage(COS) and so on) support."),(0,r.kt)("p",null,"For more information about s3-compatible services, refer to ",(0,r.kt)("a",{parentName:"p",href:"#compatible-services"},"Compatible Services"),"."),(0,r.kt)(o,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h2",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("bucket".to_string(), "test".to_string());\n map.insert("region".to_string(), "us-east-1".to_string());\n map.insert("endpoint".to_string(), "https://s3.amazonaws.com".to_string());\n map.insert("access_key_id".to_string(), "access_key_id".to_string());\n map.insert("secret_access_key".to_string(), "secret_access_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::S3, map)?;\n\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("s3", {\n root: "/path/to/dir",\n bucket: "test",\n region: "us-east-1",\n endpoint: "https://s3.amazonaws.com",\n access_key_id: "access_key_id",\n secret_access_key: "secret_access_key",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("s3",\n root="/path/to/dir",\n bucket="test",\n region="us-east-1",\n endpoint="https://s3.amazonaws.com",\n access_key_id="access_key_id",\n secret_access_key="secret_access_key",\n)\n')))),(0,r.kt)(d,{components:n.components,mdxType:"CompatibleServices"}))}_.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3632610d.752d730c.js b/assets/js/3632610d.dccddc34.js similarity index 85% rename from assets/js/3632610d.752d730c.js rename to assets/js/3632610d.dccddc34.js index 9f92a01cabe1..9375d763a947 100644 --- a/assets/js/3632610d.752d730c.js +++ b/assets/js/3632610d.dccddc34.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2963],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},2991:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"datadir"),": Set the path to the redb data directory")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"RedbBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Redb;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Redb::default();\n builder.datadir("/tmp/opendal/redb");\n builder.table("opendal-redb");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"Redb"},p=void 0,d={unversionedId:"services/redb",id:"services/redb",title:"Redb",description:"Redb services support.",source:"@site/docs/services/redb.mdx",sourceDirName:"services",slug:"/services/redb",permalink:"/docs/services/redb",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/redb.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Redb"},sidebar:"docs",previous:{title:"PostgreSQL",permalink:"/docs/services/postgresql"},next:{title:"Redis",permalink:"/docs/services/redis"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/cberner/redb"},"Redb")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut config = HashMap::new();\n config.insert("datadir".to_string(), "/tmp/opendal/redb".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Redb, config)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const config = {\n datadir: "/tmp/opendal/redb",\n };\n const op = new Operator("redb", config);\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nconfig = {\n "datadir": "/tmp/opendal/redb",\n}\n\nop = opendal.Operator("redb", **config)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2963],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},2991:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"datadir"),": Set the path to the redb data directory")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"RedbBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Redb;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Redb::default();\n builder.datadir("/tmp/opendal/redb");\n builder.table("opendal-redb");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"Redb"},p=void 0,d={unversionedId:"services/redb",id:"services/redb",title:"Redb",description:"Redb services support.",source:"@site/docs/services/redb.mdx",sourceDirName:"services",slug:"/services/redb",permalink:"/docs/services/redb",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/redb.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Redb"},sidebar:"docs",previous:{title:"PostgreSQL",permalink:"/docs/services/postgresql"},next:{title:"Redis",permalink:"/docs/services/redis"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/cberner/redb"},"Redb")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut config = HashMap::new();\n config.insert("datadir".to_string(), "/tmp/opendal/redb".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Redb, config)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const config = {\n datadir: "/tmp/opendal/redb",\n };\n const op = new Operator("redb", config);\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nconfig = {\n "datadir": "/tmp/opendal/redb",\n}\n\nop = opendal.Operator("redb", **config)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/381c04e3.46eeea24.js b/assets/js/381c04e3.fb6cc6ba.js similarity index 84% rename from assets/js/381c04e3.46eeea24.js rename to assets/js/381c04e3.fb6cc6ba.js index 063b07de2d9f..4df6af05748f 100644 --- a/assets/js/381c04e3.46eeea24.js +++ b/assets/js/381c04e3.fb6cc6ba.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1725],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>b});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),c=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||i;return n?a.createElement(b,l(l({ref:t},u),{},{components:n})):a.createElement(b,l({ref:t},u))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:r,l[1]=s;for(var c=2;c{n.d(t,{Z:()=>l});var a=n(9496),r=n(5924);const i={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:n,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,l),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),i=n(5924),l=n(3053),s=n(3442),o=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,o._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=d(e),[l,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[o,c]=b({queryString:n,groupId:a}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),k=(()=>{const e=o??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);s(e),c(e),f(e)}),[c,f,i]),tabValues:i}}var k=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function g(e){let{className:t,block:n,selectedValue:s,selectValue:o,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==s&&(p(t),o(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:l}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},l,{className:(0,i.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":s===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=f(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",h.tabList)},r.createElement(g,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(y,(0,a.Z)({key:String(t)},e))}},9082:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var a=n(8126),r=(n(9496),n(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},l="wrapper";function s(e){let{components:t,...n}=e;return(0,r.kt)(l,(0,a.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string of mongodb server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"database"),": Set the database of mongodb"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the bucket of mongodb gridfs"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"chunk_size"),": Set the chunk size of mongodb gridfs")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Gridfs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Gridfs::default();\n builder.root("/");\n builder.connection_string("mongodb://myUser:myPassword@localhost:27017/myAuthDB");\n builder.database("your_database");\n builder.bucket("your_bucket");\n // The chunk size in bytes used to break the user file into chunks.\n builder.chunk_size(255);\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}s.isMDXComponent=!0;var o=n(8750),c=n(5810);const u={title:"Gridfs"},p=void 0,d={unversionedId:"services/gridfs",id:"services/gridfs",title:"Gridfs",description:"Gridfs services support.",source:"@site/docs/services/gridfs.mdx",sourceDirName:"services",slug:"/services/gridfs",permalink:"/docs/services/gridfs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/gridfs.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Gridfs"},sidebar:"docs",previous:{title:"GHAC",permalink:"/docs/services/ghac"},next:{title:"HDFS",permalink:"/docs/services/hdfs"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(k,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.mongodb.com/docs/manual/core/gridfs/"},"Gridfs")," services support."),(0,r.kt)(s,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("connection_string".to_string(), "connection_string".to_string());\n map.insert("database".to_string(), "database".to_string());\n map.insert("bucket".to_string(), "bucket".to_string());\n let op: Operator = Operator::via_map(Scheme::Gridfs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const config = {\n connection_string: "connection_string",\n database: "database",\n bucket: "bucket",\n };\n const op = new Operator("gridfs", config);\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nconfig = {\n "connection_string": "connection_string",\n "database": "database",\n "bucket": "bucket",\n}\n\nop = opendal.Operator("gridfs", **config)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1725],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>b});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),c=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||i;return n?a.createElement(b,l(l({ref:t},u),{},{components:n})):a.createElement(b,l({ref:t},u))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:r,l[1]=s;for(var c=2;c{n.d(t,{Z:()=>l});var a=n(9496),r=n(5924);const i={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:n,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,l),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),i=n(5924),l=n(3053),s=n(3442),o=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,o._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=d(e),[l,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[o,c]=b({queryString:n,groupId:a}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),k=(()=>{const e=o??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);s(e),c(e),f(e)}),[c,f,i]),tabValues:i}}var k=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function g(e){let{className:t,block:n,selectedValue:s,selectValue:o,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==s&&(p(t),o(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:l}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},l,{className:(0,i.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":s===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=f(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",h.tabList)},r.createElement(g,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(y,(0,a.Z)({key:String(t)},e))}},9082:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var a=n(8126),r=(n(9496),n(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},l="wrapper";function s(e){let{components:t,...n}=e;return(0,r.kt)(l,(0,a.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string of mongodb server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"database"),": Set the database of mongodb"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the bucket of mongodb gridfs"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"chunk_size"),": Set the chunk size of mongodb gridfs")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Gridfs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Gridfs::default();\n builder.root("/");\n builder.connection_string("mongodb://myUser:myPassword@localhost:27017/myAuthDB");\n builder.database("your_database");\n builder.bucket("your_bucket");\n // The chunk size in bytes used to break the user file into chunks.\n builder.chunk_size(255);\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}s.isMDXComponent=!0;var o=n(8750),c=n(5810);const u={title:"Gridfs"},p=void 0,d={unversionedId:"services/gridfs",id:"services/gridfs",title:"Gridfs",description:"Gridfs services support.",source:"@site/docs/services/gridfs.mdx",sourceDirName:"services",slug:"/services/gridfs",permalink:"/docs/services/gridfs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/gridfs.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Gridfs"},sidebar:"docs",previous:{title:"GHAC",permalink:"/docs/services/ghac"},next:{title:"HDFS",permalink:"/docs/services/hdfs"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(k,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.mongodb.com/docs/manual/core/gridfs/"},"Gridfs")," services support."),(0,r.kt)(s,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("connection_string".to_string(), "connection_string".to_string());\n map.insert("database".to_string(), "database".to_string());\n map.insert("bucket".to_string(), "bucket".to_string());\n let op: Operator = Operator::via_map(Scheme::Gridfs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const config = {\n connection_string: "connection_string",\n database: "database",\n bucket: "bucket",\n };\n const op = new Operator("gridfs", config);\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nconfig = {\n "connection_string": "connection_string",\n "database": "database",\n "bucket": "bucket",\n}\n\nop = opendal.Operator("gridfs", **config)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/39a95de5.a9638d17.js b/assets/js/39a95de5.ec02f38b.js similarity index 83% rename from assets/js/39a95de5.a9638d17.js rename to assets/js/39a95de5.ec02f38b.js index 8d81b1b3992c..4dcc018d6192 100644 --- a/assets/js/39a95de5.a9638d17.js +++ b/assets/js/39a95de5.ec02f38b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5737],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,f=p["".concat(s,".").concat(m)]||p[m]||d[m]||i;return n?a.createElement(f,o(o({ref:t},u),{},{components:n})):a.createElement(f,o({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,o[1]=l;for(var c=2;c{n.d(t,{Z:()=>o});var a=n(9496),r=n(5924);const i={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,o),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(8126),r=n(9496),i=n(5924),o=n(3053),l=n(3442),s=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,l.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function k(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=d(e),[o,l]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[s,c]=f({queryString:n,groupId:a}),[p,k]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),b=(()=>{const e=s??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{b&&l(b)}),[b]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),k(e)}),[c,k,i]),tabValues:i}}var b=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:n,selectedValue:l,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==l&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:l===t?0:-1,"aria-selected":l===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},o,{className:(0,i.Z)("tabs__item",h.tabItem,o?.className,{"tabs__item--active":l===t})}),n??t)})))}function y(e){let{lazy:t,children:n,selectedValue:a}=e;const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",h.tabList)},r.createElement(v,(0,a.Z)({},e,t)),r.createElement(y,(0,a.Z)({},e,t)))}function w(e){const t=(0,b.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},2994:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>f});var a=n(8126),r=(n(9496),n(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configurations",id:"configurations",level:2},{value:"Examples",id:"examples",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function l(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This service will visit the ",(0,r.kt)("a",{parentName:"p",href:"https://docs.openstack.org/api-ref/object-store/"},"Swift API")," supported by ",(0,r.kt)("a",{parentName:"p",href:"https://docs.openstack.org/swift/latest/"},"OpenStack Object Storage"),"."),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"rename")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configurations"},"Configurations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_name"),": Name of Swift account."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"container"),": Swift container."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token"),": Swift personal access token.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"SwiftBuilder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"examples"},"Examples"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Swift;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create Swift backend builder\n let mut builder = Swift::default();\n \n // Set the root for swift, all operations will happen under this root\n builder.root("/path/to/dir");\n // set the endpoint of Swift backend\n builder.endpoint("https://openstack-controller.example.com:8080");\n // set the account name of Swift workspace\n builder.account_name("account");\n // set the container name of Swift workspace\n builder.container("container");\n // set the auth token for builder\n builder.token("token");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}l.isMDXComponent=!0;var s=n(8750),c=n(5810);const u={title:"Swift"},p=void 0,d={unversionedId:"services/swift",id:"services/swift",title:"Swift",description:"OpenStack Swift service support.",source:"@site/docs/services/swift.mdx",sourceDirName:"services",slug:"/services/swift",permalink:"/docs/services/swift",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/swift.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Swift"},sidebar:"docs",previous:{title:"Supabase",permalink:"/docs/services/supabase"},next:{title:"TiKV",permalink:"/docs/services/tikv"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],k={toc:f},b="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(b,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://docs.openstack.org/api-ref/object-store/"},"OpenStack Swift")," service support."),(0,r.kt)(l,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "http://127.0.0.1:8080".to_string());\n map.insert("account".to_string(), "test_account".to_string());\n map.insert("container".to_string(), "test_container".to_string());\n map.insert("token".to_string(), "test_token".to_string());\n map.insert("root".to_string(), "/".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Swift, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("swift", {\n endpoint: "http://127.0.0.1:8080",\n account: "test_account",\n container: "test_container",\n token: "test_token",\n root: "/",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("swift",\n endpoint="http://127.0.0.1:8080"\n account="test_account",\n container="test_container",\n token="test_token",\n root="/",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5737],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,f=p["".concat(s,".").concat(m)]||p[m]||d[m]||i;return n?a.createElement(f,o(o({ref:t},u),{},{components:n})):a.createElement(f,o({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,o[1]=l;for(var c=2;c{n.d(t,{Z:()=>o});var a=n(9496),r=n(5924);const i={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,o),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(8126),r=n(9496),i=n(5924),o=n(3053),l=n(3442),s=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,l.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function k(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=d(e),[o,l]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[s,c]=f({queryString:n,groupId:a}),[p,k]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),b=(()=>{const e=s??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{b&&l(b)}),[b]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),k(e)}),[c,k,i]),tabValues:i}}var b=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:n,selectedValue:l,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==l&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:l===t?0:-1,"aria-selected":l===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},o,{className:(0,i.Z)("tabs__item",h.tabItem,o?.className,{"tabs__item--active":l===t})}),n??t)})))}function y(e){let{lazy:t,children:n,selectedValue:a}=e;const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",h.tabList)},r.createElement(v,(0,a.Z)({},e,t)),r.createElement(y,(0,a.Z)({},e,t)))}function w(e){const t=(0,b.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},2994:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>f});var a=n(8126),r=(n(9496),n(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configurations",id:"configurations",level:2},{value:"Examples",id:"examples",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function l(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This service will visit the ",(0,r.kt)("a",{parentName:"p",href:"https://docs.openstack.org/api-ref/object-store/"},"Swift API")," supported by ",(0,r.kt)("a",{parentName:"p",href:"https://docs.openstack.org/swift/latest/"},"OpenStack Object Storage"),"."),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"rename")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configurations"},"Configurations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_name"),": Name of Swift account."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"container"),": Swift container."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token"),": Swift personal access token.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"SwiftBuilder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"examples"},"Examples"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Swift;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create Swift backend builder\n let mut builder = Swift::default();\n \n // Set the root for swift, all operations will happen under this root\n builder.root("/path/to/dir");\n // set the endpoint of Swift backend\n builder.endpoint("https://openstack-controller.example.com:8080");\n // set the account name of Swift workspace\n builder.account_name("account");\n // set the container name of Swift workspace\n builder.container("container");\n // set the auth token for builder\n builder.token("token");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}l.isMDXComponent=!0;var s=n(8750),c=n(5810);const u={title:"Swift"},p=void 0,d={unversionedId:"services/swift",id:"services/swift",title:"Swift",description:"OpenStack Swift service support.",source:"@site/docs/services/swift.mdx",sourceDirName:"services",slug:"/services/swift",permalink:"/docs/services/swift",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/swift.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Swift"},sidebar:"docs",previous:{title:"Supabase",permalink:"/docs/services/supabase"},next:{title:"TiKV",permalink:"/docs/services/tikv"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],k={toc:f},b="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(b,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://docs.openstack.org/api-ref/object-store/"},"OpenStack Swift")," service support."),(0,r.kt)(l,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "http://127.0.0.1:8080".to_string());\n map.insert("account".to_string(), "test_account".to_string());\n map.insert("container".to_string(), "test_container".to_string());\n map.insert("token".to_string(), "test_token".to_string());\n map.insert("root".to_string(), "/".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Swift, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("swift", {\n endpoint: "http://127.0.0.1:8080",\n account: "test_account",\n container: "test_container",\n token: "test_token",\n root: "/",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("swift",\n endpoint="http://127.0.0.1:8080"\n account="test_account",\n container="test_container",\n token="test_token",\n root="/",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/42347498.a32a7c70.js b/assets/js/42347498.27faf4e2.js similarity index 85% rename from assets/js/42347498.a32a7c70.js rename to assets/js/42347498.27faf4e2.js index 14d3b79e66a8..63e635dfe339 100644 --- a/assets/js/42347498.a32a7c70.js +++ b/assets/js/42347498.27faf4e2.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[7254],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>f});var r=a(9496);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),o=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=o(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,c=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=o(a),m=n,f=p["".concat(c,".").concat(m)]||p[m]||d[m]||l;return a?r.createElement(f,i(i({ref:t},u),{},{components:a})):r.createElement(f,i({ref:t},u))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,i=new Array(l);i[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:n,i[1]=s;for(var o=2;o{a.d(t,{Z:()=>i});var r=a(9496),n=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return r.createElement("div",{role:"tabpanel",className:(0,n.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var r=a(8126),n=a(9496),l=a(5924),i=a(3053),s=a(3442),c=a(9356),o=a(4634),u=a(6038);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:r,default:n}}=e;return{value:t,label:a,attributes:r,default:n}}))}function d(e){const{values:t,children:a}=e;return(0,n.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,o.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const r=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,c._X)(l),(0,n.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:r}=e,l=d(e),[i,s]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=a.find((e=>e.default))??a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[c,o]=f({queryString:a,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,u.Nk)(a);return[r,(0,n.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:r}),k=(()=>{const e=c??p;return m({value:e,tabValues:l})?e:null})();(0,n.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:i,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);s(e),o(e),b(e)}),[o,b,l]),tabValues:l}}var k=a(5667);const v={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:a,selectedValue:s,selectValue:c,tabValues:o}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),r=o[a].value;r!==s&&(p(t),c(r))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},o.map((e=>{let{value:t,label:a,attributes:i}=e;return n.createElement("li",(0,r.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",v.tabItem,i?.className,{"tabs__item--active":s===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:r}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function g(e){const t=b(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",v.tabList)},n.createElement(h,(0,r.Z)({},e,t)),n.createElement(y,(0,r.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return n.createElement(g,(0,r.Z)({key:String(t)},e))}},8854:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>v,frontMatter:()=>u,metadata:()=>d,toc:()=>f});var r=a(8126),n=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function s(e){let{components:t,...a}=e;return(0,n.kt)(i,(0,r.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"copy")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"rename")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"list")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"scan")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"presign")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,n.kt)("h2",{id:"configuration"},"Configuration"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"access_token"),": set the access_token for Rest API")),(0,n.kt)("p",null,"You can refer to ","[",(0,n.kt)("inlineCode",{parentName:"p"},"VercelArtifactsBuilder"),"]","'s docs for more information"),(0,n.kt)("h2",{id:"example"},"Example"),(0,n.kt)("h3",{id:"via-builder"},"Via Builder"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-no_run"},'use anyhow::Result;\nuse opendal::services::VercelArtifacts;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = VercelArtifacts::default();\n\n builder.access_token("xxx");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}s.isMDXComponent=!0;var c=a(8750),o=a(5810);const u={title:"Vercel Artifacts"},p=void 0,d={unversionedId:"services/vercel_artifacts",id:"services/vercel_artifacts",title:"Vercel Artifacts",description:"Vercel Cache service support.",source:"@site/docs/services/vercel_artifacts.mdx",sourceDirName:"services",slug:"/services/vercel_artifacts",permalink:"/docs/services/vercel_artifacts",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/vercel_artifacts.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Vercel Artifacts"},sidebar:"docs",previous:{title:"TiKV",permalink:"/docs/services/tikv"},next:{title:"WebDAV",permalink:"/docs/services/webdav"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function v(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://vercel.com/docs/concepts/monorepos/remote-caching"},"Vercel Cache")," service support."),(0,n.kt)(s,{components:a.components,mdxType:"Docs"}),(0,n.kt)("h3",{id:"via-config"},"Via Config"),(0,n.kt)(c.Z,{mdxType:"Tabs"},(0,n.kt)(o.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("access_token".to_string(), "your_access_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::VercelArtifacts, map)?;\n Ok(())\n}\n'))),(0,n.kt)(o.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("vercel_artifacts", {\n access_token: "your_access_token",\n });\n}\n'))),(0,n.kt)(o.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("vercel_artifacts",\n access_token="your_access_token",\n)\n')))))}v.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[7254],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>f});var r=a(9496);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),o=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=o(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,c=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=o(a),m=n,f=p["".concat(c,".").concat(m)]||p[m]||d[m]||l;return a?r.createElement(f,i(i({ref:t},u),{},{components:a})):r.createElement(f,i({ref:t},u))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,i=new Array(l);i[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:n,i[1]=s;for(var o=2;o{a.d(t,{Z:()=>i});var r=a(9496),n=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return r.createElement("div",{role:"tabpanel",className:(0,n.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var r=a(8126),n=a(9496),l=a(5924),i=a(3053),s=a(3442),c=a(9356),o=a(4634),u=a(6038);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:r,default:n}}=e;return{value:t,label:a,attributes:r,default:n}}))}function d(e){const{values:t,children:a}=e;return(0,n.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,o.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const r=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,c._X)(l),(0,n.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:r}=e,l=d(e),[i,s]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=a.find((e=>e.default))??a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[c,o]=f({queryString:a,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,u.Nk)(a);return[r,(0,n.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:r}),k=(()=>{const e=c??p;return m({value:e,tabValues:l})?e:null})();(0,n.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:i,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);s(e),o(e),b(e)}),[o,b,l]),tabValues:l}}var k=a(5667);const v={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:a,selectedValue:s,selectValue:c,tabValues:o}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),r=o[a].value;r!==s&&(p(t),c(r))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},o.map((e=>{let{value:t,label:a,attributes:i}=e;return n.createElement("li",(0,r.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",v.tabItem,i?.className,{"tabs__item--active":s===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:r}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function g(e){const t=b(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",v.tabList)},n.createElement(h,(0,r.Z)({},e,t)),n.createElement(y,(0,r.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return n.createElement(g,(0,r.Z)({key:String(t)},e))}},8854:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>v,frontMatter:()=>u,metadata:()=>d,toc:()=>f});var r=a(8126),n=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function s(e){let{components:t,...a}=e;return(0,n.kt)(i,(0,r.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"copy")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"rename")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"list")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"scan")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"presign")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,n.kt)("h2",{id:"configuration"},"Configuration"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"access_token"),": set the access_token for Rest API")),(0,n.kt)("p",null,"You can refer to ","[",(0,n.kt)("inlineCode",{parentName:"p"},"VercelArtifactsBuilder"),"]","'s docs for more information"),(0,n.kt)("h2",{id:"example"},"Example"),(0,n.kt)("h3",{id:"via-builder"},"Via Builder"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-no_run"},'use anyhow::Result;\nuse opendal::services::VercelArtifacts;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = VercelArtifacts::default();\n\n builder.access_token("xxx");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}s.isMDXComponent=!0;var c=a(8750),o=a(5810);const u={title:"Vercel Artifacts"},p=void 0,d={unversionedId:"services/vercel_artifacts",id:"services/vercel_artifacts",title:"Vercel Artifacts",description:"Vercel Cache service support.",source:"@site/docs/services/vercel_artifacts.mdx",sourceDirName:"services",slug:"/services/vercel_artifacts",permalink:"/docs/services/vercel_artifacts",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/vercel_artifacts.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Vercel Artifacts"},sidebar:"docs",previous:{title:"TiKV",permalink:"/docs/services/tikv"},next:{title:"WebDAV",permalink:"/docs/services/webdav"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function v(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://vercel.com/docs/concepts/monorepos/remote-caching"},"Vercel Cache")," service support."),(0,n.kt)(s,{components:a.components,mdxType:"Docs"}),(0,n.kt)("h3",{id:"via-config"},"Via Config"),(0,n.kt)(c.Z,{mdxType:"Tabs"},(0,n.kt)(o.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("access_token".to_string(), "your_access_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::VercelArtifacts, map)?;\n Ok(())\n}\n'))),(0,n.kt)(o.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("vercel_artifacts", {\n access_token: "your_access_token",\n });\n}\n'))),(0,n.kt)(o.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("vercel_artifacts",\n access_token="your_access_token",\n)\n')))))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/434bbc94.e749da08.js b/assets/js/434bbc94.7f039215.js similarity index 85% rename from assets/js/434bbc94.e749da08.js rename to assets/js/434bbc94.7f039215.js index 4856176c7a4c..eee96a7de601 100644 --- a/assets/js/434bbc94.e749da08.js +++ b/assets/js/434bbc94.7f039215.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1163],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),u=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},c),{},{components:a})):n.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),s=a(3442),o=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,o._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[o,u]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:s,selectValue:o,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==s&&(p(t),o(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":s===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},4482:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function s(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"datadir"),": Set the path to the sled data directory")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"SledBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Sled;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Sled::default();\n builder.datadir("/tmp/opendal/sled");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}s.isMDXComponent=!0;var o=a(8750),u=a(5810);const c={title:"Sled"},p=void 0,d={unversionedId:"services/sled",id:"services/sled",title:"Sled",description:"Sled service support.",source:"@site/docs/services/sled.mdx",sourceDirName:"services",slug:"/services/sled",permalink:"/docs/services/sled",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/sled.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Sled"},sidebar:"docs",previous:{title:"SFTP",permalink:"/docs/services/sftp"},next:{title:"Sqlite",permalink:"/docs/services/sqlite"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Sled service support."),(0,r.kt)(s,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("datadir".to_string(), "/tmp/opendal/sled".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Sled, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("sled", {\n datadir: "/tmp/opendal/sled",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("sled",\n datadir="/tmp/opendal/sled",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1163],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),u=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},c),{},{components:a})):n.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),s=a(3442),o=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,o._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[o,u]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:s,selectValue:o,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==s&&(p(t),o(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":s===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},4482:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function s(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"datadir"),": Set the path to the sled data directory")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"SledBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Sled;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Sled::default();\n builder.datadir("/tmp/opendal/sled");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}s.isMDXComponent=!0;var o=a(8750),u=a(5810);const c={title:"Sled"},p=void 0,d={unversionedId:"services/sled",id:"services/sled",title:"Sled",description:"Sled service support.",source:"@site/docs/services/sled.mdx",sourceDirName:"services",slug:"/services/sled",permalink:"/docs/services/sled",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/sled.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Sled"},sidebar:"docs",previous:{title:"SFTP",permalink:"/docs/services/sftp"},next:{title:"Sqlite",permalink:"/docs/services/sqlite"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Sled service support."),(0,r.kt)(s,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("datadir".to_string(), "/tmp/opendal/sled".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Sled, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("sled", {\n datadir: "/tmp/opendal/sled",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("sled",\n datadir="/tmp/opendal/sled",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4e2d8f56.349778ec.js b/assets/js/4e2d8f56.6a3a99d1.js similarity index 83% rename from assets/js/4e2d8f56.349778ec.js rename to assets/js/4e2d8f56.6a3a99d1.js index d2b5e6484d8d..8eb1e0b7791c 100644 --- a/assets/js/4e2d8f56.349778ec.js +++ b/assets/js/4e2d8f56.6a3a99d1.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[6752],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},c),{},{components:a})):n.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=a(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",y.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function h(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(h,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},3944:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string of sqlite database"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"table"),": Set the table of sqlite"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of sqlite"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of sqlite")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Sqlite;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Sqlite::default();\n builder.root("/");\n builder.connection_string("file//abc.db");\n builder.table("your_table");\n // key field type in the table should be compatible with Rust\'s &str like text\n builder.key_field("key");\n // value field type in the table should be compatible with Rust\'s Vec like bytea\n builder.value_field("value");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"Sqlite"},p=void 0,d={unversionedId:"services/sqlite",id:"services/sqlite",title:"Sqlite",description:"Sqlite services support.",source:"@site/docs/services/sqlite.mdx",sourceDirName:"services",slug:"/services/sqlite",permalink:"/docs/services/sqlite",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/sqlite.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Sqlite"},sidebar:"docs",previous:{title:"Sled",permalink:"/docs/services/sled"},next:{title:"Supabase",permalink:"/docs/services/supabase"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function y(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.sqlite.org/"},"Sqlite")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Sqlite;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("connection_string".to_string(), "file//abc.db".to_string());\n map.insert("table".to_string(), "your_table".to_string());\n map.insert("key_field".to_string(), "your_key_field".to_string());\n map.insert("value_field".to_string(), "your_value_field".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Sqlite, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"sqlite\", {\n connection_string: 'file//abc.db',\n table: 'your_table',\n key_field: 'your_key_field',\n value_field: 'your_value_field',\n });\n}\n"))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("sqlite", {\n "connection_string": "file//abc.db",\n "table": "your_table",\n "key_field": "your_key_field",\n "value_field": "your_value_field",\n})\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[6752],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},c),{},{components:a})):n.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=a(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",y.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function h(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(h,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},3944:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string of sqlite database"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"table"),": Set the table of sqlite"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of sqlite"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of sqlite")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Sqlite;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Sqlite::default();\n builder.root("/");\n builder.connection_string("file//abc.db");\n builder.table("your_table");\n // key field type in the table should be compatible with Rust\'s &str like text\n builder.key_field("key");\n // value field type in the table should be compatible with Rust\'s Vec like bytea\n builder.value_field("value");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"Sqlite"},p=void 0,d={unversionedId:"services/sqlite",id:"services/sqlite",title:"Sqlite",description:"Sqlite services support.",source:"@site/docs/services/sqlite.mdx",sourceDirName:"services",slug:"/services/sqlite",permalink:"/docs/services/sqlite",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/sqlite.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Sqlite"},sidebar:"docs",previous:{title:"Sled",permalink:"/docs/services/sled"},next:{title:"Supabase",permalink:"/docs/services/supabase"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function y(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.sqlite.org/"},"Sqlite")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Sqlite;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("connection_string".to_string(), "file//abc.db".to_string());\n map.insert("table".to_string(), "your_table".to_string());\n map.insert("key_field".to_string(), "your_key_field".to_string());\n map.insert("value_field".to_string(), "your_value_field".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Sqlite, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"sqlite\", {\n connection_string: 'file//abc.db',\n table: 'your_table',\n key_field: 'your_key_field',\n value_field: 'your_value_field',\n });\n}\n"))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("sqlite", {\n "connection_string": "file//abc.db",\n "table": "your_table",\n "key_field": "your_key_field",\n "value_field": "your_value_field",\n})\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/500d55cb.6f07c671.js b/assets/js/500d55cb.853d6c8d.js similarity index 80% rename from assets/js/500d55cb.6f07c671.js rename to assets/js/500d55cb.853d6c8d.js index e83e9ae483b0..be935789edcc 100644 --- a/assets/js/500d55cb.6f07c671.js +++ b/assets/js/500d55cb.853d6c8d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[7489],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var r=a(9496);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=r.createContext({}),u=function(e){var t=r.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return r.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(a),m=n,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return a?r.createElement(b,i(i({ref:t},c),{},{components:a})):r.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,i=new Array(l);i[0]=m;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:n,i[1]=s;for(var u=2;u{a.d(t,{Z:()=>i});var r=a(9496),n=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return r.createElement("div",{role:"tabpanel",className:(0,n.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var r=a(8126),n=a(9496),l=a(5924),i=a(3053),s=a(3442),o=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:r,default:n}}=e;return{value:t,label:a,attributes:r,default:n}}))}function d(e){const{values:t,children:a}=e;return(0,n.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const r=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,o._X)(l),(0,n.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:r}=e,l=d(e),[i,s]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=a.find((e=>e.default))??a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[o,u]=b({queryString:a,groupId:r}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(a);return[r,(0,n.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:r}),k=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,n.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:i,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=a(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:s,selectValue:o,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),r=u[a].value;r!==s&&(p(t),o(r))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return n.createElement("li",(0,r.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",y.tabItem,i?.className,{"tabs__item--active":s===t})}),a??t)})))}function g(e){let{lazy:t,children:a,selectedValue:r}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function h(e){const t=f(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},n.createElement(v,(0,r.Z)({},e,t)),n.createElement(g,(0,r.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return n.createElement(h,(0,r.Z)({key:String(t)},e))}},48:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var r=a(8126),n=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function s(e){let{components:t,...a}=e;return(0,n.kt)(i,(0,r.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"list")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"presign")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,n.kt)("h2",{id:"configuration"},"Configuration"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,n.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string of postgres server"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"table"),": Set the table of postgresql"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of postgresql"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of postgresql")),(0,n.kt)("h2",{id:"example"},"Example"),(0,n.kt)("h3",{id:"via-builder"},"Via Builder"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Postgresql;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Postgresql::default();\n builder.root("/");\n builder.connection_string("postgresql://you_username:your_password@127.0.0.1:5432/your_database");\n builder.table("your_table");\n // key field type in the table should be compatible with Rust\'s &str like text\n builder.key_field("key");\n // value field type in the table should be compatible with Rust\'s Vec like bytea\n builder.value_field("value");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}s.isMDXComponent=!0;var o=a(8750),u=a(5810);const c={title:"PostgreSQL"},p=void 0,d={unversionedId:"services/postgresql",id:"services/postgresql",title:"PostgreSQL",description:"PostgreSQL services support.",source:"@site/docs/services/postgresql.mdx",sourceDirName:"services",slug:"/services/postgresql",permalink:"/docs/services/postgresql",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/postgresql.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"PostgreSQL"},sidebar:"docs",previous:{title:"Persy",permalink:"/docs/services/persy"},next:{title:"Redb",permalink:"/docs/services/redb"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function y(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://www.postgresql.org/"},"PostgreSQL")," services support."),(0,n.kt)(s,{components:a.components,mdxType:"Docs"}),(0,n.kt)("h3",{id:"via-config"},"Via Config"),(0,n.kt)(o.Z,{mdxType:"Tabs"},(0,n.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Postgresql;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("connection_string".to_string(), "postgresql://you_username:your_password@127.0.0.1:5432/your_database".to_string());\n map.insert("table".to_string(), "your_table".to_string());\n map.insert("key_field".to_string(), "your_key_field".to_string());\n map.insert("value_field".to_string(), "your_value_field".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Postgresql, map)?;\n Ok(())\n}\n'))),(0,n.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"postgresql\", {\n connection_string: 'postgresql://you_username:your_password@127.0.0.1:5432/your_database',\n table: 'your_table',\n key_field: 'your_key_field',\n value_field: 'your_value_field',\n });\n}\n"))),(0,n.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("postgresql", {\n "connection_string": "postgresql://you_username:your_password@127.0.0.1:5432/your_database",\n "table": "your_table",\n "key_field": "your_key_field",\n "value_field": "your_value_field",\n})\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[7489],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var r=a(9496);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=r.createContext({}),u=function(e){var t=r.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return r.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(a),m=n,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return a?r.createElement(b,i(i({ref:t},c),{},{components:a})):r.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,i=new Array(l);i[0]=m;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:n,i[1]=s;for(var u=2;u{a.d(t,{Z:()=>i});var r=a(9496),n=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return r.createElement("div",{role:"tabpanel",className:(0,n.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var r=a(8126),n=a(9496),l=a(5924),i=a(3053),s=a(3442),o=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:r,default:n}}=e;return{value:t,label:a,attributes:r,default:n}}))}function d(e){const{values:t,children:a}=e;return(0,n.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const r=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,o._X)(l),(0,n.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:r}=e,l=d(e),[i,s]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=a.find((e=>e.default))??a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[o,u]=b({queryString:a,groupId:r}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(a);return[r,(0,n.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:r}),k=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,n.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:i,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=a(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function g(e){let{className:t,block:a,selectedValue:s,selectValue:o,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),r=u[a].value;r!==s&&(p(t),o(r))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return n.createElement("li",(0,r.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",y.tabItem,i?.className,{"tabs__item--active":s===t})}),a??t)})))}function v(e){let{lazy:t,children:a,selectedValue:r}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function h(e){const t=f(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},n.createElement(g,(0,r.Z)({},e,t)),n.createElement(v,(0,r.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return n.createElement(h,(0,r.Z)({key:String(t)},e))}},48:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var r=a(8126),n=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function s(e){let{components:t,...a}=e;return(0,n.kt)(i,(0,r.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"list")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,n.kt)("del",{parentName:"li"},"presign")),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,n.kt)("h2",{id:"configuration"},"Configuration"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,n.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string of postgres server"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"table"),": Set the table of postgresql"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of postgresql"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of postgresql")),(0,n.kt)("h2",{id:"example"},"Example"),(0,n.kt)("h3",{id:"via-builder"},"Via Builder"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Postgresql;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Postgresql::default();\n builder.root("/");\n builder.connection_string("postgresql://you_username:your_password@127.0.0.1:5432/your_database");\n builder.table("your_table");\n // key field type in the table should be compatible with Rust\'s &str like text\n builder.key_field("key");\n // value field type in the table should be compatible with Rust\'s Vec like bytea\n builder.value_field("value");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}s.isMDXComponent=!0;var o=a(8750),u=a(5810);const c={title:"PostgreSQL"},p=void 0,d={unversionedId:"services/postgresql",id:"services/postgresql",title:"PostgreSQL",description:"PostgreSQL services support.",source:"@site/docs/services/postgresql.mdx",sourceDirName:"services",slug:"/services/postgresql",permalink:"/docs/services/postgresql",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/postgresql.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"PostgreSQL"},sidebar:"docs",previous:{title:"Persy",permalink:"/docs/services/persy"},next:{title:"Redb",permalink:"/docs/services/redb"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function y(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://www.postgresql.org/"},"PostgreSQL")," services support."),(0,n.kt)(s,{components:a.components,mdxType:"Docs"}),(0,n.kt)("h3",{id:"via-config"},"Via Config"),(0,n.kt)(o.Z,{mdxType:"Tabs"},(0,n.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Postgresql;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("connection_string".to_string(), "postgresql://you_username:your_password@127.0.0.1:5432/your_database".to_string());\n map.insert("table".to_string(), "your_table".to_string());\n map.insert("key_field".to_string(), "your_key_field".to_string());\n map.insert("value_field".to_string(), "your_value_field".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Postgresql, map)?;\n Ok(())\n}\n'))),(0,n.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"postgresql\", {\n connection_string: 'postgresql://you_username:your_password@127.0.0.1:5432/your_database',\n table: 'your_table',\n key_field: 'your_key_field',\n value_field: 'your_value_field',\n });\n}\n"))),(0,n.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("postgresql", {\n "connection_string": "postgresql://you_username:your_password@127.0.0.1:5432/your_database",\n "table": "your_table",\n "key_field": "your_key_field",\n "value_field": "your_value_field",\n})\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/57a16c1d.53fcfb13.js b/assets/js/57a16c1d.c1c4598c.js similarity index 80% rename from assets/js/57a16c1d.53fcfb13.js rename to assets/js/57a16c1d.c1c4598c.js index c447da72dd53..b90b43b81da9 100644 --- a/assets/js/57a16c1d.53fcfb13.js +++ b/assets/js/57a16c1d.c1c4598c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[7757],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>b});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(b,o(o({ref:t},u),{},{components:n})):a.createElement(b,o({ref:t},u))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var c=2;c{n.d(t,{Z:()=>o});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),o=n(3053),i=n(3442),s=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function k(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:n,groupId:a}),[p,k]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),h=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{h&&i(h)}),[h]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),k(e)}),[c,k,l]),tabValues:l}}var h=n(5667);const f={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==i&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",f.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function y(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",f.tabList)},r.createElement(v,(0,a.Z)({},e,t)),r.createElement(y,(0,a.Z)({},e,t)))}function N(e){const t=(0,h.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},7727:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>f,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Examples",id:"examples",level:2},{value:"Start local blob service",id:"start-local-blob-service",level:3},{value:"Init OpenDAL Operator",id:"init-opendal-operator",level:3},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","append"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"container"),": Set the container name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_name"),": Set the account_name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_key"),": Set the account_key for backend.")),(0,r.kt)("p",null,"Refer to public API docs for more information."),(0,r.kt)("h2",{id:"examples"},"Examples"),(0,r.kt)("p",null,"This example works on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/Azure/Azurite"},"Azurite")," for local developments."),(0,r.kt)("h3",{id:"start-local-blob-service"},"Start local blob service"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},'docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite\naz storage container create --name test --connection-string "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"\n')),(0,r.kt)("h3",{id:"init-opendal-operator"},"Init OpenDAL Operator"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Azblob;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create azblob backend builder.\n let mut builder = Azblob::default();\n // Set the root for azblob, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/path/to/dir");\n // Set the container name, this is required.\n builder.container("test");\n // Set the endpoint, this is required.\n //\n // For examples:\n // - "http://127.0.0.1:10000/devstoreaccount1"\n // - "https://accountname.blob.core.windows.net"\n builder.endpoint("http://127.0.0.1:10000/devstoreaccount1");\n // Set the account_name and account_key.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.account_name("devstoreaccount1");\n builder.account_key("Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==");\n\n // `Accessor` provides the low level APIs, we will use `Operator` normally.\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=n(8750),c=n(5810);const u={title:"Azblob"},p=void 0,d={unversionedId:"services/azblob",id:"services/azblob",title:"Azblob",description:"Azure Storage Blob services support.",source:"@site/docs/services/azblob.mdx",sourceDirName:"services",slug:"/services/azblob",permalink:"/docs/services/azblob",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/azblob.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Azblob"},sidebar:"docs",previous:{title:"AtomicServer",permalink:"/docs/services/atomicserver"},next:{title:"Azdls",permalink:"/docs/services/azdls"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},h="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(h,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Azure Storage Blob services support."),(0,r.kt)(i,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("container".to_string(), "test".to_string());\n map.insert("endpoint".to_string(), "http://127.0.0.1:10000/devstoreaccount1".to_string());\n map.insert("account_name".to_string(), "devstoreaccount1".to_string());\n map.insert("account_key".to_string(), "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Azblob, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("azblob", {\n root: "/path/to/dir",\n container: "test",\n endpoint: "http://127.0.0.1:10000/devstoreaccount1",\n account_name: "devstoreaccount1",\n account_key: "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("azblob",\n root="/path/to/dir",\n container="test",\n endpoint="http://127.0.0.1:10000/devstoreaccount1",\n account_name="devstoreaccount1",\n account_key="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==",\n)\n')))))}f.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[7757],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>b});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(b,o(o({ref:t},u),{},{components:n})):a.createElement(b,o({ref:t},u))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var c=2;c{n.d(t,{Z:()=>o});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),o=n(3053),i=n(3442),s=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function k(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:n,groupId:a}),[p,k]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),k(e)}),[c,k,l]),tabValues:l}}var f=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==i&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",h.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function y(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,a.Z)({},e,t)),r.createElement(y,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},7727:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Examples",id:"examples",level:2},{value:"Start local blob service",id:"start-local-blob-service",level:3},{value:"Init OpenDAL Operator",id:"init-opendal-operator",level:3},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","append"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"container"),": Set the container name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_name"),": Set the account_name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_key"),": Set the account_key for backend.")),(0,r.kt)("p",null,"Refer to public API docs for more information."),(0,r.kt)("h2",{id:"examples"},"Examples"),(0,r.kt)("p",null,"This example works on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/Azure/Azurite"},"Azurite")," for local developments."),(0,r.kt)("h3",{id:"start-local-blob-service"},"Start local blob service"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},'docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite\naz storage container create --name test --connection-string "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"\n')),(0,r.kt)("h3",{id:"init-opendal-operator"},"Init OpenDAL Operator"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Azblob;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create azblob backend builder.\n let mut builder = Azblob::default();\n // Set the root for azblob, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/path/to/dir");\n // Set the container name, this is required.\n builder.container("test");\n // Set the endpoint, this is required.\n //\n // For examples:\n // - "http://127.0.0.1:10000/devstoreaccount1"\n // - "https://accountname.blob.core.windows.net"\n builder.endpoint("http://127.0.0.1:10000/devstoreaccount1");\n // Set the account_name and account_key.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.account_name("devstoreaccount1");\n builder.account_key("Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==");\n\n // `Accessor` provides the low level APIs, we will use `Operator` normally.\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=n(8750),c=n(5810);const u={title:"Azblob"},p=void 0,d={unversionedId:"services/azblob",id:"services/azblob",title:"Azblob",description:"Azure Storage Blob services support.",source:"@site/docs/services/azblob.mdx",sourceDirName:"services",slug:"/services/azblob",permalink:"/docs/services/azblob",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/azblob.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Azblob"},sidebar:"docs",previous:{title:"AtomicServer",permalink:"/docs/services/atomicserver"},next:{title:"Azdls",permalink:"/docs/services/azdls"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Azure Storage Blob services support."),(0,r.kt)(i,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("container".to_string(), "test".to_string());\n map.insert("endpoint".to_string(), "http://127.0.0.1:10000/devstoreaccount1".to_string());\n map.insert("account_name".to_string(), "devstoreaccount1".to_string());\n map.insert("account_key".to_string(), "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Azblob, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("azblob", {\n root: "/path/to/dir",\n container: "test",\n endpoint: "http://127.0.0.1:10000/devstoreaccount1",\n account_name: "devstoreaccount1",\n account_key: "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("azblob",\n root="/path/to/dir",\n container="test",\n endpoint="http://127.0.0.1:10000/devstoreaccount1",\n account_name="devstoreaccount1",\n account_key="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/592d1076.0507ddd8.js b/assets/js/592d1076.ac92c2ff.js similarity index 83% rename from assets/js/592d1076.0507ddd8.js rename to assets/js/592d1076.ac92c2ff.js index 66c2e2fcf1e1..b619ea393526 100644 --- a/assets/js/592d1076.0507ddd8.js +++ b/assets/js/592d1076.ac92c2ff.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[990],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function g(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function v(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function y(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(g,(0,n.Z)({},e,t)),r.createElement(v,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(y,(0,n.Z)({key:String(t)},e))}},7266:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Customizable endpoint setting"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"credentials"),": Credential string for GCS OAuth2"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"predefined_acl"),": Predefined ACL for GCS"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"default_storage_class"),": Default storage class for GCS")),(0,r.kt)("p",null,"Refer to public API docs for more information."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Gcs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Gcs::default();\n\n // set the storage bucket for OpenDAL\n builder.bucket("test");\n // set the working directory root for GCS\n // all operations will happen within it\n builder.root("/path/to/dir");\n // set the credential of service account.\n builder.credential("service account credential");\n // set the predefined ACL for GCS\n builder.predefined_acl("publicRead");\n // set the default storage class for GCS\n builder.default_storage_class("STANDARD");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"Gcs"},p=void 0,d={unversionedId:"services/gcs",id:"services/gcs",title:"Gcs",description:"Google Cloud Storage Support",source:"@site/docs/services/gcs.mdx",sourceDirName:"services",slug:"/services/gcs",permalink:"/docs/services/gcs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/gcs.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Gcs"},sidebar:"docs",previous:{title:"FTP",permalink:"/docs/services/ftp"},next:{title:"Gdrive",permalink:"/docs/services/gdrive"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Google Cloud Storage Support"),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("bucket".to_string(), "test".to_string());\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("credential".to_string(), "authentication token".to_string());\n map.insert("predefined_acl".to_string(), "publicRead".to_string());\n map.insert("default_storage_class".to_string(), "STANDARD".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Gcs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("gcs", {\n bucket: "test",\n root: "/path/to/dir",\n credential: "authentication token",\n predefined_acl: "publicRead",\n default_storage_class: "STANDARD",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("gcs",\n bucket="test",\n root="/path/to/dir",\n credential="authentication token",\n predefined_acl="publicRead",\n default_storage_class="STANDARD",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[990],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function g(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function v(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function y(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(g,(0,n.Z)({},e,t)),r.createElement(v,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(y,(0,n.Z)({key:String(t)},e))}},7266:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Customizable endpoint setting"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"credentials"),": Credential string for GCS OAuth2"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"predefined_acl"),": Predefined ACL for GCS"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"default_storage_class"),": Default storage class for GCS")),(0,r.kt)("p",null,"Refer to public API docs for more information."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Gcs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Gcs::default();\n\n // set the storage bucket for OpenDAL\n builder.bucket("test");\n // set the working directory root for GCS\n // all operations will happen within it\n builder.root("/path/to/dir");\n // set the credential of service account.\n builder.credential("service account credential");\n // set the predefined ACL for GCS\n builder.predefined_acl("publicRead");\n // set the default storage class for GCS\n builder.default_storage_class("STANDARD");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"Gcs"},p=void 0,d={unversionedId:"services/gcs",id:"services/gcs",title:"Gcs",description:"Google Cloud Storage Support",source:"@site/docs/services/gcs.mdx",sourceDirName:"services",slug:"/services/gcs",permalink:"/docs/services/gcs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/gcs.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Gcs"},sidebar:"docs",previous:{title:"FTP",permalink:"/docs/services/ftp"},next:{title:"Gdrive",permalink:"/docs/services/gdrive"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Google Cloud Storage Support"),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("bucket".to_string(), "test".to_string());\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("credential".to_string(), "authentication token".to_string());\n map.insert("predefined_acl".to_string(), "publicRead".to_string());\n map.insert("default_storage_class".to_string(), "STANDARD".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Gcs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("gcs", {\n bucket: "test",\n root: "/path/to/dir",\n credential: "authentication token",\n predefined_acl: "publicRead",\n default_storage_class: "STANDARD",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("gcs",\n bucket="test",\n root="/path/to/dir",\n credential="authentication token",\n predefined_acl="publicRead",\n default_storage_class="STANDARD",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/621b831b.6c6e7519.js b/assets/js/621b831b.12eded49.js similarity index 84% rename from assets/js/621b831b.6c6e7519.js rename to assets/js/621b831b.12eded49.js index 3b33cb37eaf2..74632d357ed5 100644 --- a/assets/js/621b831b.6c6e7519.js +++ b/assets/js/621b831b.12eded49.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4551],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(k,o(o({ref:t},u),{},{components:n})):a.createElement(k,o({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var c=2;c{n.d(t,{Z:()=>o});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),o=n(3053),i=n(3442),s=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,c]=k({queryString:n,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),b(e)}),[c,b,l]),tabValues:l}}var f=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==i&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",h.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(y,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},9600:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Notes",id:"notes",level:2},{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"As known as ",(0,r.kt)("inlineCode",{parentName:"p"},"abfs"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"azdls")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"azdls"),"."),(0,r.kt)("p",null,"This service will visit the ",(0,r.kt)("a",{parentName:"p",href:"https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-abfs-driver"},"ABFS")," URI supported by ",(0,r.kt)("a",{parentName:"p",href:"https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction"},"Azure Data Lake Storage Gen2"),"."),(0,r.kt)("h2",{id:"notes"},"Notes"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"azdls")," is different from ",(0,r.kt)("inlineCode",{parentName:"p"},"azfile")," service which used to visit ",(0,r.kt)("a",{parentName:"p",href:"https://azure.microsoft.com/en-us/services/storage/files/"},"Azure File Storage"),"."),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"filesystem"),": Set the filesystem name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_name"),": Set the account_name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_key"),": Set the account_key for backend.")),(0,r.kt)("p",null,"Refer to public API docs for more information."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Azdls;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create azdls backend builder.\n let mut builder = Azdls::default();\n // Set the root for azdls, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/path/to/dir");\n // Set the filesystem name, this is required.\n builder.filesystem("test");\n // Set the endpoint, this is required.\n //\n // For examples:\n // - "https://accountname.dfs.core.windows.net"\n builder.endpoint("https://accountname.dfs.core.windows.net");\n // Set the account_name and account_key.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.account_name("account_name");\n builder.account_key("account_key");\n\n // `Accessor` provides the low level APIs, we will use `Operator` normally.\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=n(8750),c=n(5810);const u={title:"Azdls"},p=void 0,d={unversionedId:"services/azdls",id:"services/azdls",title:"Azdls",description:"Azure Data Lake Storage Gen2 Support.",source:"@site/docs/services/azdls.mdx",sourceDirName:"services",slug:"/services/azdls",permalink:"/docs/services/azdls",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/azdls.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Azdls"},sidebar:"docs",previous:{title:"Azblob",permalink:"/docs/services/azblob"},next:{title:"Cacache",permalink:"/docs/services/cacache"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},f="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Azure Data Lake Storage Gen2 Support."),(0,r.kt)(i,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("filesystem".to_string(), "test".to_string());\n map.insert("endpoint".to_string(), "https://accountname.dfs.core.windows.net".to_string());\n map.insert("account_name".to_string(), "account_name".to_string());\n map.insert("account_key".to_string(), "account_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Azdls, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("azdls", {\n root: "/path/to/dir",\n filesystem: "test",\n endpoint: "https://accountname.dfs.core.windows.net",\n account_name: "account_name",\n account_key: "account_key",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("azdls",\n root="/path/to/dir",\n filesystem="test",\n endpoint="https://accountname.dfs.core.windows.net",\n account_name="account_name",\n account_key="account_key",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4551],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(k,o(o({ref:t},u),{},{components:n})):a.createElement(k,o({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var c=2;c{n.d(t,{Z:()=>o});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),o=n(3053),i=n(3442),s=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,c]=k({queryString:n,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),b(e)}),[c,b,l]),tabValues:l}}var f=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==i&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",h.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(y,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},9600:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Notes",id:"notes",level:2},{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"As known as ",(0,r.kt)("inlineCode",{parentName:"p"},"abfs"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"azdls")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"azdls"),"."),(0,r.kt)("p",null,"This service will visit the ",(0,r.kt)("a",{parentName:"p",href:"https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-abfs-driver"},"ABFS")," URI supported by ",(0,r.kt)("a",{parentName:"p",href:"https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction"},"Azure Data Lake Storage Gen2"),"."),(0,r.kt)("h2",{id:"notes"},"Notes"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"azdls")," is different from ",(0,r.kt)("inlineCode",{parentName:"p"},"azfile")," service which used to visit ",(0,r.kt)("a",{parentName:"p",href:"https://azure.microsoft.com/en-us/services/storage/files/"},"Azure File Storage"),"."),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"filesystem"),": Set the filesystem name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_name"),": Set the account_name for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_key"),": Set the account_key for backend.")),(0,r.kt)("p",null,"Refer to public API docs for more information."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Azdls;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create azdls backend builder.\n let mut builder = Azdls::default();\n // Set the root for azdls, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/path/to/dir");\n // Set the filesystem name, this is required.\n builder.filesystem("test");\n // Set the endpoint, this is required.\n //\n // For examples:\n // - "https://accountname.dfs.core.windows.net"\n builder.endpoint("https://accountname.dfs.core.windows.net");\n // Set the account_name and account_key.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.account_name("account_name");\n builder.account_key("account_key");\n\n // `Accessor` provides the low level APIs, we will use `Operator` normally.\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=n(8750),c=n(5810);const u={title:"Azdls"},p=void 0,d={unversionedId:"services/azdls",id:"services/azdls",title:"Azdls",description:"Azure Data Lake Storage Gen2 Support.",source:"@site/docs/services/azdls.mdx",sourceDirName:"services",slug:"/services/azdls",permalink:"/docs/services/azdls",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/azdls.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Azdls"},sidebar:"docs",previous:{title:"Azblob",permalink:"/docs/services/azblob"},next:{title:"Cacache",permalink:"/docs/services/cacache"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},f="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Azure Data Lake Storage Gen2 Support."),(0,r.kt)(i,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("filesystem".to_string(), "test".to_string());\n map.insert("endpoint".to_string(), "https://accountname.dfs.core.windows.net".to_string());\n map.insert("account_name".to_string(), "account_name".to_string());\n map.insert("account_key".to_string(), "account_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Azdls, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("azdls", {\n root: "/path/to/dir",\n filesystem: "test",\n endpoint: "https://accountname.dfs.core.windows.net",\n account_name: "account_name",\n account_key: "account_key",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("azdls",\n root="/path/to/dir",\n filesystem="test",\n endpoint="https://accountname.dfs.core.windows.net",\n account_name="account_name",\n account_key="account_key",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/65bf2b43.0017c3d9.js b/assets/js/65bf2b43.797d900c.js similarity index 82% rename from assets/js/65bf2b43.0017c3d9.js rename to assets/js/65bf2b43.797d900c.js index 761faf6aa53b..a22d4226f1e5 100644 --- a/assets/js/65bf2b43.0017c3d9.js +++ b/assets/js/65bf2b43.797d900c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2115],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},c),{},{components:a})):n.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function k(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:a,groupId:n}),[p,k]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),k(e)}),[u,k,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},9974:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string for libsql server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"auth_token"),": Set the authentication token for libsql server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"table"),": Set the table of libsql"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of libsql"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of libsql")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Libsql;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Libsql::default();\n builder.root("/");\n builder.connection_string("https://example.com/db");\n builder.auth_token("secret");\n builder.table("your_table");\n // key field type in the table should be compatible with Rust\'s &str like text\n builder.key_field("key");\n // value field type in the table should be compatible with Rust\'s Vec like bytea\n builder.value_field("value");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"LibSQL"},p=void 0,d={unversionedId:"services/libsql",id:"services/libsql",title:"LibSQL",description:"libSQL service support.",source:"@site/docs/services/libsql.mdx",sourceDirName:"services",slug:"/services/libsql",permalink:"/docs/services/libsql",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/libsql.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"LibSQL"},sidebar:"docs",previous:{title:"IPMFS",permalink:"/docs/services/ipmfs"},next:{title:"Memcached",permalink:"/docs/services/memcached"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/tursodatabase/libsql"},"libSQL")," service support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/".to_string());\n map.insert("connection_string".to_string(), "https://example.com/db".to_string());\n map.insert("auth_token".to_string(), "secret".to_string());\n map.insert("table".to_string(), "your_table".to_string());\n map.insert("key_field".to_string(), "key".to_string());\n map.insert("value_field".to_string(), "value".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Libsql, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("libsql", {\n root: "/",\n connection_string: "https://example.com/db",\n auth_token: "secret",\n table: "your_table",\n key_field: "key",\n value_field: "value",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("libsql",\n root="/",\n connection_string="https://example.com/db",\n auth_token="secret",\n table="your_table",\n key_field="key",\n value_field="value"\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2115],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},c),{},{components:a})):n.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function k(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:a,groupId:n}),[p,k]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),k(e)}),[u,k,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},9974:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string for libsql server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"auth_token"),": Set the authentication token for libsql server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"table"),": Set the table of libsql"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of libsql"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of libsql")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Libsql;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Libsql::default();\n builder.root("/");\n builder.connection_string("https://example.com/db");\n builder.auth_token("secret");\n builder.table("your_table");\n // key field type in the table should be compatible with Rust\'s &str like text\n builder.key_field("key");\n // value field type in the table should be compatible with Rust\'s Vec like bytea\n builder.value_field("value");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"LibSQL"},p=void 0,d={unversionedId:"services/libsql",id:"services/libsql",title:"LibSQL",description:"libSQL service support.",source:"@site/docs/services/libsql.mdx",sourceDirName:"services",slug:"/services/libsql",permalink:"/docs/services/libsql",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/libsql.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"LibSQL"},sidebar:"docs",previous:{title:"IPMFS",permalink:"/docs/services/ipmfs"},next:{title:"Memcached",permalink:"/docs/services/memcached"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/tursodatabase/libsql"},"libSQL")," service support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/".to_string());\n map.insert("connection_string".to_string(), "https://example.com/db".to_string());\n map.insert("auth_token".to_string(), "secret".to_string());\n map.insert("table".to_string(), "your_table".to_string());\n map.insert("key_field".to_string(), "key".to_string());\n map.insert("value_field".to_string(), "value".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Libsql, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("libsql", {\n root: "/",\n connection_string: "https://example.com/db",\n auth_token: "secret",\n table: "your_table",\n key_field: "key",\n value_field: "value",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("libsql",\n root="/",\n connection_string="https://example.com/db",\n auth_token="secret",\n table="your_table",\n key_field="key",\n value_field="value"\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/67ecc70e.16eb2d15.js b/assets/js/67ecc70e.b853346f.js similarity index 81% rename from assets/js/67ecc70e.16eb2d15.js rename to assets/js/67ecc70e.b853346f.js index b3fd85cdd7fb..2402d9b96032 100644 --- a/assets/js/67ecc70e.16eb2d15.js +++ b/assets/js/67ecc70e.b853346f.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4434],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),s=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},u=function(e){var t=s(e.components);return n.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=s(a),m=r,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,c(c({ref:t},u),{},{components:a})):n.createElement(b,c({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,c=new Array(l);c[0]=m;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i[p]="string"==typeof e?e:r,c[1]=i;for(var s=2;s{a.d(t,{Z:()=>c});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function c(e){let{children:t,hidden:a,className:c}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,c),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),c=a(3053),i=a(3442),o=a(9356),s=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,o._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function h(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[c,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[o,s]=b({queryString:a,groupId:n}),[p,h]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:c,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),s(e),h(e)}),[s,h,l]),tabValues:l}}var f=a(5667);const k={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:i,selectValue:o,tabValues:s}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,c.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=s[a].value;n!==i&&(p(t),o(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},s.map((e=>{let{value:t,label:a,attributes:c}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},c,{className:(0,l.Z)("tabs__item",k.tabItem,c?.className,{"tabs__item--active":i===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=h(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",k.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},8853:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>k,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},c="wrapper";function i(e){let{components:t,...a}=e;return(0,r.kt)(c,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"datadir"),": Set the path to the cacache data directory")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"CacacheBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Cacache;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Cacache::default();\n builder.datadir("/tmp/opendal/cacache");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var o=a(8750),s=a(5810);const u={title:"Cacache"},p=void 0,d={unversionedId:"services/cacache",id:"services/cacache",title:"Cacache",description:"Cacache services support.",source:"@site/docs/services/cacache.mdx",sourceDirName:"services",slug:"/services/cacache",permalink:"/docs/services/cacache",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/cacache.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Cacache"},sidebar:"docs",previous:{title:"Azdls",permalink:"/docs/services/azdls"},next:{title:"COS",permalink:"/docs/services/cos"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],h={toc:b},f="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/zkat/cacache-rs"},"Cacache")," services support."),(0,r.kt)(i,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(s.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Cacache;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("datadir".to_string(), "/tmp/opendal/cacache".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Cacache, map)?;\n Ok(())\n}\n'))),(0,r.kt)(s.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"cacache\", {\n datadir: '/tmp/opendal/cacache'\n });\n}\n"))),(0,r.kt)(s.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("cacache", {\n "datadir": "/tmp/opendal/cacache"\n})\n')))))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4434],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),s=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},u=function(e){var t=s(e.components);return n.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=s(a),m=r,b=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,c(c({ref:t},u),{},{components:a})):n.createElement(b,c({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,c=new Array(l);c[0]=m;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i[p]="string"==typeof e?e:r,c[1]=i;for(var s=2;s{a.d(t,{Z:()=>c});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function c(e){let{children:t,hidden:a,className:c}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,c),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),c=a(3053),i=a(3442),o=a(9356),s=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,o._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[c,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[o,s]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),h=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{h&&i(h)}),[h]);return{selectedValue:c,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),s(e),f(e)}),[s,f,l]),tabValues:l}}var h=a(5667);const k={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:i,selectValue:o,tabValues:s}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,c.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=s[a].value;n!==i&&(p(t),o(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},s.map((e=>{let{value:t,label:a,attributes:c}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},c,{className:(0,l.Z)("tabs__item",k.tabItem,c?.className,{"tabs__item--active":i===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",k.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,h.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},8853:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>k,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},c="wrapper";function i(e){let{components:t,...a}=e;return(0,r.kt)(c,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"datadir"),": Set the path to the cacache data directory")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"CacacheBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Cacache;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Cacache::default();\n builder.datadir("/tmp/opendal/cacache");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var o=a(8750),s=a(5810);const u={title:"Cacache"},p=void 0,d={unversionedId:"services/cacache",id:"services/cacache",title:"Cacache",description:"Cacache services support.",source:"@site/docs/services/cacache.mdx",sourceDirName:"services",slug:"/services/cacache",permalink:"/docs/services/cacache",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/cacache.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Cacache"},sidebar:"docs",previous:{title:"Azdls",permalink:"/docs/services/azdls"},next:{title:"COS",permalink:"/docs/services/cos"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},h="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(h,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/zkat/cacache-rs"},"Cacache")," services support."),(0,r.kt)(i,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(s.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Cacache;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("datadir".to_string(), "/tmp/opendal/cacache".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Cacache, map)?;\n Ok(())\n}\n'))),(0,r.kt)(s.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"cacache\", {\n datadir: '/tmp/opendal/cacache'\n });\n}\n"))),(0,r.kt)(s.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("cacache", {\n "datadir": "/tmp/opendal/cacache"\n})\n')))))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6a41242b.0a66a4ef.js b/assets/js/6a41242b.ddda23c1.js similarity index 78% rename from assets/js/6a41242b.0a66a4ef.js rename to assets/js/6a41242b.ddda23c1.js index 2c0f7ff675d0..8044893ba89f 100644 --- a/assets/js/6a41242b.0a66a4ef.js +++ b/assets/js/6a41242b.ddda23c1.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5571],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>b});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(b,o(o({ref:t},c),{},{components:n})):a.createElement(b,o({ref:t},c))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var u=2;u{n.d(t,{Z:()=>o});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),o=n(3053),i=n(3442),s=n(9356),u=n(4634),c=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function k(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:n,groupId:a}),[p,k]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),k(e)}),[u,k,l]),tabValues:l}}var f=n(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=u[n].value;a!==i&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",y.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function g(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},r.createElement(h,(0,a.Z)({},e,t)),r.createElement(g,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}},3118:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string of mongodb server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"database"),": Set the database of mongodb"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"collection"),": Set the collection of mongodb"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of mongodb"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of mongodb")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Mongodb;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Mongodb::default();\n builder.root("/");\n builder.connection_string("mongodb://myUser:myPassword@localhost:27017/myAuthDB");\n builder.database("your_database");\n builder.collection("your_collection");\n // key field type in the table should be compatible with Rust\'s &str like text\n builder.key_field("key");\n // value field type in the table should be compatible with Rust\'s Vec like bytea\n builder.value_field("value");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=n(8750),u=n(5810);const c={title:"MongoDB"},p=void 0,d={unversionedId:"services/mongodb",id:"services/mongodb",title:"MongoDB",description:"MongoDB services support.",source:"@site/docs/services/mongodb.mdx",sourceDirName:"services",slug:"/services/mongodb",permalink:"/docs/services/mongodb",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/mongodb.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"MongoDB"},sidebar:"docs",previous:{title:"Moka",permalink:"/docs/services/moka"},next:{title:"MySQL",permalink:"/docs/services/mysql"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function y(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.mongodb.com/"},"MongoDB")," services support."),(0,r.kt)(i,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/".to_string());\n map.insert("connection_string".to_string(), "mongodb://myUser:myPassword@localhost:27017/myAuthDB".to_string());\n map.insert("database".to_string(), "your_database".to_string());\n map.insert("collection".to_string(), "your_collection".to_string());\n map.insert("key_field".to_string(), "key".to_string());\n map.insert("value_field".to_string(), "value".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Mongodb, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("mongodb", {\n root: "/",\n connection_string: "mongodb://myUser:myPassword@localhost:27017/myAuthDB",\n database: "your_database",\n collection: "your_collection",\n key_field: "key",\n value_field: "value"\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("mongodb",\n root="/",\n connection_string="mongodb://myUser:myPassword@localhost:27017/myAuthDB",\n database="your_database",\n collection="your_collection",\n key_field="key",\n value_field="value"\n)\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5571],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>b});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(b,o(o({ref:t},c),{},{components:n})):a.createElement(b,o({ref:t},c))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var u=2;u{n.d(t,{Z:()=>o});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),o=n(3053),i=n(3442),s=n(9356),u=n(4634),c=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:n,groupId:a}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&i(k)}),[k]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=n(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=u[n].value;a!==i&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",y.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function g(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},r.createElement(h,(0,a.Z)({},e,t)),r.createElement(g,(0,a.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}},3118:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string of mongodb server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"database"),": Set the database of mongodb"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"collection"),": Set the collection of mongodb"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of mongodb"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of mongodb")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Mongodb;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Mongodb::default();\n builder.root("/");\n builder.connection_string("mongodb://myUser:myPassword@localhost:27017/myAuthDB");\n builder.database("your_database");\n builder.collection("your_collection");\n // key field type in the table should be compatible with Rust\'s &str like text\n builder.key_field("key");\n // value field type in the table should be compatible with Rust\'s Vec like bytea\n builder.value_field("value");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=n(8750),u=n(5810);const c={title:"MongoDB"},p=void 0,d={unversionedId:"services/mongodb",id:"services/mongodb",title:"MongoDB",description:"MongoDB services support.",source:"@site/docs/services/mongodb.mdx",sourceDirName:"services",slug:"/services/mongodb",permalink:"/docs/services/mongodb",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/mongodb.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"MongoDB"},sidebar:"docs",previous:{title:"Moka",permalink:"/docs/services/moka"},next:{title:"MySQL",permalink:"/docs/services/mysql"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function y(e){let{components:t,...n}=e;return(0,r.kt)(k,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.mongodb.com/"},"MongoDB")," services support."),(0,r.kt)(i,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/".to_string());\n map.insert("connection_string".to_string(), "mongodb://myUser:myPassword@localhost:27017/myAuthDB".to_string());\n map.insert("database".to_string(), "your_database".to_string());\n map.insert("collection".to_string(), "your_collection".to_string());\n map.insert("key_field".to_string(), "key".to_string());\n map.insert("value_field".to_string(), "value".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Mongodb, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("mongodb", {\n root: "/",\n connection_string: "mongodb://myUser:myPassword@localhost:27017/myAuthDB",\n database: "your_database",\n collection: "your_collection",\n key_field: "key",\n value_field: "value"\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("mongodb",\n root="/",\n connection_string="mongodb://myUser:myPassword@localhost:27017/myAuthDB",\n database="your_database",\n collection="your_collection",\n key_field="key",\n value_field="value"\n)\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6dc695d1.e2efda96.js b/assets/js/6dc695d1.a62a6276.js similarity index 81% rename from assets/js/6dc695d1.e2efda96.js rename to assets/js/6dc695d1.a62a6276.js index f6d99b19f6a8..040f6d945230 100644 --- a/assets/js/6dc695d1.e2efda96.js +++ b/assets/js/6dc695d1.a62a6276.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5982],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=u(a),m=r,f=d["".concat(s,".").concat(m)]||d[m]||p[m]||l;return a?n.createElement(f,i(i({ref:t},c),{},{components:a})):n.createElement(f,i({ref:t},c))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[d]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function d(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function p(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??d(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=p(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=f({queryString:a,groupId:n}),[d,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??d;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,i.o5)(),p=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(d(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},6791:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>p,toc:()=>f});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token"),": Set the token of cloudflare api"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_id"),": Set the account id of cloudflare api"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"database_id"),": Set the database id of cloudflare api"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"table"),": Set the table of D1 Database"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of D1 Database"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of D1 Database")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::D1;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = D1::default();\n builder\n .token("token")\n .account_id("account_id")\n .database_id("database_id")\n .table("table")\n .key_field("key_field")\n .value_field("value_field");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"D1"},d=void 0,p={unversionedId:"services/d1",id:"services/d1",title:"D1",description:"D1 services support.",source:"@site/docs/services/d1.mdx",sourceDirName:"services",slug:"/services/d1",permalink:"/docs/services/d1",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/d1.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"D1"},sidebar:"docs",previous:{title:"COS",permalink:"/docs/services/cos"},next:{title:"DashMap",permalink:"/docs/services/dashmap"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://developers.cloudflare.com/d1/"},"D1")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("token".to_string(), "token".to_string());\n map.insert("account_id".to_string(), "account_id".to_string());\n map.insert("database_id".to_string(), "database_id".to_string());\n map.insert("table".to_string(), "table".to_string());\n map.insert("key_field".to_string(), "key_field".to_string());\n map.insert("value_field".to_string(), "value_field".to_string());\n\n let op: Operator = Operator::via_map(Scheme::D1, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const config = {\n token: "token",\n account_id: "account_id",\n database_id: "database_id",\n table: "table",\n key_field: "key_field",\n value_field: "value_field"\n };\n const op = new Operator("d1", config);\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nconfig = {\n "token": "token",\n "account_id": "account_id",\n "database_id": "database_id",\n "table": "table",\n "key_field": "key_field",\n "value_field": "value_field"\n}\n\nop = opendal.Operator("d1", **config)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5982],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=u(a),m=r,f=d["".concat(s,".").concat(m)]||d[m]||p[m]||l;return a?n.createElement(f,i(i({ref:t},c),{},{components:a})):n.createElement(f,i({ref:t},c))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[d]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function d(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function p(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??d(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=p(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=f({queryString:a,groupId:n}),[d,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??d;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,i.o5)(),p=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(d(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},6791:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>p,toc:()=>f});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token"),": Set the token of cloudflare api"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"account_id"),": Set the account id of cloudflare api"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"database_id"),": Set the database id of cloudflare api"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"table"),": Set the table of D1 Database"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of D1 Database"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of D1 Database")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::D1;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = D1::default();\n builder\n .token("token")\n .account_id("account_id")\n .database_id("database_id")\n .table("table")\n .key_field("key_field")\n .value_field("value_field");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"D1"},d=void 0,p={unversionedId:"services/d1",id:"services/d1",title:"D1",description:"D1 services support.",source:"@site/docs/services/d1.mdx",sourceDirName:"services",slug:"/services/d1",permalink:"/docs/services/d1",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/d1.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"D1"},sidebar:"docs",previous:{title:"COS",permalink:"/docs/services/cos"},next:{title:"DashMap",permalink:"/docs/services/dashmap"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://developers.cloudflare.com/d1/"},"D1")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("token".to_string(), "token".to_string());\n map.insert("account_id".to_string(), "account_id".to_string());\n map.insert("database_id".to_string(), "database_id".to_string());\n map.insert("table".to_string(), "table".to_string());\n map.insert("key_field".to_string(), "key_field".to_string());\n map.insert("value_field".to_string(), "value_field".to_string());\n\n let op: Operator = Operator::via_map(Scheme::D1, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const config = {\n token: "token",\n account_id: "account_id",\n database_id: "database_id",\n table: "table",\n key_field: "key_field",\n value_field: "value_field"\n };\n const op = new Operator("d1", config);\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nconfig = {\n "token": "token",\n "account_id": "account_id",\n "database_id": "database_id",\n "table": "table",\n "key_field": "key_field",\n "value_field": "value_field"\n}\n\nop = opendal.Operator("d1", **config)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6f4d3fa1.d26d09df.js b/assets/js/6f4d3fa1.03a29c20.js similarity index 86% rename from assets/js/6f4d3fa1.d26d09df.js rename to assets/js/6f4d3fa1.03a29c20.js index cbc654d2e510..97ca11e53ced 100644 --- a/assets/js/6f4d3fa1.d26d09df.js +++ b/assets/js/6f4d3fa1.03a29c20.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5885],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>k});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(k,i(i({ref:t},u),{},{components:a})):n.createElement(k,i({ref:t},u))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=k({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),b=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{b&&o(b)}),[b]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var b=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,b.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},852:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"blocking"))),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoints"),": Set the endpoints to the tikv cluster"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"insecure"),": Set the insecure flag to the tikv cluster"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ca_path"),": Set the ca path to the tikv connection"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"cert_path"),": Set the cert path to the tikv connection"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_path"),": Set the key path to the tikv connection")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"TiKVBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Tikv;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Tikv::default();\n builder.endpoints("127.0.0.1:2379");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"TiKV"},p=void 0,d={unversionedId:"services/tikv",id:"services/tikv",title:"TiKV",description:"TiKV services support.",source:"@site/docs/services/tikv.mdx",sourceDirName:"services",slug:"/services/tikv",permalink:"/docs/services/tikv",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/tikv.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"TiKV"},sidebar:"docs",previous:{title:"Swift",permalink:"/docs/services/swift"},next:{title:"Vercel Artifacts",permalink:"/docs/services/vercel_artifacts"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],f={toc:k},b="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(b,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://tikv.org/"},"TiKV")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut config = HashMap::new();\n config.insert("endpoints".to_string(), "127.0.0.1:2379".to_string());\n\n let op: Operator = Operator::via_map(Scheme::TiKV, config)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const config = {\n endpoints: "127.0.0.1:2379",\n };\n const op = new Operator("tikv", config);\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nconfig = {\n "endpoints": "127.0.0.1:2379",\n}\n\nop = opendal.Operator("tikv", **config)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5885],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>k});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(k,i(i({ref:t},u),{},{components:a})):n.createElement(k,i({ref:t},u))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=k({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),b=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{b&&o(b)}),[b]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var b=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,b.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},852:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"blocking"))),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoints"),": Set the endpoints to the tikv cluster"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"insecure"),": Set the insecure flag to the tikv cluster"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ca_path"),": Set the ca path to the tikv connection"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"cert_path"),": Set the cert path to the tikv connection"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_path"),": Set the key path to the tikv connection")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"TiKVBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Tikv;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Tikv::default();\n builder.endpoints("127.0.0.1:2379");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"TiKV"},p=void 0,d={unversionedId:"services/tikv",id:"services/tikv",title:"TiKV",description:"TiKV services support.",source:"@site/docs/services/tikv.mdx",sourceDirName:"services",slug:"/services/tikv",permalink:"/docs/services/tikv",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/tikv.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"TiKV"},sidebar:"docs",previous:{title:"Swift",permalink:"/docs/services/swift"},next:{title:"Vercel Artifacts",permalink:"/docs/services/vercel_artifacts"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],f={toc:k},b="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(b,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://tikv.org/"},"TiKV")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut config = HashMap::new();\n config.insert("endpoints".to_string(), "127.0.0.1:2379".to_string());\n\n let op: Operator = Operator::via_map(Scheme::TiKV, config)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const config = {\n endpoints: "127.0.0.1:2379",\n };\n const op = new Operator("tikv", config);\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nconfig = {\n "endpoints": "127.0.0.1:2379",\n}\n\nop = opendal.Operator("tikv", **config)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7263c0b5.79fbe95c.js b/assets/js/7263c0b5.22c96f51.js similarity index 86% rename from assets/js/7263c0b5.79fbe95c.js rename to assets/js/7263c0b5.22c96f51.js index b492ffdfdaeb..08b89ce64c1d 100644 --- a/assets/js/7263c0b5.79fbe95c.js +++ b/assets/js/7263c0b5.22c96f51.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4649],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>k});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(a),d=r,k=p["".concat(s,".").concat(d)]||p[d]||m[d]||l;return a?n.createElement(k,o(o({ref:t},u),{},{components:a})):n.createElement(k,o({ref:t},u))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,o=new Array(l);o[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var c=2;c{a.d(t,{Z:()=>o});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:a,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),o=a(3053),i=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function m(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function d(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:a}=e;const n=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=m(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=k({queryString:a,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return d({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),b(e)}),[c,b,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),m=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==i&&(p(t),s(n))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:o}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:d,onClick:m},o,{className:(0,l.Z)("tabs__item",h.tabItem,o?.className,{"tabs__item--active":i===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},3692:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>m,toc:()=>k});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...a}=e;return(0,r.kt)(o,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"name"),": Set the name for this cache instance."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"max_capacity"),": Set the max capacity of the cache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"time_to_live"),": Set the time to live of the cache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"time_to_idle"),": Set the time to idle of the cache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"num_segments"),": Set the segments number of the cache.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"MokaBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Moka;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Moka::default();\n builder.name("opendal");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"Moka"},p=void 0,m={unversionedId:"services/moka",id:"services/moka",title:"Moka",description:"Moka services support.",source:"@site/docs/services/moka.mdx",sourceDirName:"services",slug:"/services/moka",permalink:"/docs/services/moka",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/moka.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Moka"},sidebar:"docs",previous:{title:"Memory",permalink:"/docs/services/memory"},next:{title:"MongoDB",permalink:"/docs/services/mongodb"}},d={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/moka-rs/moka"},"Moka")," services support."),(0,r.kt)(i,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("name".to_string(), "your_cache_name".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Moka, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("moka", {\n name: "your_cache_name",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("moka",\n name="your_cache_name",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4649],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>k});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(a),d=r,k=p["".concat(s,".").concat(d)]||p[d]||m[d]||l;return a?n.createElement(k,o(o({ref:t},u),{},{components:a})):n.createElement(k,o({ref:t},u))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,o=new Array(l);o[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var c=2;c{a.d(t,{Z:()=>o});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:a,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),o=a(3053),i=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function m(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function d(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:a}=e;const n=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=m(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=k({queryString:a,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return d({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),b(e)}),[c,b,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),m=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==i&&(p(t),s(n))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:o}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:d,onClick:m},o,{className:(0,l.Z)("tabs__item",h.tabItem,o?.className,{"tabs__item--active":i===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},3692:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>m,toc:()=>k});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...a}=e;return(0,r.kt)(o,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"name"),": Set the name for this cache instance."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"max_capacity"),": Set the max capacity of the cache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"time_to_live"),": Set the time to live of the cache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"time_to_idle"),": Set the time to idle of the cache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"num_segments"),": Set the segments number of the cache.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"MokaBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Moka;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Moka::default();\n builder.name("opendal");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"Moka"},p=void 0,m={unversionedId:"services/moka",id:"services/moka",title:"Moka",description:"Moka services support.",source:"@site/docs/services/moka.mdx",sourceDirName:"services",slug:"/services/moka",permalink:"/docs/services/moka",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/moka.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Moka"},sidebar:"docs",previous:{title:"Memory",permalink:"/docs/services/memory"},next:{title:"MongoDB",permalink:"/docs/services/mongodb"}},d={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/moka-rs/moka"},"Moka")," services support."),(0,r.kt)(i,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("name".to_string(), "your_cache_name".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Moka, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("moka", {\n name: "your_cache_name",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("moka",\n name="your_cache_name",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8070e160.07907d7d.js b/assets/js/8070e160.07907d7d.js deleted file mode 100644 index f2bef0eabd7f..000000000000 --- a/assets/js/8070e160.07907d7d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2651],{9613:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>g});var a=t(9496);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function r(e){for(var n=1;n=0||(l[t]=e[t]);return l}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}var d=a.createContext({}),p=function(e){var n=a.useContext(d),t=n;return e&&(t="function"==typeof e?e(n):r(r({},n),e)),t},s=function(e){var n=p(e.components);return a.createElement(d.Provider,{value:n},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,l=e.mdxType,o=e.originalType,d=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),c=p(t),m=l,g=c["".concat(d,".").concat(m)]||c[m]||u[m]||o;return t?a.createElement(g,r(r({ref:n},s),{},{components:t})):a.createElement(g,r({ref:n},s))}));function g(e,n){var t=arguments,l=n&&n.mdxType;if("string"==typeof e||l){var o=t.length,r=new Array(o);r[0]=m;var i={};for(var d in n)hasOwnProperty.call(n,d)&&(i[d]=n[d]);i.originalType=e,i[c]="string"==typeof e?e:l,r[1]=i;for(var p=2;p{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var a=t(8126),l=(t(9496),t(9613));const o={title:"Quickstart",sidebar_position:3},r=void 0,i={unversionedId:"quickstart",id:"quickstart",title:"Quickstart",description:"Apache OpenDAL\u2122 can be easily integrated into different software with its Rust core and multilingual bindings.",source:"@site/docs/quickstart.md",sourceDirName:".",slug:"/quickstart",permalink:"/docs/quickstart",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/quickstart.md",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",sidebarPosition:3,frontMatter:{title:"Quickstart",sidebar_position:3},sidebar:"docs",previous:{title:"About",permalink:"/docs/overview"},next:{title:"Services",permalink:"/docs/category/services"}},d={},p=[{value:"Rust core",id:"rust-core",level:2},{value:"Install",id:"install",level:3},{value:"Demo",id:"demo",level:3},{value:"Java binding",id:"java-binding",level:2},{value:"Install",id:"install-1",level:3},{value:"Maven",id:"maven",level:4},{value:"Gradle",id:"gradle",level:4},{value:"Classified library",id:"classified-library",level:4},{value:"Demo",id:"demo-1",level:3},{value:"Python binding",id:"python-binding",level:2},{value:"Install",id:"install-2",level:3},{value:"Demo",id:"demo-2",level:3},{value:"Node.js binding",id:"nodejs-binding",level:2},{value:"Install",id:"install-3",level:3},{value:"Demo",id:"demo-3",level:3}],s={toc:p},c="wrapper";function u(e){let{components:n,...t}=e;return(0,l.kt)(c,(0,a.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Apache OpenDAL\u2122 can be easily integrated into different software with its Rust core and multilingual bindings."),(0,l.kt)("h2",{id:"rust-core"},"Rust core"),(0,l.kt)("p",null,"OpenDAL's core is implemented in Rust programming language. The most convenient way to use OpenDAL in your Rust program add the OpenDAL Cargo crate as a dependency."),(0,l.kt)("h3",{id:"install"},"Install"),(0,l.kt)("p",null,"Run the following Cargo command in your project directory:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"cargo add opendal\n")),(0,l.kt)("p",null,"Or add the following line to your Cargo.toml:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'opendal = "0.40.0"\n')),(0,l.kt)("h3",{id:"demo"},"Demo"),(0,l.kt)("p",null,"Try it out:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-rust"},'use opendal::Result;\nuse opendal::layers::LoggingLayer;\nuse opendal::services;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Pick a builder and configure it.\n let mut builder = services::S3::default();\n builder.bucket("test");\n\n // Init an operator\n let op = Operator::new(builder)?\n // Init with logging layer enabled.\n .layer(LoggingLayer::default())\n .finish();\n\n // Write data\n op.write("hello.txt", "Hello, World!").await?;\n\n // Read data\n let bs = op.read("hello.txt").await?;\n\n // Fetch metadata\n let meta = op.stat("hello.txt").await?;\n let mode = meta.mode();\n let length = meta.content_length();\n\n // Delete\n op.delete("hello.txt").await?;\n\n Ok(())\n}\n')),(0,l.kt)("h2",{id:"java-binding"},"Java binding"),(0,l.kt)("p",null,"OpenDAL's Java binding is released to Maven central as ",(0,l.kt)("a",{parentName:"p",href:"https://central.sonatype.com/artifact/org.apache.opendal/opendal-java"},(0,l.kt)("inlineCode",{parentName:"a"},"org.apache.opendal:opendal-java:${version}")),"."),(0,l.kt)("h3",{id:"install-1"},"Install"),(0,l.kt)("h4",{id:"maven"},"Maven"),(0,l.kt)("p",null,"Generally, you can first add the ",(0,l.kt)("inlineCode",{parentName:"p"},"os-maven-plugin")," for automatically detect the classifier based on your platform:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-xml"},"\n\n \n kr.motd.maven\n os-maven-plugin\n 1.7.0\n \n\n\n")),(0,l.kt)("p",null,"Then add the dependency to opendal-java as following:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-xml"},"\n\n org.apache.opendal\n opendal-java\n ${opendal.version}\n\n\n org.apache.opendal\n opendal-java\n ${opendal.version}\n ${os.detected.classifier}\n\n\n")),(0,l.kt)("h4",{id:"gradle"},"Gradle"),(0,l.kt)("p",null,"For Gradle, you can first add the ",(0,l.kt)("inlineCode",{parentName:"p"},"com.google.osdetector")," for automatically detect the classifier based on your platform:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'plugins {\n id "com.google.osdetector" version "1.7.3"\n}\n')),(0,l.kt)("p",null,"Then add the dependency to opendal-java as following:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'dependencies {\n implementation "org.apache.opendal:opendal-java:$opendal.version"\n implementation "org.apache.opendal:opendal-java:$opendal.version:$osdetector.classifier"\n}\n')),(0,l.kt)("h4",{id:"classified-library"},"Classified library"),(0,l.kt)("p",null,"For details in specifying classified library, read the ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/apache/opendal/tree/main/bindings/java"},"dedicated explanation"),"."),(0,l.kt)("h3",{id:"demo-1"},"Demo"),(0,l.kt)("p",null,"Try it out:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-java"},'// Configure service\nfinal Map conf = new HashMap<>();\nconf.put("root", "/tmp");\n// Construct operator\nfinal Operator op = Operator.of("fs", conf);\n// Write data\nop.write("hello.txt", "Hello, World!").join();\n// Read data\nfinal byte[] bs = op.read("hello.txt").join();\n// Delete\nop.delete("hello.txt").join();\n')),(0,l.kt)("h2",{id:"python-binding"},"Python binding"),(0,l.kt)("p",null,"OpenDAL's Python binding is released to PyPI repository as ",(0,l.kt)("a",{parentName:"p",href:"https://pypi.org/project/opendal/"},(0,l.kt)("inlineCode",{parentName:"a"},"opendal")),"."),(0,l.kt)("h3",{id:"install-2"},"Install"),(0,l.kt)("p",null,"Run the following command to install ",(0,l.kt)("inlineCode",{parentName:"p"},"opendal"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"pip install opendal\n")),(0,l.kt)("h3",{id:"demo-2"},"Demo"),(0,l.kt)("p",null,"Try it out:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nimport asyncio\n\nasync def main():\n op = opendal.AsyncOperator("fs", root="/tmp")\n await op.write("test.txt", b"Hello World")\n print(await op.read("test.txt"))\n\nasyncio.run(main())\n')),(0,l.kt)("h2",{id:"nodejs-binding"},"Node.js binding"),(0,l.kt)("p",null,"OpenDAL's Python binding is released to npm registry as ",(0,l.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/opendal"},(0,l.kt)("inlineCode",{parentName:"a"},"opendal")),"."),(0,l.kt)("h3",{id:"install-3"},"Install"),(0,l.kt)("p",null,"Run the following command to install ",(0,l.kt)("inlineCode",{parentName:"p"},"opendal"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"npm install opendal\n")),(0,l.kt)("h3",{id:"demo-3"},"Demo"),(0,l.kt)("p",null,"Try it out:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("fs", { root: "/tmp" });\n await op.write("test", "Hello, World!");\n const bs = await op.read("test");\n console.log(new TextDecoder().decode(bs));\n const meta = await op.stat("test");\n console.log(`contentLength: ${meta.contentLength}`);\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8070e160.edd5bf6f.js b/assets/js/8070e160.edd5bf6f.js new file mode 100644 index 000000000000..22870dc7e172 --- /dev/null +++ b/assets/js/8070e160.edd5bf6f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2651],{9613:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>g});var a=t(9496);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function r(e){for(var n=1;n=0||(l[t]=e[t]);return l}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}var d=a.createContext({}),p=function(e){var n=a.useContext(d),t=n;return e&&(t="function"==typeof e?e(n):r(r({},n),e)),t},s=function(e){var n=p(e.components);return a.createElement(d.Provider,{value:n},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,l=e.mdxType,o=e.originalType,d=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),c=p(t),m=l,g=c["".concat(d,".").concat(m)]||c[m]||u[m]||o;return t?a.createElement(g,r(r({ref:n},s),{},{components:t})):a.createElement(g,r({ref:n},s))}));function g(e,n){var t=arguments,l=n&&n.mdxType;if("string"==typeof e||l){var o=t.length,r=new Array(o);r[0]=m;var i={};for(var d in n)hasOwnProperty.call(n,d)&&(i[d]=n[d]);i.originalType=e,i[c]="string"==typeof e?e:l,r[1]=i;for(var p=2;p{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var a=t(8126),l=(t(9496),t(9613));const o={title:"Quickstart",sidebar_position:3},r=void 0,i={unversionedId:"quickstart",id:"quickstart",title:"Quickstart",description:"Apache OpenDAL\u2122 can be easily integrated into different software with its Rust core and multilingual bindings.",source:"@site/docs/quickstart.md",sourceDirName:".",slug:"/quickstart",permalink:"/docs/quickstart",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/quickstart.md",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",sidebarPosition:3,frontMatter:{title:"Quickstart",sidebar_position:3},sidebar:"docs",previous:{title:"About",permalink:"/docs/overview"},next:{title:"Services",permalink:"/docs/category/services"}},d={},p=[{value:"Rust core",id:"rust-core",level:2},{value:"Install",id:"install",level:3},{value:"Demo",id:"demo",level:3},{value:"Java binding",id:"java-binding",level:2},{value:"Install",id:"install-1",level:3},{value:"Maven",id:"maven",level:4},{value:"Gradle",id:"gradle",level:4},{value:"Classified library",id:"classified-library",level:4},{value:"Demo",id:"demo-1",level:3},{value:"Python binding",id:"python-binding",level:2},{value:"Install",id:"install-2",level:3},{value:"Demo",id:"demo-2",level:3},{value:"Node.js binding",id:"nodejs-binding",level:2},{value:"Install",id:"install-3",level:3},{value:"Demo",id:"demo-3",level:3}],s={toc:p},c="wrapper";function u(e){let{components:n,...t}=e;return(0,l.kt)(c,(0,a.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Apache OpenDAL\u2122 can be easily integrated into different software with its Rust core and multilingual bindings."),(0,l.kt)("h2",{id:"rust-core"},"Rust core"),(0,l.kt)("p",null,"OpenDAL's core is implemented in Rust programming language. The most convenient way to use OpenDAL in your Rust program add the OpenDAL Cargo crate as a dependency."),(0,l.kt)("h3",{id:"install"},"Install"),(0,l.kt)("p",null,"Run the following Cargo command in your project directory:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"cargo add opendal\n")),(0,l.kt)("p",null,"Or add the following line to your Cargo.toml:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'opendal = "0.40.0"\n')),(0,l.kt)("h3",{id:"demo"},"Demo"),(0,l.kt)("p",null,"Try it out:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-rust"},'use opendal::Result;\nuse opendal::layers::LoggingLayer;\nuse opendal::services;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Pick a builder and configure it.\n let mut builder = services::S3::default();\n builder.bucket("test");\n\n // Init an operator\n let op = Operator::new(builder)?\n // Init with logging layer enabled.\n .layer(LoggingLayer::default())\n .finish();\n\n // Write data\n op.write("hello.txt", "Hello, World!").await?;\n\n // Read data\n let bs = op.read("hello.txt").await?;\n\n // Fetch metadata\n let meta = op.stat("hello.txt").await?;\n let mode = meta.mode();\n let length = meta.content_length();\n\n // Delete\n op.delete("hello.txt").await?;\n\n Ok(())\n}\n')),(0,l.kt)("h2",{id:"java-binding"},"Java binding"),(0,l.kt)("p",null,"OpenDAL's Java binding is released to Maven central as ",(0,l.kt)("a",{parentName:"p",href:"https://central.sonatype.com/artifact/org.apache.opendal/opendal-java"},(0,l.kt)("inlineCode",{parentName:"a"},"org.apache.opendal:opendal-java:${version}")),"."),(0,l.kt)("h3",{id:"install-1"},"Install"),(0,l.kt)("h4",{id:"maven"},"Maven"),(0,l.kt)("p",null,"Generally, you can first add the ",(0,l.kt)("inlineCode",{parentName:"p"},"os-maven-plugin")," for automatically detect the classifier based on your platform:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-xml"},"\n\n \n kr.motd.maven\n os-maven-plugin\n 1.7.0\n \n\n\n")),(0,l.kt)("p",null,"Then add the dependency to opendal-java as following:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-xml"},"\n\n org.apache.opendal\n opendal-java\n ${opendal.version}\n\n\n org.apache.opendal\n opendal-java\n ${opendal.version}\n ${os.detected.classifier}\n\n\n")),(0,l.kt)("h4",{id:"gradle"},"Gradle"),(0,l.kt)("p",null,"For Gradle, you can first add the ",(0,l.kt)("inlineCode",{parentName:"p"},"com.google.osdetector")," for automatically detect the classifier based on your platform:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'plugins {\n id "com.google.osdetector" version "1.7.3"\n}\n')),(0,l.kt)("p",null,"Then add the dependency to opendal-java as following:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-groovy"},'dependencies {\n implementation "org.apache.opendal:opendal-java:$opendal.version"\n implementation "org.apache.opendal:opendal-java:$opendal.version:$osdetector.classifier"\n}\n')),(0,l.kt)("h4",{id:"classified-library"},"Classified library"),(0,l.kt)("p",null,"For details in specifying classified library, read the ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/apache/opendal/tree/main/bindings/java"},"dedicated explanation"),"."),(0,l.kt)("h3",{id:"demo-1"},"Demo"),(0,l.kt)("p",null,"Try it out:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-java"},'// Configure service\nfinal Map conf = new HashMap<>();\nconf.put("root", "/tmp");\n// Construct operator\nfinal Operator op = Operator.of("fs", conf);\n// Write data\nop.write("hello.txt", "Hello, World!").join();\n// Read data\nfinal byte[] bs = op.read("hello.txt").join();\n// Delete\nop.delete("hello.txt").join();\n')),(0,l.kt)("h2",{id:"python-binding"},"Python binding"),(0,l.kt)("p",null,"OpenDAL's Python binding is released to PyPI repository as ",(0,l.kt)("a",{parentName:"p",href:"https://pypi.org/project/opendal/"},(0,l.kt)("inlineCode",{parentName:"a"},"opendal")),"."),(0,l.kt)("h3",{id:"install-2"},"Install"),(0,l.kt)("p",null,"Run the following command to install ",(0,l.kt)("inlineCode",{parentName:"p"},"opendal"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"pip install opendal\n")),(0,l.kt)("h3",{id:"demo-2"},"Demo"),(0,l.kt)("p",null,"Try it out:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nimport asyncio\n\nasync def main():\n op = opendal.AsyncOperator("fs", root="/tmp")\n await op.write("test.txt", b"Hello World")\n print(await op.read("test.txt"))\n\nasyncio.run(main())\n')),(0,l.kt)("h2",{id:"nodejs-binding"},"Node.js binding"),(0,l.kt)("p",null,"OpenDAL's Python binding is released to npm registry as ",(0,l.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/opendal"},(0,l.kt)("inlineCode",{parentName:"a"},"opendal")),"."),(0,l.kt)("h3",{id:"install-3"},"Install"),(0,l.kt)("p",null,"Run the following command to install ",(0,l.kt)("inlineCode",{parentName:"p"},"opendal"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"npm install opendal\n")),(0,l.kt)("h3",{id:"demo-3"},"Demo"),(0,l.kt)("p",null,"Try it out:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("fs", { root: "/tmp" });\n await op.write("test", "Hello, World!");\n const bs = await op.read("test");\n console.log(new TextDecoder().decode(bs));\n const meta = await op.stat("test");\n console.log(`contentLength: ${meta.contentLength}`);\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8cc9519e.65bf3c5a.js b/assets/js/8cc9519e.8d1888a2.js similarity index 89% rename from assets/js/8cc9519e.65bf3c5a.js rename to assets/js/8cc9519e.8d1888a2.js index 88a23813db5a..0e4180d99c6c 100644 --- a/assets/js/8cc9519e.65bf3c5a.js +++ b/assets/js/8cc9519e.8d1888a2.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1652],{9613:(e,t,a)=>{a.d(t,{Zo:()=>o,kt:()=>k});var r=a(9496);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=r.createContext({}),p=function(e){var t=r.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},o=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),m=p(a),d=n,k=m["".concat(l,".").concat(d)]||m[d]||u[d]||i;return a?r.createElement(k,s(s({ref:t},o),{},{components:a})):r.createElement(k,s({ref:t},o))}));function k(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,s=new Array(i);s[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[m]="string"==typeof e?e:n,s[1]=c;for(var p=2;p{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>b,frontMatter:()=>l,metadata:()=>o,toc:()=>u});var r=a(8126),n=(a(9496),a(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2}]},s="wrapper";function c(e){let{components:t,...a}=e;return(0,n.kt)(s,(0,r.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")))}c.isMDXComponent=!0;const l={title:"IPMFS"},p=void 0,o={unversionedId:"services/ipmfs",id:"services/ipmfs",title:"IPMFS",description:"IPFS Mutable File System (IPMFS) support",source:"@site/docs/services/ipmfs.mdx",sourceDirName:"services",slug:"/services/ipmfs",permalink:"/docs/services/ipmfs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/ipmfs.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"IPMFS"},sidebar:"docs",previous:{title:"IPFS",permalink:"/docs/services/ipfs"},next:{title:"LibSQL",permalink:"/docs/services/libsql"}},m={},u=[],d={toc:u},k="wrapper";function b(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"IPFS Mutable File System (IPMFS) support"),(0,n.kt)(c,{components:a.components,mdxType:"Docs"}))}b.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1652],{9613:(e,t,a)=>{a.d(t,{Zo:()=>o,kt:()=>k});var r=a(9496);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=r.createContext({}),p=function(e){var t=r.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},o=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),m=p(a),d=n,k=m["".concat(l,".").concat(d)]||m[d]||u[d]||i;return a?r.createElement(k,s(s({ref:t},o),{},{components:a})):r.createElement(k,s({ref:t},o))}));function k(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,s=new Array(i);s[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[m]="string"==typeof e?e:n,s[1]=c;for(var p=2;p{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>b,frontMatter:()=>l,metadata:()=>o,toc:()=>u});var r=a(8126),n=(a(9496),a(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2}]},s="wrapper";function c(e){let{components:t,...a}=e;return(0,n.kt)(s,(0,r.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")))}c.isMDXComponent=!0;const l={title:"IPMFS"},p=void 0,o={unversionedId:"services/ipmfs",id:"services/ipmfs",title:"IPMFS",description:"IPFS Mutable File System (IPMFS) support",source:"@site/docs/services/ipmfs.mdx",sourceDirName:"services",slug:"/services/ipmfs",permalink:"/docs/services/ipmfs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/ipmfs.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"IPMFS"},sidebar:"docs",previous:{title:"IPFS",permalink:"/docs/services/ipfs"},next:{title:"LibSQL",permalink:"/docs/services/libsql"}},m={},u=[],d={toc:u},k="wrapper";function b(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"IPFS Mutable File System (IPMFS) support"),(0,n.kt)(c,{components:a.components,mdxType:"Docs"}))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8f4159f2.31de883f.js b/assets/js/8f4159f2.b290c7bd.js similarity index 88% rename from assets/js/8f4159f2.31de883f.js rename to assets/js/8f4159f2.b290c7bd.js index c8550cdd4aab..aaf91356934d 100644 --- a/assets/js/8f4159f2.31de883f.js +++ b/assets/js/8f4159f2.b290c7bd.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4719],{9613:(e,t,a)=>{a.d(t,{Zo:()=>o,kt:()=>k});var r=a(9496);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=r.createContext({}),p=function(e){var t=r.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},o=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),m=p(a),u=n,k=m["".concat(l,".").concat(u)]||m[u]||d[u]||i;return a?r.createElement(k,s(s({ref:t},o),{},{components:a})):r.createElement(k,s({ref:t},o))}));function k(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,s=new Array(i);s[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[m]="string"==typeof e?e:n,s[1]=c;for(var p=2;p{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>b,frontMatter:()=>l,metadata:()=>o,toc:()=>d});var r=a(8126),n=(a(9496),a(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2}]},s="wrapper";function c(e){let{components:t,...a}=e;return(0,n.kt)(s,(0,r.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")))}c.isMDXComponent=!0;const l={title:"DashMap"},p=void 0,o={unversionedId:"services/dashmap",id:"services/dashmap",title:"DashMap",description:"dashmap backend support.",source:"@site/docs/services/dashmap.mdx",sourceDirName:"services",slug:"/services/dashmap",permalink:"/docs/services/dashmap",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/dashmap.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"DashMap"},sidebar:"docs",previous:{title:"D1",permalink:"/docs/services/d1"},next:{title:"Dropbox",permalink:"/docs/services/dropbox"}},m={},d=[],u={toc:d},k="wrapper";function b(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/xacrimon/dashmap"},"dashmap")," backend support."),(0,n.kt)(c,{components:a.components,mdxType:"Docs"}))}b.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4719],{9613:(e,t,a)=>{a.d(t,{Zo:()=>o,kt:()=>k});var r=a(9496);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=r.createContext({}),p=function(e){var t=r.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},o=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),m=p(a),u=n,k=m["".concat(l,".").concat(u)]||m[u]||d[u]||i;return a?r.createElement(k,s(s({ref:t},o),{},{components:a})):r.createElement(k,s({ref:t},o))}));function k(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,s=new Array(i);s[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[m]="string"==typeof e?e:n,s[1]=c;for(var p=2;p{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>b,frontMatter:()=>l,metadata:()=>o,toc:()=>d});var r=a(8126),n=(a(9496),a(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2}]},s="wrapper";function c(e){let{components:t,...a}=e;return(0,n.kt)(s,(0,r.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"capabilities"},"Capabilities"),(0,n.kt)("p",null,"This service can be used to:"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")))}c.isMDXComponent=!0;const l={title:"DashMap"},p=void 0,o={unversionedId:"services/dashmap",id:"services/dashmap",title:"DashMap",description:"dashmap backend support.",source:"@site/docs/services/dashmap.mdx",sourceDirName:"services",slug:"/services/dashmap",permalink:"/docs/services/dashmap",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/dashmap.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"DashMap"},sidebar:"docs",previous:{title:"D1",permalink:"/docs/services/d1"},next:{title:"Dropbox",permalink:"/docs/services/dropbox"}},m={},d=[],u={toc:d},k="wrapper";function b(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/xacrimon/dashmap"},"dashmap")," backend support."),(0,n.kt)(c,{components:a.components,mdxType:"Docs"}))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8fb00c63.55fa52da.js b/assets/js/8fb00c63.02174c0b.js similarity index 84% rename from assets/js/8fb00c63.55fa52da.js rename to assets/js/8fb00c63.02174c0b.js index 813f4a69c59c..2d6ebef1802d 100644 --- a/assets/js/8fb00c63.55fa52da.js +++ b/assets/js/8fb00c63.02174c0b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4600],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),u=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,f=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(f,i(i({ref:t},c),{},{components:a})):n.createElement(f,i({ref:t},c))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),s=a(3442),o=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const n=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,o._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[o,u]=f({queryString:a,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var k=a(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:a,selectedValue:s,selectValue:o,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==s&&(p(t),o(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",y.tabItem,i?.className,{"tabs__item--active":s===t})}),a??t)})))}function v(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},r.createElement(h,(0,n.Z)({},e,t)),r.createElement(v,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},4899:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>d,toc:()=>f});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function s(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"datafile"),": Set the path to the persy data file. The directory in the path must already exist."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"segment"),": Set the name of the persy segment."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"index"),": Set the name of the persy index.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"PersyBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Persy;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Persy::default();\n builder.datafile("./test.persy");\n builder.segment("data");\n builder.index("index");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}s.isMDXComponent=!0;var o=a(8750),u=a(5810);const c={title:"Persy"},p=void 0,d={unversionedId:"services/persy",id:"services/persy",title:"Persy",description:"Persy service support.",source:"@site/docs/services/persy.mdx",sourceDirName:"services",slug:"/services/persy",permalink:"/docs/services/persy",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/persy.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Persy"},sidebar:"docs",previous:{title:"OSS",permalink:"/docs/services/oss"},next:{title:"PostgreSQL",permalink:"/docs/services/postgresql"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function y(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://persy.rs/"},"Persy")," service support."),(0,r.kt)(s,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut config = HashMap::new();\n config.insert("datafile".to_string(), "./test.persy".to_string());\n config.insert("segment".to_string(), "data".to_string());\n config.insert("index".to_string(), "index".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Persy, config)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const config = {\n datafile: "./test.persy",\n segment: "data",\n index: "index"\n };\n const op = new Operator("persy", config);\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nconfig = {\n "datafile": "./test.persy",\n "segment": "data",\n "index": "index"\n}\n\nop = opendal.Operator("persy", **config)\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4600],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),u=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,f=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(f,i(i({ref:t},c),{},{components:a})):n.createElement(f,i({ref:t},c))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),s=a(3442),o=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const n=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,o._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[o,u]=f({queryString:a,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&s(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var k=a(5667);const y={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:a,selectedValue:s,selectValue:o,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==s&&(p(t),o(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",y.tabItem,i?.className,{"tabs__item--active":s===t})}),a??t)})))}function v(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},r.createElement(h,(0,n.Z)({},e,t)),r.createElement(v,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},4899:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>d,toc:()=>f});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function s(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"datafile"),": Set the path to the persy data file. The directory in the path must already exist."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"segment"),": Set the name of the persy segment."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"index"),": Set the name of the persy index.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"PersyBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Persy;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Persy::default();\n builder.datafile("./test.persy");\n builder.segment("data");\n builder.index("index");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}s.isMDXComponent=!0;var o=a(8750),u=a(5810);const c={title:"Persy"},p=void 0,d={unversionedId:"services/persy",id:"services/persy",title:"Persy",description:"Persy service support.",source:"@site/docs/services/persy.mdx",sourceDirName:"services",slug:"/services/persy",permalink:"/docs/services/persy",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/persy.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Persy"},sidebar:"docs",previous:{title:"OSS",permalink:"/docs/services/oss"},next:{title:"PostgreSQL",permalink:"/docs/services/postgresql"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function y(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://persy.rs/"},"Persy")," service support."),(0,r.kt)(s,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut config = HashMap::new();\n config.insert("datafile".to_string(), "./test.persy".to_string());\n config.insert("segment".to_string(), "data".to_string());\n config.insert("index".to_string(), "index".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Persy, config)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const config = {\n datafile: "./test.persy",\n segment: "data",\n index: "index"\n };\n const op = new Operator("persy", config);\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nconfig = {\n "datafile": "./test.persy",\n "segment": "data",\n "index": "index"\n}\n\nop = opendal.Operator("persy", **config)\n')))))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/939f74f6.560b3cdf.js b/assets/js/939f74f6.fae2644a.js similarity index 85% rename from assets/js/939f74f6.560b3cdf.js rename to assets/js/939f74f6.fae2644a.js index 59e670a9002f..29564c9da917 100644 --- a/assets/js/939f74f6.560b3cdf.js +++ b/assets/js/939f74f6.fae2644a.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4277],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=n.createContext({}),s=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=s(a),d=r,b=p["".concat(c,".").concat(d)]||p[d]||m[d]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=d;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var s=2;s{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),c=a(9356),s=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function m(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function d(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,c._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=m(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[c,s]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=c??p;return d({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),s(e),f(e)}),[s,f,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:c,tabValues:s}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),m=e=>{const t=e.currentTarget,a=u.indexOf(t),n=s[a].value;n!==o&&(p(t),c(n))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},s.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:d,onClick:m},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},6979:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>m,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the network address of memcached server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"default_ttl"),": Set the ttl for memcached service.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"MemcachedBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Memcached;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create memcached backend builder\n let mut builder = Memcached::default();\n\n builder.endpoint("tcp://127.0.0.1:11211");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var c=a(8750),s=a(5810);const u={title:"Memcached"},p=void 0,m={unversionedId:"services/memcached",id:"services/memcached",title:"Memcached",description:"Memcached service support.",source:"@site/docs/services/memcached.mdx",sourceDirName:"services",slug:"/services/memcached",permalink:"/docs/services/memcached",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/memcached.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Memcached"},sidebar:"docs",previous:{title:"LibSQL",permalink:"/docs/services/libsql"},next:{title:"Memory",permalink:"/docs/services/memory"}},d={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://memcached.org/"},"Memcached")," service support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(c.Z,{mdxType:"Tabs"},(0,r.kt)(s.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "tcp://127.0.0.1:11211".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Memcached, map)?;\n Ok(())\n}\n'))),(0,r.kt)(s.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("memcached", {\n endpoint: "tcp://127.0.0.1:11211",\n });\n}\n'))),(0,r.kt)(s.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("memcached",\n endpoint="tcp://127.0.0.1:11211",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4277],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=n.createContext({}),s=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=s(a),d=r,b=p["".concat(c,".").concat(d)]||p[d]||m[d]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=d;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var s=2;s{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),c=a(9356),s=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function m(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function d(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,c._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=m(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[c,s]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=c??p;return d({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),s(e),f(e)}),[s,f,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:c,tabValues:s}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),m=e=>{const t=e.currentTarget,a=u.indexOf(t),n=s[a].value;n!==o&&(p(t),c(n))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},s.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:d,onClick:m},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},6979:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>m,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the network address of memcached server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"default_ttl"),": Set the ttl for memcached service.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"MemcachedBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Memcached;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create memcached backend builder\n let mut builder = Memcached::default();\n\n builder.endpoint("tcp://127.0.0.1:11211");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var c=a(8750),s=a(5810);const u={title:"Memcached"},p=void 0,m={unversionedId:"services/memcached",id:"services/memcached",title:"Memcached",description:"Memcached service support.",source:"@site/docs/services/memcached.mdx",sourceDirName:"services",slug:"/services/memcached",permalink:"/docs/services/memcached",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/memcached.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Memcached"},sidebar:"docs",previous:{title:"LibSQL",permalink:"/docs/services/libsql"},next:{title:"Memory",permalink:"/docs/services/memory"}},d={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://memcached.org/"},"Memcached")," service support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(c.Z,{mdxType:"Tabs"},(0,r.kt)(s.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "tcp://127.0.0.1:11211".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Memcached, map)?;\n Ok(())\n}\n'))),(0,r.kt)(s.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("memcached", {\n endpoint: "tcp://127.0.0.1:11211",\n });\n}\n'))),(0,r.kt)(s.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("memcached",\n endpoint="tcp://127.0.0.1:11211",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a0405932.3c0491e5.js b/assets/js/a0405932.049de26a.js similarity index 84% rename from assets/js/a0405932.3c0491e5.js rename to assets/js/a0405932.049de26a.js index 3d78e96f7830..ef7ea37c5939 100644 --- a/assets/js/a0405932.3c0491e5.js +++ b/assets/js/a0405932.049de26a.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[716],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),c=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,k=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(k,s(s({ref:t},u),{},{components:n})):a.createElement(k,s({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,s=new Array(l);s[0]=m;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i[p]="string"==typeof e?e:r,s[1]=i;for(var c=2;c{n.d(t,{Z:()=>s});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function s(e){let{children:t,hidden:n,className:s}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,s),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),s=n(3053),i=n(3442),o=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,o._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[s,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[o,c]=k({queryString:n,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),f=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:s,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),b(e)}),[c,b,l]),tabValues:l}}var f=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:n,selectedValue:i,selectValue:o,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,s.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==i&&(p(t),o(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:s}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},s,{className:(0,l.Z)("tabs__item",h.tabItem,s?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(y,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},2343:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},s="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(s,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Customizable endpoint setting"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"access_key_id"),": Set the access_key_id for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"secret_access_key"),": Set the secret_access_key for backend.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"CosBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Cos;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Cos::default();\n\n // set the storage bucket for OpenDAL\n builder.bucket("test");\n // set the endpoint for OpenDAL\n builder.endpoint("https://cos.ap-singapore.myqcloud.com");\n // Set the access_key_id and secret_access_key.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.secret_id("secret_id");\n builder.secret_key("secret_access_key");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}i.isMDXComponent=!0;var o=n(8750),c=n(5810);const u={title:"COS"},p=void 0,d={unversionedId:"services/cos",id:"services/cos",title:"COS",description:"Huawei Cloud COS services support.",source:"@site/docs/services/cos.mdx",sourceDirName:"services",slug:"/services/cos",permalink:"/docs/services/cos",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/cos.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"COS"},sidebar:"docs",previous:{title:"Cacache",permalink:"/docs/services/cacache"},next:{title:"D1",permalink:"/docs/services/d1"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},f="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Huawei Cloud COS services support."),(0,r.kt)(i,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("bucket".to_string(), "test".to_string());\n map.insert("endpoint".to_string(), "https://cos.ap-singapore.myqcloud.com".to_string());\n map.insert("secret_id".to_string(), "secret_id".to_string());\n map.insert("secret_key".to_string(), "secret_access_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Cos, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("cos", {\n bucket: "test",\n endpoint: "https://cos.ap-singapore.myqcloud.com",\n secret_id: "secret_id",\n secret_key: "secret_access_key",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("cos",\n bucket="test",\n endpoint="https://cos.ap-singapore.myqcloud.com",\n secret_id="secret_id",\n secret_key="secret_access_key",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[716],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),c=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,k=p["".concat(o,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(k,s(s({ref:t},u),{},{components:n})):a.createElement(k,s({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,s=new Array(l);s[0]=m;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i[p]="string"==typeof e?e:r,s[1]=i;for(var c=2;c{n.d(t,{Z:()=>s});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function s(e){let{children:t,hidden:n,className:s}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,s),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),s=n(3053),i=n(3442),o=n(9356),c=n(4634),u=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,o._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[s,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[o,c]=k({queryString:n,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),f=(()=>{const e=o??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:s,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),b(e)}),[c,b,l]),tabValues:l}}var f=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:n,selectedValue:i,selectValue:o,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,s.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==i&&(p(t),o(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:s}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},s,{className:(0,l.Z)("tabs__item",h.tabItem,s?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(y,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},2343:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},s="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(s,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"bucket"),": Set the container name for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Customizable endpoint setting"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"access_key_id"),": Set the access_key_id for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"secret_access_key"),": Set the secret_access_key for backend.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"CosBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Cos;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Cos::default();\n\n // set the storage bucket for OpenDAL\n builder.bucket("test");\n // set the endpoint for OpenDAL\n builder.endpoint("https://cos.ap-singapore.myqcloud.com");\n // Set the access_key_id and secret_access_key.\n //\n // OpenDAL will try load credential from the env.\n // If credential not set and no valid credential in env, OpenDAL will\n // send request without signing like anonymous user.\n builder.secret_id("secret_id");\n builder.secret_key("secret_access_key");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}i.isMDXComponent=!0;var o=n(8750),c=n(5810);const u={title:"COS"},p=void 0,d={unversionedId:"services/cos",id:"services/cos",title:"COS",description:"Huawei Cloud COS services support.",source:"@site/docs/services/cos.mdx",sourceDirName:"services",slug:"/services/cos",permalink:"/docs/services/cos",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/cos.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"COS"},sidebar:"docs",previous:{title:"Cacache",permalink:"/docs/services/cacache"},next:{title:"D1",permalink:"/docs/services/d1"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},f="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Huawei Cloud COS services support."),(0,r.kt)(i,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("bucket".to_string(), "test".to_string());\n map.insert("endpoint".to_string(), "https://cos.ap-singapore.myqcloud.com".to_string());\n map.insert("secret_id".to_string(), "secret_id".to_string());\n map.insert("secret_key".to_string(), "secret_access_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Cos, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("cos", {\n bucket: "test",\n endpoint: "https://cos.ap-singapore.myqcloud.com",\n secret_id: "secret_id",\n secret_key: "secret_access_key",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("cos",\n bucket="test",\n endpoint="https://cos.ap-singapore.myqcloud.com",\n secret_id="secret_id",\n secret_key="secret_access_key",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b114cefa.32ae26c4.js b/assets/js/b114cefa.32ae26c4.js new file mode 100644 index 000000000000..bef8bfbbdfcf --- /dev/null +++ b/assets/js/b114cefa.32ae26c4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2161],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>b});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(b,o(o({ref:t},c),{},{components:n})):a.createElement(b,o({ref:t},c))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var u=2;u{n.d(t,{Z:()=>o});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),o=n(3053),i=n(3442),s=n(9356),u=n(4634),c=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:n,groupId:a}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&i(k)}),[k]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=n(5667);const v={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=u[n].value;a!==i&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",v.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function y(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",v.tabList)},r.createElement(h,(0,a.Z)({},e,t)),r.createElement(y,(0,a.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},6619:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>v,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Notes",id:"notes",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"notes"},"Notes"),(0,r.kt)("p",null,"Currently, only OneDrive Personal is supported."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"access_token"),": set the access_token for Graph API"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"OnedriveBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Onedrive;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Onedrive::default();\n\n builder.access_token("xxx").root("/path/to/root");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=n(8750),u=n(5810);const c={title:"OneDrive"},p=void 0,d={unversionedId:"services/onedrive",id:"services/onedrive",title:"OneDrive",description:"OneDrive services support.",source:"@site/docs/services/onedrive.mdx",sourceDirName:"services",slug:"/services/onedrive",permalink:"/docs/services/onedrive",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/onedrive.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"OneDrive"},sidebar:"docs",previous:{title:"Obs",permalink:"/docs/services/obs"},next:{title:"OSS",permalink:"/docs/services/oss"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function v(e){let{components:t,...n}=e;return(0,r.kt)(k,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://onedrive.com"},"OneDrive")," services support."),(0,r.kt)(i,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("access_token".to_string(), "your_access_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Onedrive, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("onedrive", {\n root: "/path/to/dir",\n access_token: "your_access_token",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("onedrive",\n root="/path/to/dir",\n access_token="your_access_token",\n)\n')))))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b114cefa.59bcc56a.js b/assets/js/b114cefa.59bcc56a.js deleted file mode 100644 index f7ff23335e6b..000000000000 --- a/assets/js/b114cefa.59bcc56a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2161],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>b});var r=n(9496);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),m=a,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return n?r.createElement(b,o(o({ref:t},c),{},{components:n})):r.createElement(b,o({ref:t},c))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,o[1]=i;for(var u=2;u{n.d(t,{Z:()=>o});var r=n(9496),a=n(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:n,className:o}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,o),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(8126),a=n(9496),l=n(5924),o=n(3053),i=n(3442),s=n(9356),u=n(4634),c=n(6038);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function d(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,l=d(e),[o,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:n,groupId:r}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:r}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{k&&i(k)}),[k]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=n(5667);const v={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==i&&(p(t),s(r))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:o}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",v.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function y(e){let{lazy:t,children:n,selectedValue:r}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function g(e){const t=f(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",v.tabList)},a.createElement(h,(0,r.Z)({},e,t)),a.createElement(y,(0,r.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return a.createElement(g,(0,r.Z)({key:String(t)},e))}},6619:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>v,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var r=n(8126),a=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Notes",id:"notes",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(o,(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"capabilities"},"Capabilities"),(0,a.kt)("p",null,"This service can be used to:"),(0,a.kt)("ul",{className:"contains-task-list"},(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,a.kt)("del",{parentName:"li"},"scan")),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,a.kt)("del",{parentName:"li"},"presign")),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,a.kt)("h2",{id:"notes"},"Notes"),(0,a.kt)("p",null,"Currently, only OneDrive Personal is supported."),(0,a.kt)("h2",{id:"configuration"},"Configuration"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"access_token"),": set the access_token for Graph API"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend")),(0,a.kt)("p",null,"You can refer to ","[",(0,a.kt)("inlineCode",{parentName:"p"},"OnedriveBuilder"),"]","'s docs for more information"),(0,a.kt)("h2",{id:"example"},"Example"),(0,a.kt)("h3",{id:"via-builder"},"Via Builder"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Onedrive;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Onedrive::default();\n\n builder.access_token("xxx").root("/path/to/root");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=n(8750),u=n(5810);const c={title:"OneDrive"},p=void 0,d={unversionedId:"services/onedrive",id:"services/onedrive",title:"OneDrive",description:"OneDrive services support.",source:"@site/docs/services/onedrive.mdx",sourceDirName:"services",slug:"/services/onedrive",permalink:"/docs/services/onedrive",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/onedrive.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"OneDrive"},sidebar:"docs",previous:{title:"Obs",permalink:"/docs/services/obs"},next:{title:"OSS",permalink:"/docs/services/oss"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function v(e){let{components:t,...n}=e;return(0,a.kt)(k,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://onedrive.com"},"OneDrive")," services support."),(0,a.kt)(i,{components:n.components,mdxType:"Docs"}),(0,a.kt)("h3",{id:"via-config"},"Via Config"),(0,a.kt)(s.Z,{mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("access_token".to_string(), "your_access_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Onedrive, map)?;\n Ok(())\n}\n'))),(0,a.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("onedrive", {\n root: "/path/to/dir",\n access_token: "your_access_token",\n });\n}\n'))),(0,a.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("onedrive",\n root="/path/to/dir",\n access_token="your_access_token",\n)\n')))))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b56f9725.49de58c5.js b/assets/js/b56f9725.c79979b0.js similarity index 83% rename from assets/js/b56f9725.49de58c5.js rename to assets/js/b56f9725.c79979b0.js index e5becee7fdd4..a78eb409fdf7 100644 --- a/assets/js/b56f9725.49de58c5.js +++ b/assets/js/b56f9725.c79979b0.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[217],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,f=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(f,i(i({ref:t},c),{},{components:a})):n.createElement(f,i({ref:t},c))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=f({queryString:a,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},1258:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>f});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"write")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"create_dir")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"delete")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"copy")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"rename")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Customizable endpoint setting")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"IpfsBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Ipfs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Ipfs::default();\n\n // set the endpoint for OpenDAL\n builder.endpoint("https://ipfs.io");\n // set the root for OpenDAL\n builder.root("/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"IPFS"},p=void 0,d={unversionedId:"services/ipfs",id:"services/ipfs",title:"IPFS",description:"IPFS file system support based on IPFS HTTP Gateway.",source:"@site/docs/services/ipfs.mdx",sourceDirName:"services",slug:"/services/ipfs",permalink:"/docs/services/ipfs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/ipfs.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"IPFS"},sidebar:"docs",previous:{title:"Hugging Face",permalink:"/docs/services/huggingface"},next:{title:"IPMFS",permalink:"/docs/services/ipmfs"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"IPFS file system support based on ",(0,r.kt)("a",{parentName:"p",href:"https://docs.ipfs.tech/concepts/ipfs-gateway/"},"IPFS HTTP Gateway"),"."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "https://ipfs.io".to_string());\n map.insert("root".to_string(), "/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Ipfs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("ipfs", {\n endpoint: "https://ipfs.io",\n root: "/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("ipfs",\n endpoint="https://ipfs.io",\n root="/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[217],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,f=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(f,i(i({ref:t},c),{},{components:a})):n.createElement(f,i({ref:t},c))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=f({queryString:a,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},1258:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>f});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"write")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"create_dir")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"delete")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"copy")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"rename")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","presign"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Customizable endpoint setting")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"IpfsBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Ipfs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Ipfs::default();\n\n // set the endpoint for OpenDAL\n builder.endpoint("https://ipfs.io");\n // set the root for OpenDAL\n builder.root("/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"IPFS"},p=void 0,d={unversionedId:"services/ipfs",id:"services/ipfs",title:"IPFS",description:"IPFS file system support based on IPFS HTTP Gateway.",source:"@site/docs/services/ipfs.mdx",sourceDirName:"services",slug:"/services/ipfs",permalink:"/docs/services/ipfs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/ipfs.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"IPFS"},sidebar:"docs",previous:{title:"Hugging Face",permalink:"/docs/services/huggingface"},next:{title:"IPMFS",permalink:"/docs/services/ipmfs"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"IPFS file system support based on ",(0,r.kt)("a",{parentName:"p",href:"https://docs.ipfs.tech/concepts/ipfs-gateway/"},"IPFS HTTP Gateway"),"."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "https://ipfs.io".to_string());\n map.insert("root".to_string(), "/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Ipfs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("ipfs", {\n endpoint: "https://ipfs.io",\n root: "/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("ipfs",\n endpoint="https://ipfs.io",\n root="/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/bb5b2057.2c831502.js b/assets/js/bb5b2057.a672d192.js similarity index 84% rename from assets/js/bb5b2057.2c831502.js rename to assets/js/bb5b2057.a672d192.js index 65b014541927..a301ca8bccf0 100644 --- a/assets/js/bb5b2057.2c831502.js +++ b/assets/js/bb5b2057.a672d192.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5214],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(k,i(i({ref:t},c),{},{components:n})):a.createElement(k,i({ref:t},c))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{n.d(t,{Z:()=>i});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),i=n(3053),o=n(3442),s=n(9356),u=n(4634),c=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:n}=e;const a=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,u]=k({queryString:n,groupId:a}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),b=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{b&&o(b)}),[b]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var b=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:n,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=u[n].value;a!==o&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(y,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,b.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},8828:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>k});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...n}=e;return(0,r.kt)(i,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","append"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for connection. The format is same as ",(0,r.kt)("inlineCode",{parentName:"li"},"openssh"),", using either ",(0,r.kt)("inlineCode",{parentName:"li"},"[user@]hostname")," or ",(0,r.kt)("inlineCode",{parentName:"li"},"ssh://[user@]hostname[:port]"),". A username or port that is specified in the endpoint overrides the one set in the builder (but does not change the builder)."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend. It uses the default directory set by the remote ",(0,r.kt)("inlineCode",{parentName:"li"},"sftp-server")," as default"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"user"),": Set the login user"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key"),": Set the public key for login"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"known_hosts_strategy"),": Set the strategy for known hosts, default to ",(0,r.kt)("inlineCode",{parentName:"li"},"Strict")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"enable_copy"),": Set whether the remote server has copy-file extension")),(0,r.kt)("p",null,"For security reasons, it doesn't support password login, you can use public key or ssh-copy-id instead."),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"SftpBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Sftp;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Sftp::default();\n\n builder.endpoint("127.0.0.1").user("test").key("test_key");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=n(8750),u=n(5810);const c={title:"SFTP"},p=void 0,d={unversionedId:"services/sftp",id:"services/sftp",title:"SFTP",description:"SFTP services support. (only works on unix)",source:"@site/docs/services/sftp.mdx",sourceDirName:"services",slug:"/services/sftp",permalink:"/docs/services/sftp",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/sftp.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"SFTP"},sidebar:"docs",previous:{title:"S3",permalink:"/docs/services/s3"},next:{title:"Sled",permalink:"/docs/services/sled"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],f={toc:k},b="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(b,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"SFTP services support. (only works on unix)"),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Maximum number of file holdings is depending on the remote system configuration."),(0,r.kt)("p",{parentName:"admonition"},"For example, the default value is 255 in macOS, and 1024 in linux. If you want to open\nlots of files, you should pay attention to close the file after using it.")),(0,r.kt)(o,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "127.0.0.1".to_string());\n map.insert("user".to_string(), "test".to_string());\n map.insert("key".to_string(), "test_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Sftp, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("sftp", {\n endpoint: "127.0.0.1",\n user: "test",\n key: "test_key",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("sftp",\n endpoint="127.0.0.1",\n user="test",\n key="test_key",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5214],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(k,i(i({ref:t},c),{},{components:n})):a.createElement(k,i({ref:t},c))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{n.d(t,{Z:()=>i});var a=n(9496),r=n(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),l=n(5924),i=n(3053),o=n(3442),s=n(9356),u=n(4634),c=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:n}=e;const a=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,u]=k({queryString:n,groupId:a}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),b=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{b&&o(b)}),[b]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var b=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function y(e){let{className:t,block:n,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=u[n].value;a!==o&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(y,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,b.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},8828:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>k});var a=n(8126),r=(n(9496),n(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...n}=e;return(0,r.kt)(i,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","append"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for connection. The format is same as ",(0,r.kt)("inlineCode",{parentName:"li"},"openssh"),", using either ",(0,r.kt)("inlineCode",{parentName:"li"},"[user@]hostname")," or ",(0,r.kt)("inlineCode",{parentName:"li"},"ssh://[user@]hostname[:port]"),". A username or port that is specified in the endpoint overrides the one set in the builder (but does not change the builder)."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend. It uses the default directory set by the remote ",(0,r.kt)("inlineCode",{parentName:"li"},"sftp-server")," as default"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"user"),": Set the login user"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key"),": Set the public key for login"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"known_hosts_strategy"),": Set the strategy for known hosts, default to ",(0,r.kt)("inlineCode",{parentName:"li"},"Strict")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"enable_copy"),": Set whether the remote server has copy-file extension")),(0,r.kt)("p",null,"For security reasons, it doesn't support password login, you can use public key or ssh-copy-id instead."),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"SftpBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Sftp;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Sftp::default();\n\n builder.endpoint("127.0.0.1").user("test").key("test_key");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=n(8750),u=n(5810);const c={title:"SFTP"},p=void 0,d={unversionedId:"services/sftp",id:"services/sftp",title:"SFTP",description:"SFTP services support. (only works on unix)",source:"@site/docs/services/sftp.mdx",sourceDirName:"services",slug:"/services/sftp",permalink:"/docs/services/sftp",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/sftp.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"SFTP"},sidebar:"docs",previous:{title:"S3",permalink:"/docs/services/s3"},next:{title:"Sled",permalink:"/docs/services/sled"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],f={toc:k},b="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(b,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"SFTP services support. (only works on unix)"),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Maximum number of file holdings is depending on the remote system configuration."),(0,r.kt)("p",{parentName:"admonition"},"For example, the default value is 255 in macOS, and 1024 in linux. If you want to open\nlots of files, you should pay attention to close the file after using it.")),(0,r.kt)(o,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "127.0.0.1".to_string());\n map.insert("user".to_string(), "test".to_string());\n map.insert("key".to_string(), "test_key".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Sftp, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("sftp", {\n endpoint: "127.0.0.1",\n user: "test",\n key: "test_key",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("sftp",\n endpoint="127.0.0.1",\n user="test",\n key="test_key",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c0600a1b.44ab92a8.js b/assets/js/c0600a1b.caef7777.js similarity index 82% rename from assets/js/c0600a1b.44ab92a8.js rename to assets/js/c0600a1b.caef7777.js index 9d4bdc6afc5e..ec710f7f4778 100644 --- a/assets/js/c0600a1b.44ab92a8.js +++ b/assets/js/c0600a1b.caef7777.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[8874],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},c),{},{components:a})):n.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function y(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:a,groupId:n}),[p,y]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),y(e)}),[u,y,l]),tabValues:l}}var f=a(5667);const k={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",k.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function h(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=y(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",k.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(h,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},7586:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>k,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string of mysql server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"table"),": Set the table of mysql"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of mysql"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of mysql")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Mysql;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Mysql::default();\n builder.root("/");\n builder.connection_string("mysql://you_username:your_password@127.0.0.1:5432/your_database");\n builder.table("your_table");\n // key field type in the table should be compatible with Rust\'s &str like text\n builder.key_field("key");\n // value field type in the table should be compatible with Rust\'s Vec like bytea\n builder.value_field("value");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"MySQL"},p=void 0,d={unversionedId:"services/mysql",id:"services/mysql",title:"MySQL",description:"MySQL services support.",source:"@site/docs/services/mysql.mdx",sourceDirName:"services",slug:"/services/mysql",permalink:"/docs/services/mysql",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/mysql.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"MySQL"},sidebar:"docs",previous:{title:"MongoDB",permalink:"/docs/services/mongodb"},next:{title:"Obs",permalink:"/docs/services/obs"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],y={toc:b},f="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.mysql.com/"},"MySQL")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Mysql;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("connection_string".to_string(), "mysql://you_username:your_password@127.0.0.1:5432/your_database".to_string());\n map.insert("table".to_string(), "your_table".to_string());\n map.insert("key_field".to_string(), "your_key_field".to_string());\n map.insert("value_field".to_string(), "your_value_field".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Mysql, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"mysql\", {\n connection_string: 'mysql://you_username:your_password@127.0.0.1:5432/your_database',\n table: 'your_table',\n key_field: 'your_key_field',\n value_field: 'your_value_field',\n });\n}\n"))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("mysql", {\n "connection_string": "mysql://you_username:your_password@127.0.0.1:5432/your_database",\n "table": "your_table",\n "key_field": "your_key_field",\n "value_field": "your_value_field",\n})\n')))))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[8874],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},c),{},{components:a})):n.createElement(b,i({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function y(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=b({queryString:a,groupId:n}),[p,y]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),y(e)}),[u,y,l]),tabValues:l}}var f=a(5667);const k={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",k.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function h(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=y(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",k.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(h,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},7586:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>k,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"connection_string"),": Set the connection string of mysql server"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"table"),": Set the table of mysql"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_field"),": Set the key field of mysql"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"value_field"),": Set the value field of mysql")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Mysql;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Mysql::default();\n builder.root("/");\n builder.connection_string("mysql://you_username:your_password@127.0.0.1:5432/your_database");\n builder.table("your_table");\n // key field type in the table should be compatible with Rust\'s &str like text\n builder.key_field("key");\n // value field type in the table should be compatible with Rust\'s Vec like bytea\n builder.value_field("value");\n\n let op = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"MySQL"},p=void 0,d={unversionedId:"services/mysql",id:"services/mysql",title:"MySQL",description:"MySQL services support.",source:"@site/docs/services/mysql.mdx",sourceDirName:"services",slug:"/services/mysql",permalink:"/docs/services/mysql",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/mysql.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"MySQL"},sidebar:"docs",previous:{title:"MongoDB",permalink:"/docs/services/mongodb"},next:{title:"Obs",permalink:"/docs/services/obs"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],y={toc:b},f="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.mysql.com/"},"MySQL")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Mysql;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n \n let mut map = HashMap::new();\n map.insert("connection_string".to_string(), "mysql://you_username:your_password@127.0.0.1:5432/your_database".to_string());\n map.insert("table".to_string(), "your_table".to_string());\n map.insert("key_field".to_string(), "your_key_field".to_string());\n map.insert("value_field".to_string(), "your_value_field".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Mysql, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Operator } from require('opendal');\n\nasync function main() {\n const op = new Operator(\"mysql\", {\n connection_string: 'mysql://you_username:your_password@127.0.0.1:5432/your_database',\n table: 'your_table',\n key_field: 'your_key_field',\n value_field: 'your_value_field',\n });\n}\n"))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("mysql", {\n "connection_string": "mysql://you_username:your_password@127.0.0.1:5432/your_database",\n "table": "your_table",\n "key_field": "your_key_field",\n "value_field": "your_value_field",\n})\n')))))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c46c6b55.f2ce15fd.js b/assets/js/c46c6b55.4c1f6eb0.js similarity index 84% rename from assets/js/c46c6b55.f2ce15fd.js rename to assets/js/c46c6b55.4c1f6eb0.js index 2b1fdf1decc1..f4d6f7c13879 100644 --- a/assets/js/c46c6b55.f2ce15fd.js +++ b/assets/js/c46c6b55.4c1f6eb0.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5927],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function k(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:a,groupId:n}),[p,k]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),k(e)}),[c,k,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},729:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoints"),": Set the network address of etcd servers"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"username"),": Set the username of Etcd"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"password"),": Set the password for authentication"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ca_path"),": Set the ca path to the etcd connection"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"cert_path"),": Set the cert path to the etcd connection"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_path"),": Set the key path to the etcd connection")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"EtcdBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},"use anyhow::Result;\nuse opendal::services::Etcd;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Etcd::default();\n\n // this will build a Operator accessing etcd which runs on http://127.0.0.1:2379\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n")))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"Etcd"},p=void 0,d={unversionedId:"services/etcd",id:"services/etcd",title:"Etcd",description:"Etcd services support.",source:"@site/docs/services/etcd.mdx",sourceDirName:"services",slug:"/services/etcd",permalink:"/docs/services/etcd",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/etcd.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Etcd"},sidebar:"docs",previous:{title:"Dropbox",permalink:"/docs/services/dropbox"},next:{title:"FoundationDB",permalink:"/docs/services/foundationdb"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://etcd.io/"},"Etcd")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("endpoints".to_string(), "http://127.0.0.1:2379".to_string());\n map.insert("username".to_string(), "your_username".to_string());\n map.insert("password".to_string(), "your_password".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Etcd, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("etcd", {\n root: "/path/to/dir",\n endpoint: "http://127.0.0.1:2379",\n username: "your_username",\n password: "your_password",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("etcd",\n root="/path/to/dir",\n endpoint="http://127.0.0.1:2379",\n username="your_username",\n password="your_password",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[5927],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function k(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:a,groupId:n}),[p,k]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),k(e)}),[c,k,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},729:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoints"),": Set the network address of etcd servers"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"username"),": Set the username of Etcd"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"password"),": Set the password for authentication"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ca_path"),": Set the ca path to the etcd connection"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"cert_path"),": Set the cert path to the etcd connection"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"key_path"),": Set the key path to the etcd connection")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"EtcdBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},"use anyhow::Result;\nuse opendal::services::Etcd;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Etcd::default();\n\n // this will build a Operator accessing etcd which runs on http://127.0.0.1:2379\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n")))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"Etcd"},p=void 0,d={unversionedId:"services/etcd",id:"services/etcd",title:"Etcd",description:"Etcd services support.",source:"@site/docs/services/etcd.mdx",sourceDirName:"services",slug:"/services/etcd",permalink:"/docs/services/etcd",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/etcd.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Etcd"},sidebar:"docs",previous:{title:"Dropbox",permalink:"/docs/services/dropbox"},next:{title:"FoundationDB",permalink:"/docs/services/foundationdb"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://etcd.io/"},"Etcd")," services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("endpoints".to_string(), "http://127.0.0.1:2379".to_string());\n map.insert("username".to_string(), "your_username".to_string());\n map.insert("password".to_string(), "your_password".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Etcd, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("etcd", {\n root: "/path/to/dir",\n endpoint: "http://127.0.0.1:2379",\n username: "your_username",\n password: "your_password",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("etcd",\n root="/path/to/dir",\n endpoint="http://127.0.0.1:2379",\n username="your_username",\n password="your_password",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c6ab695b.8c41f546.js b/assets/js/c6ab695b.53f5eeda.js similarity index 87% rename from assets/js/c6ab695b.8c41f546.js rename to assets/js/c6ab695b.53f5eeda.js index 6949b5508666..fb1c71a6f668 100644 --- a/assets/js/c6ab695b.8c41f546.js +++ b/assets/js/c6ab695b.53f5eeda.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[7289],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=u(a),m=r,h=d["".concat(s,".").concat(m)]||d[m]||p[m]||i;return a?n.createElement(h,l(l({ref:t},c),{},{components:a})):n.createElement(h,l({ref:t},c))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[d]="string"==typeof e?e:r,l[1]=o;for(var u=2;u{a.d(t,{Z:()=>l});var n=a(9496),r=a(5924);const i={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:a,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,l),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>w});var n=a(8126),r=a(9496),i=a(5924),l=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function d(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function p(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??d(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),i=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(n.location.search);t.set(i,e),n.replace({...n.location,search:t.toString()})}),[i,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,i=p(e),[l,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:i}))),[s,u]=h({queryString:a,groupId:n}),[d,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,i]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&i.set(e)}),[a,i])]}({groupId:n}),b=(()=>{const e=s??d;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{b&&o(b)}),[b]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),f(e)}),[u,f,i]),tabValues:i}}var b=a(5667);const k={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,l.o5)(),p=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(d(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:l}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},l,{className:(0,i.Z)("tabs__item",k.tabItem,l?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const i=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",k.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function w(e){const t=(0,b.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},7540:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>d,default:()=>k,frontMatter:()=>c,metadata:()=>p,toc:()=>h});var n=a(8126),r=(a(9496),a(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Differences with HDFS",id:"differences-with-hdfs",level:2},{value:"WebHDFS Compatibility Guidelines",id:"webhdfs-compatibility-guidelines",level:2},{value:"File Creation and Write",id:"file-creation-and-write",level:3},{value:"Multi-Write Support",id:"multi-write-support",level:3},{value:"Configurations",id:"configurations",level:2},{value:"Examples",id:"examples",level:2},{value:"Via Builder",id:"via-builder",level:3}]},l="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(l,(0,n.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"There two implementations of WebHDFS REST API:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Native via HDFS Namenode and Datanode, data are transferred between nodes directly."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://hadoop.apache.org/docs/stable/hadoop-hdfs-httpfs/index.html"},"HttpFS")," is a gateway before hdfs nodes, data are proxied.")),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"differences-with-hdfs"},"Differences with HDFS"),(0,r.kt)("p",null,"[Hdfs][crate::services::Hdfs]"," is powered by HDFS's native java client. Users need to set up the HDFS services correctly. But webhdfs can access from HTTP API and no extra setup needed."),(0,r.kt)("h2",{id:"webhdfs-compatibility-guidelines"},"WebHDFS Compatibility Guidelines"),(0,r.kt)("h3",{id:"file-creation-and-write"},"File Creation and Write"),(0,r.kt)("p",null,"For ",(0,r.kt)("a",{parentName:"p",href:"https://hadoop.apache.org/docs/r3.1.3/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Create_and_Write_to_a_File"},"File creation and write")," operations,\nOpenDAL WebHDFS is optimized for Hadoop Distributed File System (HDFS) versions 2.9 and later.\nThis involves two API calls in webhdfs, where the initial ",(0,r.kt)("inlineCode",{parentName:"p"},"put")," call to the namenode is redirected to the datanode handling the file data.\nThe optional ",(0,r.kt)("inlineCode",{parentName:"p"},"noredirect")," flag can be set to prevent redirection. If used, the API response body contains the datanode URL, which is then utilized for the subsequent ",(0,r.kt)("inlineCode",{parentName:"p"},"put")," call with the actual file data.\nOpenDAL automatically sets the ",(0,r.kt)("inlineCode",{parentName:"p"},"noredirect")," flag with the first ",(0,r.kt)("inlineCode",{parentName:"p"},"put")," call. This feature is supported starting from HDFS version 2.9."),(0,r.kt)("h3",{id:"multi-write-support"},"Multi-Write Support"),(0,r.kt)("p",null,"OpenDAL WebHDFS supports multi-write operations by creating temporary files in the specified ",(0,r.kt)("inlineCode",{parentName:"p"},"atomic_write_dir"),".\nThe final concatenation of these temporary files occurs when the writer is closed.\nHowever, it's essential to be aware of HDFS concat restrictions for earlier versions,\nwhere the target file must not be empty, and its last block must be full. Due to these constraints, the concat operation might fail for HDFS 2.6.\nThis issue, identified as ",(0,r.kt)("a",{parentName:"p",href:"https://issues.apache.org/jira/browse/HDFS-6641"},"HDFS-6641"),", has been addressed in later versions of HDFS."),(0,r.kt)("p",null,"In summary, OpenDAL WebHDFS is designed for optimal compatibility with HDFS, specifically versions 2.9 and later."),(0,r.kt)("h2",{id:"configurations"},"Configurations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": The root path of the WebHDFS service."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of the WebHDFS service."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"delegation"),": The delegation token for WebHDFS."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"atomic_write_dir"),": The tmp write dir of multi write for WebHDFS.Needs to be configured for multi write support.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"Builder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"examples"},"Examples"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Webhdfs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Webhdfs::default();\n // set the root for WebHDFS, all operations will happen under this root\n //\n // Note:\n // if the root is not exists, the builder will automatically create the\n // root directory for you\n // if the root exists and is a directory, the builder will continue working\n // if the root exists and is a folder, the builder will fail on building backend\n builder.root("/path/to/dir");\n // set the endpoint of webhdfs namenode, controlled by dfs.namenode.http-address\n // default is http://127.0.0.1:9870\n builder.endpoint("http://127.0.0.1:9870");\n // set the delegation_token for builder\n builder.delegation("delegation_token");\n // set atomic_write_dir for builder\n builder.atomic_write_dir(".opendal_tmp/");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"WebHDFS"},d=void 0,p={unversionedId:"services/webhdfs",id:"services/webhdfs",title:"WebHDFS",description:"WebHDFS's REST API support.",source:"@site/docs/services/webhdfs.mdx",sourceDirName:"services",slug:"/services/webhdfs",permalink:"/docs/services/webhdfs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/webhdfs.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"WebHDFS"},sidebar:"docs",previous:{title:"WebDAV",permalink:"/docs/services/webdav"}},m={},h=[{value:"Via Config",id:"via-config",level:3}],f={toc:h},b="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(b,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/WebHDFS.html"},"WebHDFS"),"'s REST API support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "http://127.0.0.1:9870".to_string());\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("delegation".to_string(), "delegation_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Webhdfs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("webhdfs", {\n endpoint: "http://127.0.0.1:9870",\n root: "/path/to/dir",\n delegation: "delegation_token",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("webhdfs",\n endpoint="http://127.0.0.1:9870",\n root="/path/to/dir",\n delegation="delegation_token",\n)\n')))))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[7289],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=u(a),m=r,h=d["".concat(s,".").concat(m)]||d[m]||p[m]||i;return a?n.createElement(h,l(l({ref:t},c),{},{components:a})):n.createElement(h,l({ref:t},c))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[d]="string"==typeof e?e:r,l[1]=o;for(var u=2;u{a.d(t,{Z:()=>l});var n=a(9496),r=a(5924);const i={tabItem:"tabItem_mw14"};function l(e){let{children:t,hidden:a,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,l),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>w});var n=a(8126),r=a(9496),i=a(5924),l=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function d(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function p(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??d(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),i=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(n.location.search);t.set(i,e),n.replace({...n.location,search:t.toString()})}),[i,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,i=p(e),[l,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:i}))),[s,u]=h({queryString:a,groupId:n}),[d,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,i]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&i.set(e)}),[a,i])]}({groupId:n}),b=(()=>{const e=s??d;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{b&&o(b)}),[b]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),f(e)}),[u,f,i]),tabValues:i}}var b=a(5667);const k={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,l.o5)(),p=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(d(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:l}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},l,{className:(0,i.Z)("tabs__item",k.tabItem,l?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const i=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",k.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function w(e){const t=(0,b.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},7540:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>d,default:()=>k,frontMatter:()=>c,metadata:()=>p,toc:()=>h});var n=a(8126),r=(a(9496),a(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Differences with HDFS",id:"differences-with-hdfs",level:2},{value:"WebHDFS Compatibility Guidelines",id:"webhdfs-compatibility-guidelines",level:2},{value:"File Creation and Write",id:"file-creation-and-write",level:3},{value:"Multi-Write Support",id:"multi-write-support",level:3},{value:"Configurations",id:"configurations",level:2},{value:"Examples",id:"examples",level:2},{value:"Via Builder",id:"via-builder",level:3}]},l="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(l,(0,n.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"There two implementations of WebHDFS REST API:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Native via HDFS Namenode and Datanode, data are transferred between nodes directly."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://hadoop.apache.org/docs/stable/hadoop-hdfs-httpfs/index.html"},"HttpFS")," is a gateway before hdfs nodes, data are proxied.")),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"differences-with-hdfs"},"Differences with HDFS"),(0,r.kt)("p",null,"[Hdfs][crate::services::Hdfs]"," is powered by HDFS's native java client. Users need to set up the HDFS services correctly. But webhdfs can access from HTTP API and no extra setup needed."),(0,r.kt)("h2",{id:"webhdfs-compatibility-guidelines"},"WebHDFS Compatibility Guidelines"),(0,r.kt)("h3",{id:"file-creation-and-write"},"File Creation and Write"),(0,r.kt)("p",null,"For ",(0,r.kt)("a",{parentName:"p",href:"https://hadoop.apache.org/docs/r3.1.3/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Create_and_Write_to_a_File"},"File creation and write")," operations,\nOpenDAL WebHDFS is optimized for Hadoop Distributed File System (HDFS) versions 2.9 and later.\nThis involves two API calls in webhdfs, where the initial ",(0,r.kt)("inlineCode",{parentName:"p"},"put")," call to the namenode is redirected to the datanode handling the file data.\nThe optional ",(0,r.kt)("inlineCode",{parentName:"p"},"noredirect")," flag can be set to prevent redirection. If used, the API response body contains the datanode URL, which is then utilized for the subsequent ",(0,r.kt)("inlineCode",{parentName:"p"},"put")," call with the actual file data.\nOpenDAL automatically sets the ",(0,r.kt)("inlineCode",{parentName:"p"},"noredirect")," flag with the first ",(0,r.kt)("inlineCode",{parentName:"p"},"put")," call. This feature is supported starting from HDFS version 2.9."),(0,r.kt)("h3",{id:"multi-write-support"},"Multi-Write Support"),(0,r.kt)("p",null,"OpenDAL WebHDFS supports multi-write operations by creating temporary files in the specified ",(0,r.kt)("inlineCode",{parentName:"p"},"atomic_write_dir"),".\nThe final concatenation of these temporary files occurs when the writer is closed.\nHowever, it's essential to be aware of HDFS concat restrictions for earlier versions,\nwhere the target file must not be empty, and its last block must be full. Due to these constraints, the concat operation might fail for HDFS 2.6.\nThis issue, identified as ",(0,r.kt)("a",{parentName:"p",href:"https://issues.apache.org/jira/browse/HDFS-6641"},"HDFS-6641"),", has been addressed in later versions of HDFS."),(0,r.kt)("p",null,"In summary, OpenDAL WebHDFS is designed for optimal compatibility with HDFS, specifically versions 2.9 and later."),(0,r.kt)("h2",{id:"configurations"},"Configurations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": The root path of the WebHDFS service."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": The endpoint of the WebHDFS service."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"delegation"),": The delegation token for WebHDFS."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"atomic_write_dir"),": The tmp write dir of multi write for WebHDFS.Needs to be configured for multi write support.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"Builder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"examples"},"Examples"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Webhdfs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Webhdfs::default();\n // set the root for WebHDFS, all operations will happen under this root\n //\n // Note:\n // if the root is not exists, the builder will automatically create the\n // root directory for you\n // if the root exists and is a directory, the builder will continue working\n // if the root exists and is a folder, the builder will fail on building backend\n builder.root("/path/to/dir");\n // set the endpoint of webhdfs namenode, controlled by dfs.namenode.http-address\n // default is http://127.0.0.1:9870\n builder.endpoint("http://127.0.0.1:9870");\n // set the delegation_token for builder\n builder.delegation("delegation_token");\n // set atomic_write_dir for builder\n builder.atomic_write_dir(".opendal_tmp/");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"WebHDFS"},d=void 0,p={unversionedId:"services/webhdfs",id:"services/webhdfs",title:"WebHDFS",description:"WebHDFS's REST API support.",source:"@site/docs/services/webhdfs.mdx",sourceDirName:"services",slug:"/services/webhdfs",permalink:"/docs/services/webhdfs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/webhdfs.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"WebHDFS"},sidebar:"docs",previous:{title:"WebDAV",permalink:"/docs/services/webdav"}},m={},h=[{value:"Via Config",id:"via-config",level:3}],f={toc:h},b="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(b,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/WebHDFS.html"},"WebHDFS"),"'s REST API support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "http://127.0.0.1:9870".to_string());\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("delegation".to_string(), "delegation_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Webhdfs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("webhdfs", {\n endpoint: "http://127.0.0.1:9870",\n root: "/path/to/dir",\n delegation: "delegation_token",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("webhdfs",\n endpoint="http://127.0.0.1:9870",\n root="/path/to/dir",\n delegation="delegation_token",\n)\n')))))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/cc62039a.621bca3e.js b/assets/js/cc62039a.ff84ee63.js similarity index 90% rename from assets/js/cc62039a.621bca3e.js rename to assets/js/cc62039a.ff84ee63.js index ffb8aa332509..2139c0e1421e 100644 --- a/assets/js/cc62039a.621bca3e.js +++ b/assets/js/cc62039a.ff84ee63.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1011],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,h=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(h,i(i({ref:t},c),{},{components:a})):n.createElement(h,i({ref:t},c))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>y});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=h({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=a(5667);const b={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",b.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function N(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",b.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(N,(0,n.Z)({},e,t)))}function y(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},434:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>b,frontMatter:()=>c,metadata:()=>d,toc:()=>h});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Differences with webhdfs",id:"differences-with-webhdfs",level:2},{value:"Features",id:"features",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Environment",id:"environment",level:2},{value:"macOS Specific Note",id:"macos-specific-note",level:3},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"A distributed file system that provides high-throughput access to application data."),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","append")),(0,r.kt)("h2",{id:"differences-with-webhdfs"},"Differences with webhdfs"),(0,r.kt)("p",null,"[Webhdfs][crate::services::Webhdfs]"," is powered by hdfs's RESTful HTTP API."),(0,r.kt)("h2",{id:"features"},"Features"),(0,r.kt)("p",null,"HDFS support needs to enable feature ",(0,r.kt)("inlineCode",{parentName:"p"},"services-hdfs"),"."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"name_node"),": Set the name node for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"kerberos_ticket_cache_path"),": Set the kerberos ticket cache path for backend, this should be gotten by ",(0,r.kt)("inlineCode",{parentName:"li"},"klist")," after ",(0,r.kt)("inlineCode",{parentName:"li"},"kinit")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"user"),": Set the user for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"enable_append"),": enable the append capacity. Default is false. ")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"HdfsBuilder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"environment"},"Environment"),(0,r.kt)("p",null,"HDFS needs some environment set correctly."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"JAVA_HOME"),": the path to java home, could be found via ",(0,r.kt)("inlineCode",{parentName:"li"},"java -XshowSettings:properties -version")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"HADOOP_HOME"),": the path to hadoop home, opendal relays on this env to discover hadoop jars and set ",(0,r.kt)("inlineCode",{parentName:"li"},"CLASSPATH")," automatically.")),(0,r.kt)("p",null,"Most of the time, setting ",(0,r.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"HADOOP_HOME")," is enough. But there are some edge cases:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"If meeting errors like the following:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory\n")),(0,r.kt)("p",null,"Java's lib are not including in pkg-config find path, please set ",(0,r.kt)("inlineCode",{parentName:"p"},"LD_LIBRARY_PATH"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"export LD_LIBRARY_PATH=${JAVA_HOME}/lib/server:${LD_LIBRARY_PATH}\n")),(0,r.kt)("p",null,"The path of ",(0,r.kt)("inlineCode",{parentName:"p"},"libjvm.so")," could be different, please keep an eye on it."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"If meeting errors like the following:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"(unable to get stack trace for java.lang.NoClassDefFoundError exception: ExceptionUtils::getStackTrace error.)\n")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"CLASSPATH")," is not set correctly or your hadoop installation is incorrect."),(0,r.kt)("p",null,"To set ",(0,r.kt)("inlineCode",{parentName:"p"},"CLASSPATH"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"export CLASSPATH=$(find $HADOOP_HOME -iname \"*.jar\" | xargs echo | tr ' ' ':'):${CLASSPATH}\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"If HDFS has High Availability (HA) enabled with multiple available NameNodes, some configuration is required:")),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Obtain the entire HDFS config folder (usually located at HADOOP_HOME/etc/hadoop)."),(0,r.kt)("li",{parentName:"ol"},"Set the environment variable HADOOP_CONF_DIR to the path of this folder.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"export HADOOP_CONF_DIR=\n")),(0,r.kt)("ol",{start:3},(0,r.kt)("li",{parentName:"ol"},"Append the HADOOP_CONF_DIR to the ",(0,r.kt)("inlineCode",{parentName:"li"},"CLASSPATH"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"export CLASSPATH=$HADOOP_CONF_DIR:$HADOOP_CLASSPATH:$CLASSPATH\n")),(0,r.kt)("ol",{start:4},(0,r.kt)("li",{parentName:"ol"},"Use the ",(0,r.kt)("inlineCode",{parentName:"li"},"cluster_name")," specified in the ",(0,r.kt)("inlineCode",{parentName:"li"},"core-site.xml")," file (located in the HADOOP_CONF_DIR folder) to replace namenode:port.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'builder.name_node("hdfs://cluster_name");\n')),(0,r.kt)("h3",{id:"macos-specific-note"},"macOS Specific Note"),(0,r.kt)("p",null,"If you encounter an issue during the build process on macOS with an error message similar to:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"ld: unknown file type in $HADOOP_HOME/lib/native/libhdfs.so.0.0.0\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\n")),(0,r.kt)("p",null,"This error is likely due to the fact that the official Hadoop build includes the libhdfs.so file for the x86-64 architecture, which is not compatible with aarch64 architecture required for MacOS."),(0,r.kt)("p",null,"To resolve this issue, you can add hdrs as a dependency in your Rust application's Cargo.toml file, and enable the vendored feature:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-toml"},'[dependencies]\nhdrs = { version = "", features = ["vendored"] }\n')),(0,r.kt)("p",null,"Enabling the vendored feature ensures that hdrs includes the necessary libhdfs.so library built for the correct architecture."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Hdfs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create fs backend builder.\n let mut builder = Hdfs::default();\n // Set the name node for hdfs.\n // If the string starts with a protocol type such as file://, hdfs://, or gs://, this protocol type will be used.\n builder.name_node("hdfs://127.0.0.1:9000");\n // Set the root for hdfs, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/tmp");\n \n // Enable the append capacity for hdfs. \n // \n // Note: HDFS run in non-distributed mode doesn\'t support append.\n builder.enable_append(true);\n\n // `Accessor` provides the low level APIs, we will use `Operator` normally.\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"HDFS"},p=void 0,d={unversionedId:"services/hdfs",id:"services/hdfs",title:"HDFS",description:"Hadoop Distributed File System (HDFS\u2122) support.",source:"@site/docs/services/hdfs.mdx",sourceDirName:"services",slug:"/services/hdfs",permalink:"/docs/services/hdfs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/hdfs.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"HDFS"},sidebar:"docs",previous:{title:"Gridfs",permalink:"/docs/services/gridfs"},next:{title:"HTTP",permalink:"/docs/services/http"}},m={},h=[{value:"Via Config",id:"via-config",level:3}],f={toc:h},k="wrapper";function b(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://hadoop.apache.org/"},"Hadoop Distributed File System (HDFS\u2122)")," support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("name_node".to_string(), "hdfs://127.0.0.1:9000".to_string());\n map.insert("root".to_string(), "/tmp".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Hdfs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("hdfs", {\n name_node: "hdfs://127.0.0.1:9000",\n root: "/tmp",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("hdfs",\n name_node="hdfs://127.0.0.1:9000",\n root="/tmp",\n)\n')))))}b.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[1011],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,h=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(h,i(i({ref:t},c),{},{components:a})):n.createElement(h,i({ref:t},c))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>y});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=h({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),f(e)}),[u,f,l]),tabValues:l}}var k=a(5667);const b={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",b.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function N(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",b.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(N,(0,n.Z)({},e,t)))}function y(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},434:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>b,frontMatter:()=>c,metadata:()=>d,toc:()=>h});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Differences with webhdfs",id:"differences-with-webhdfs",level:2},{value:"Features",id:"features",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Environment",id:"environment",level:2},{value:"macOS Specific Note",id:"macos-specific-note",level:3},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"A distributed file system that provides high-throughput access to application data."),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","append")),(0,r.kt)("h2",{id:"differences-with-webhdfs"},"Differences with webhdfs"),(0,r.kt)("p",null,"[Webhdfs][crate::services::Webhdfs]"," is powered by hdfs's RESTful HTTP API."),(0,r.kt)("h2",{id:"features"},"Features"),(0,r.kt)("p",null,"HDFS support needs to enable feature ",(0,r.kt)("inlineCode",{parentName:"p"},"services-hdfs"),"."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work dir for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"name_node"),": Set the name node for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"kerberos_ticket_cache_path"),": Set the kerberos ticket cache path for backend, this should be gotten by ",(0,r.kt)("inlineCode",{parentName:"li"},"klist")," after ",(0,r.kt)("inlineCode",{parentName:"li"},"kinit")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"user"),": Set the user for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"enable_append"),": enable the append capacity. Default is false. ")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"HdfsBuilder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"environment"},"Environment"),(0,r.kt)("p",null,"HDFS needs some environment set correctly."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"JAVA_HOME"),": the path to java home, could be found via ",(0,r.kt)("inlineCode",{parentName:"li"},"java -XshowSettings:properties -version")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"HADOOP_HOME"),": the path to hadoop home, opendal relays on this env to discover hadoop jars and set ",(0,r.kt)("inlineCode",{parentName:"li"},"CLASSPATH")," automatically.")),(0,r.kt)("p",null,"Most of the time, setting ",(0,r.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"HADOOP_HOME")," is enough. But there are some edge cases:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"If meeting errors like the following:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory\n")),(0,r.kt)("p",null,"Java's lib are not including in pkg-config find path, please set ",(0,r.kt)("inlineCode",{parentName:"p"},"LD_LIBRARY_PATH"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"export LD_LIBRARY_PATH=${JAVA_HOME}/lib/server:${LD_LIBRARY_PATH}\n")),(0,r.kt)("p",null,"The path of ",(0,r.kt)("inlineCode",{parentName:"p"},"libjvm.so")," could be different, please keep an eye on it."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"If meeting errors like the following:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"(unable to get stack trace for java.lang.NoClassDefFoundError exception: ExceptionUtils::getStackTrace error.)\n")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"CLASSPATH")," is not set correctly or your hadoop installation is incorrect."),(0,r.kt)("p",null,"To set ",(0,r.kt)("inlineCode",{parentName:"p"},"CLASSPATH"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"export CLASSPATH=$(find $HADOOP_HOME -iname \"*.jar\" | xargs echo | tr ' ' ':'):${CLASSPATH}\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"If HDFS has High Availability (HA) enabled with multiple available NameNodes, some configuration is required:")),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Obtain the entire HDFS config folder (usually located at HADOOP_HOME/etc/hadoop)."),(0,r.kt)("li",{parentName:"ol"},"Set the environment variable HADOOP_CONF_DIR to the path of this folder.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"export HADOOP_CONF_DIR=\n")),(0,r.kt)("ol",{start:3},(0,r.kt)("li",{parentName:"ol"},"Append the HADOOP_CONF_DIR to the ",(0,r.kt)("inlineCode",{parentName:"li"},"CLASSPATH"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"export CLASSPATH=$HADOOP_CONF_DIR:$HADOOP_CLASSPATH:$CLASSPATH\n")),(0,r.kt)("ol",{start:4},(0,r.kt)("li",{parentName:"ol"},"Use the ",(0,r.kt)("inlineCode",{parentName:"li"},"cluster_name")," specified in the ",(0,r.kt)("inlineCode",{parentName:"li"},"core-site.xml")," file (located in the HADOOP_CONF_DIR folder) to replace namenode:port.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'builder.name_node("hdfs://cluster_name");\n')),(0,r.kt)("h3",{id:"macos-specific-note"},"macOS Specific Note"),(0,r.kt)("p",null,"If you encounter an issue during the build process on macOS with an error message similar to:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"ld: unknown file type in $HADOOP_HOME/lib/native/libhdfs.so.0.0.0\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\n")),(0,r.kt)("p",null,"This error is likely due to the fact that the official Hadoop build includes the libhdfs.so file for the x86-64 architecture, which is not compatible with aarch64 architecture required for MacOS."),(0,r.kt)("p",null,"To resolve this issue, you can add hdrs as a dependency in your Rust application's Cargo.toml file, and enable the vendored feature:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-toml"},'[dependencies]\nhdrs = { version = "", features = ["vendored"] }\n')),(0,r.kt)("p",null,"Enabling the vendored feature ensures that hdrs includes the necessary libhdfs.so library built for the correct architecture."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Hdfs;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create fs backend builder.\n let mut builder = Hdfs::default();\n // Set the name node for hdfs.\n // If the string starts with a protocol type such as file://, hdfs://, or gs://, this protocol type will be used.\n builder.name_node("hdfs://127.0.0.1:9000");\n // Set the root for hdfs, all operations will happen under this root.\n //\n // NOTE: the root must be absolute path.\n builder.root("/tmp");\n \n // Enable the append capacity for hdfs. \n // \n // Note: HDFS run in non-distributed mode doesn\'t support append.\n builder.enable_append(true);\n\n // `Accessor` provides the low level APIs, we will use `Operator` normally.\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"HDFS"},p=void 0,d={unversionedId:"services/hdfs",id:"services/hdfs",title:"HDFS",description:"Hadoop Distributed File System (HDFS\u2122) support.",source:"@site/docs/services/hdfs.mdx",sourceDirName:"services",slug:"/services/hdfs",permalink:"/docs/services/hdfs",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/hdfs.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"HDFS"},sidebar:"docs",previous:{title:"Gridfs",permalink:"/docs/services/gridfs"},next:{title:"HTTP",permalink:"/docs/services/http"}},m={},h=[{value:"Via Config",id:"via-config",level:3}],f={toc:h},k="wrapper";function b(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://hadoop.apache.org/"},"Hadoop Distributed File System (HDFS\u2122)")," support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("name_node".to_string(), "hdfs://127.0.0.1:9000".to_string());\n map.insert("root".to_string(), "/tmp".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Hdfs, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("hdfs", {\n name_node: "hdfs://127.0.0.1:9000",\n root: "/tmp",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("hdfs",\n name_node="hdfs://127.0.0.1:9000",\n root="/tmp",\n)\n')))))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d3c0d8d5.08792998.js b/assets/js/d3c0d8d5.ffdfbe35.js similarity index 84% rename from assets/js/d3c0d8d5.08792998.js rename to assets/js/d3c0d8d5.ffdfbe35.js index 1fecc056c929..cfcb7de642a9 100644 --- a/assets/js/d3c0d8d5.08792998.js +++ b/assets/js/d3c0d8d5.ffdfbe35.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4790],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var k=a(5667);const v={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",v.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",v.tabList)},r.createElement(h,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},5529:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>v,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Notes",id:"notes",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"notes"},"Notes"),(0,r.kt)("p",null,"Bazel Remote Caching and Ccache HTTP Storage is also part of this service.\nUsers can use ",(0,r.kt)("inlineCode",{parentName:"p"},"webdav")," to connect those services."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": set the endpoint for webdav"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"WebdavBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Webdav;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Webdav::default();\n\n builder.endpoint("127.0.0.1");\n builder.username("xxx");\n builder.password("xxx");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"WebDAV"},p=void 0,d={unversionedId:"services/webdav",id:"services/webdav",title:"WebDAV",description:"WebDAV backend support.",source:"@site/docs/services/webdav.mdx",sourceDirName:"services",slug:"/services/webdav",permalink:"/docs/services/webdav",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/webdav.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"WebDAV"},sidebar:"docs",previous:{title:"Vercel Artifacts",permalink:"/docs/services/vercel_artifacts"},next:{title:"WebHDFS",permalink:"/docs/services/webhdfs"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function v(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://datatracker.ietf.org/doc/html/rfc4918"},"WebDAV")," backend support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "127.0.0.1".to_string());\n map.insert("username".to_string(), "xxx".to_string());\n map.insert("password".to_string(), "xxx".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Webdav, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("webdav", {\n endpoint: "127.0.0.1",\n username: "xxx",\n password: "xxx",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("webdav",\n endpoint="127.0.0.1",\n username="xxx",\n password="xxx",\n)\n')))))}v.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4790],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var k=a(5667);const v={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",v.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",v.tabList)},r.createElement(h,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},5529:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>v,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Notes",id:"notes",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"notes"},"Notes"),(0,r.kt)("p",null,"Bazel Remote Caching and Ccache HTTP Storage is also part of this service.\nUsers can use ",(0,r.kt)("inlineCode",{parentName:"p"},"webdav")," to connect those services."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": set the endpoint for webdav"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"WebdavBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Webdav;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create backend builder\n let mut builder = Webdav::default();\n\n builder.endpoint("127.0.0.1");\n builder.username("xxx");\n builder.password("xxx");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"WebDAV"},p=void 0,d={unversionedId:"services/webdav",id:"services/webdav",title:"WebDAV",description:"WebDAV backend support.",source:"@site/docs/services/webdav.mdx",sourceDirName:"services",slug:"/services/webdav",permalink:"/docs/services/webdav",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/webdav.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"WebDAV"},sidebar:"docs",previous:{title:"Vercel Artifacts",permalink:"/docs/services/vercel_artifacts"},next:{title:"WebHDFS",permalink:"/docs/services/webhdfs"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],f={toc:b},k="wrapper";function v(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://datatracker.ietf.org/doc/html/rfc4918"},"WebDAV")," backend support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "127.0.0.1".to_string());\n map.insert("username".to_string(), "xxx".to_string());\n map.insert("password".to_string(), "xxx".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Webdav, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("webdav", {\n endpoint: "127.0.0.1",\n username: "xxx",\n password: "xxx",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("webdav",\n endpoint="127.0.0.1",\n username="xxx",\n password="xxx",\n)\n')))))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ddccef4c.92f66ee2.js b/assets/js/ddccef4c.33d34d8d.js similarity index 85% rename from assets/js/ddccef4c.92f66ee2.js rename to assets/js/ddccef4c.33d34d8d.js index b64b02a0f4b5..9397309f0d28 100644 --- a/assets/js/ddccef4c.92f66ee2.js +++ b/assets/js/ddccef4c.33d34d8d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[9826],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>k});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(k,i(i({ref:t},c),{},{components:a})):n.createElement(k,i({ref:t},c))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=k({queryString:a,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},5268:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>k});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Notes",id:"notes",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"write")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"create_dir")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"delete")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"copy")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"rename")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"notes"},"Notes"),(0,r.kt)("p",null,"Only ",(0,r.kt)("inlineCode",{parentName:"p"},"read")," ans ",(0,r.kt)("inlineCode",{parentName:"p"},"stat")," are supported. We can use this service to visit any\nHTTP Server like nginx, caddy."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": set the endpoint for http"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"HttpBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Http;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create http backend builder\n let mut builder = Http::default();\n\n builder.endpoint("127.0.0.1");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"HTTP"},p=void 0,d={unversionedId:"services/http",id:"services/http",title:"HTTP",description:"HTTP Read-only service support like Nginx and Caddy.",source:"@site/docs/services/http.mdx",sourceDirName:"services",slug:"/services/http",permalink:"/docs/services/http",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/http.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"HTTP"},sidebar:"docs",previous:{title:"HDFS",permalink:"/docs/services/hdfs"},next:{title:"Hugging Face",permalink:"/docs/services/huggingface"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"HTTP Read-only service support like ",(0,r.kt)("a",{parentName:"p",href:"https://www.nginx.com/"},"Nginx")," and ",(0,r.kt)("a",{parentName:"p",href:"https://caddyserver.com/"},"Caddy"),"."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "127.0.0.1".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Http, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("http", {\n endpoint: "127.0.0.1",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("http",\n endpoint="127.0.0.1",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[9826],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>k});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(k,i(i({ref:t},c),{},{components:a})):n.createElement(k,i({ref:t},c))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=k({queryString:a,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},5268:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>k});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Notes",id:"notes",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"write")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"create_dir")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"delete")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"copy")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"rename")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"notes"},"Notes"),(0,r.kt)("p",null,"Only ",(0,r.kt)("inlineCode",{parentName:"p"},"read")," ans ",(0,r.kt)("inlineCode",{parentName:"p"},"stat")," are supported. We can use this service to visit any\nHTTP Server like nginx, caddy."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": set the endpoint for http"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"HttpBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Http;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // create http backend builder\n let mut builder = Http::default();\n\n builder.endpoint("127.0.0.1");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"HTTP"},p=void 0,d={unversionedId:"services/http",id:"services/http",title:"HTTP",description:"HTTP Read-only service support like Nginx and Caddy.",source:"@site/docs/services/http.mdx",sourceDirName:"services",slug:"/services/http",permalink:"/docs/services/http",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/http.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"HTTP"},sidebar:"docs",previous:{title:"HDFS",permalink:"/docs/services/hdfs"},next:{title:"Hugging Face",permalink:"/docs/services/huggingface"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],b={toc:k},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"HTTP Read-only service support like ",(0,r.kt)("a",{parentName:"p",href:"https://www.nginx.com/"},"Nginx")," and ",(0,r.kt)("a",{parentName:"p",href:"https://caddyserver.com/"},"Caddy"),"."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "127.0.0.1".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Http, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\nasync function main() {\n const op = new Operator("http", {\n endpoint: "127.0.0.1",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\nop = opendal.Operator("http",\n endpoint="127.0.0.1",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e892cec6.7e5de66d.js b/assets/js/e892cec6.f0305c4d.js similarity index 86% rename from assets/js/e892cec6.7e5de66d.js rename to assets/js/e892cec6.f0305c4d.js index afbae7e02911..5e5286504932 100644 --- a/assets/js/e892cec6.7e5de66d.js +++ b/assets/js/e892cec6.f0305c4d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[3845],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,f=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(f,i(i({ref:t},c),{},{components:a})):n.createElement(f,i({ref:t},c))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=f({queryString:a,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},3790:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>f});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for connection"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"user"),": Set the login user"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"password"),": Set the login password")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"FtpBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Ftp;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Ftp::default();\n\n builder.endpoint("127.0.0.1");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"FTP"},p=void 0,d={unversionedId:"services/ftp",id:"services/ftp",title:"FTP",description:"FTP and FTPS services support.",source:"@site/docs/services/ftp.mdx",sourceDirName:"services",slug:"/services/ftp",permalink:"/docs/services/ftp",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/ftp.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"FTP"},sidebar:"docs",previous:{title:"Fs",permalink:"/docs/services/fs"},next:{title:"Gcs",permalink:"/docs/services/gcs"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"FTP and FTPS services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "127.0.0.1".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Ftp, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("ftp", {\n endpoint: "127.0.0.1",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("ftp",\n endpoint="127.0.0.1",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[3845],{9613:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(a),m=r,f=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(f,i(i({ref:t},c),{},{components:a})):n.createElement(f,i({ref:t},c))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),u=a(4634),c=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=f({queryString:a,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var k=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},u.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,n.Z)({key:String(t)},e))}},3790:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>f});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint"),": Set the endpoint for connection"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"user"),": Set the login user"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"password"),": Set the login password")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"FtpBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Ftp;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Ftp::default();\n\n builder.endpoint("127.0.0.1");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),u=a(5810);const c={title:"FTP"},p=void 0,d={unversionedId:"services/ftp",id:"services/ftp",title:"FTP",description:"FTP and FTPS services support.",source:"@site/docs/services/ftp.mdx",sourceDirName:"services",slug:"/services/ftp",permalink:"/docs/services/ftp",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/ftp.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"FTP"},sidebar:"docs",previous:{title:"Fs",permalink:"/docs/services/fs"},next:{title:"Gcs",permalink:"/docs/services/gcs"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"FTP and FTPS services support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("endpoint".to_string(), "127.0.0.1".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Ftp, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("ftp", {\n endpoint: "127.0.0.1",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("ftp",\n endpoint="127.0.0.1",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/eec267e4.67033eae.js b/assets/js/eec267e4.81118d8b.js similarity index 83% rename from assets/js/eec267e4.67033eae.js rename to assets/js/eec267e4.81118d8b.js index 82dc84b15b98..274564c136d2 100644 --- a/assets/js/eec267e4.67033eae.js +++ b/assets/js/eec267e4.81118d8b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2217],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>g});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,g=p["".concat(s,".").concat(m)]||p[m]||d[m]||i;return a?n.createElement(g,o(o({ref:t},u),{},{components:a})):n.createElement(g,o({ref:t},u))}));function g(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,o=new Array(i);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,o[1]=l;for(var c=2;c{a.d(t,{Z:()=>o});var n=a(9496),r=a(5924);const i={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:a,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,o),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),i=a(5924),o=a(3053),l=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function g(e){let{queryString:t=!1,groupId:a}=e;const n=(0,l.k6)(),i=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(n.location.search);t.set(i,e),n.replace({...n.location,search:t.toString()})}),[i,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,i=d(e),[o,l]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:i}))),[s,c]=g({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,i]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&i.set(e)}),[a,i])]}({groupId:n}),h=(()=>{const e=s??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{h&&l(h)}),[h]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),f(e)}),[c,f,i]),tabValues:i}}var h=a(5667);const k={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function b(e){let{className:t,block:a,selectedValue:l,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==l&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:o}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:l===t?0:-1,"aria-selected":l===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},o,{className:(0,i.Z)("tabs__item",k.tabItem,o?.className,{"tabs__item--active":l===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const i=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function v(e){const t=f(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",k.tabList)},r.createElement(b,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,h.Z)();return r.createElement(v,(0,n.Z)({key:String(t)},e))}},7287:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>k,frontMatter:()=>u,metadata:()=>d,toc:()=>g});var n=a(8126),r=(a(9496),a(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configurations",id:"configurations",level:2},{value:"Examples",id:"examples",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function l(e){let{components:t,...a}=e;return(0,r.kt)(o,(0,n.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This service will visit the ",(0,r.kt)("a",{parentName:"p",href:"https://huggingface.co/docs/huggingface_hub/package_reference/hf_api"},"Huggingface API")," to access the Huggingface File System.\nCurrently, we only support the ",(0,r.kt)("inlineCode",{parentName:"p"},"model")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"dataset")," types of repositories, and operations are limited to reading and listing/stating."),(0,r.kt)("p",null,"Huggingface doesn't host official HTTP API docs. Detailed HTTP request API information can be found on the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/huggingface/huggingface_hub"},(0,r.kt)("inlineCode",{parentName:"a"},"huggingface_hub")," Source Code"),"."),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configurations"},"Configurations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"repo_type"),": The type of the repository."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"repo_id"),": The id of the repository."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"revision"),": The revision of the repository."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token"),": The token for accessing the repository.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"HuggingfaceBuilder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"examples"},"Examples"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Huggingface;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create Huggingface backend builder\n let mut builder = Huggingface::default();\n \n // set the type of Huggingface repository\n builder.repo_type("dataset");\n // set the id of Huggingface repository\n builder.repo_id("databricks/databricks-dolly-15k");\n // set the revision of Huggingface repository\n builder.revision("main");\n // set the root for Huggingface, all operations will happen under this root\n builder.root("/path/to/dir");\n // set the token for accessing the repository\n builder.token("access_token");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}l.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"Hugging Face"},p=void 0,d={unversionedId:"services/huggingface",id:"services/huggingface",title:"Hugging Face",description:"Hugging Face services support.",source:"@site/docs/services/huggingface.mdx",sourceDirName:"services",slug:"/services/huggingface",permalink:"/docs/services/huggingface",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/huggingface.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Hugging Face"},sidebar:"docs",previous:{title:"HTTP",permalink:"/docs/services/http"},next:{title:"IPFS",permalink:"/docs/services/ipfs"}},m={},g=[{value:"Via Config",id:"via-config",level:3}],f={toc:g},h="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(h,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi"},"Hugging Face")," services support."),(0,r.kt)(l,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n\n map.insert("repo_type".to_string(), "dataset".to_string());\n map.insert("repo_id".to_string(), "databricks/databricks-dolly-15k".to_string());\n map.insert("revision".to_string(), "main".to_string());\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("token".to_string(), "access_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Huggingface, map)?;\n\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n // Use `huggingface` or `hf` for scheme name\n const op = new Operator("huggingface", {\n repo_type: "dataset",\n repo_id: "databricks/databricks-dolly-15k",\n revision: "main",\n root: "/path/to/dir",\n token: "access_token",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\n# Use `huggingface` or `hf` for scheme name\nop = opendal.Operator("huggingface",\n repo_type="dataset",\n repo_id="databricks/databricks-dolly-15k",\n revision="main",\n root: "/path/to/dir",\n token: "access_token",\n)\n')))))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[2217],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>g});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,g=p["".concat(s,".").concat(m)]||p[m]||d[m]||i;return a?n.createElement(g,o(o({ref:t},u),{},{components:a})):n.createElement(g,o({ref:t},u))}));function g(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,o=new Array(i);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,o[1]=l;for(var c=2;c{a.d(t,{Z:()=>o});var n=a(9496),r=a(5924);const i={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:a,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,o),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(8126),r=a(9496),i=a(5924),o=a(3053),l=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function g(e){let{queryString:t=!1,groupId:a}=e;const n=(0,l.k6)(),i=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(n.location.search);t.set(i,e),n.replace({...n.location,search:t.toString()})}),[i,n])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,i=d(e),[o,l]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:i}))),[s,c]=g({queryString:a,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,i]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&i.set(e)}),[a,i])]}({groupId:n}),h=(()=>{const e=s??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{h&&l(h)}),[h]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),f(e)}),[c,f,i]),tabValues:i}}var h=a(5667);const k={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function b(e){let{className:t,block:a,selectedValue:l,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==l&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:o}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:l===t?0:-1,"aria-selected":l===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},o,{className:(0,i.Z)("tabs__item",k.tabItem,o?.className,{"tabs__item--active":l===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const i=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function v(e){const t=f(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",k.tabList)},r.createElement(b,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function N(e){const t=(0,h.Z)();return r.createElement(v,(0,n.Z)({key:String(t)},e))}},7287:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>k,frontMatter:()=>u,metadata:()=>d,toc:()=>g});var n=a(8126),r=(a(9496),a(9613));const i={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configurations",id:"configurations",level:2},{value:"Examples",id:"examples",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function l(e){let{components:t,...a}=e;return(0,r.kt)(o,(0,n.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This service will visit the ",(0,r.kt)("a",{parentName:"p",href:"https://huggingface.co/docs/huggingface_hub/package_reference/hf_api"},"Huggingface API")," to access the Huggingface File System.\nCurrently, we only support the ",(0,r.kt)("inlineCode",{parentName:"p"},"model")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"dataset")," types of repositories, and operations are limited to reading and listing/stating."),(0,r.kt)("p",null,"Huggingface doesn't host official HTTP API docs. Detailed HTTP request API information can be found on the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/huggingface/huggingface_hub"},(0,r.kt)("inlineCode",{parentName:"a"},"huggingface_hub")," Source Code"),"."),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"scan")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"configurations"},"Configurations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"repo_type"),": The type of the repository."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"repo_id"),": The id of the repository."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"revision"),": The revision of the repository."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token"),": The token for accessing the repository.")),(0,r.kt)("p",null,"Refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"HuggingfaceBuilder"),"]","'s public API docs for more information."),(0,r.kt)("h2",{id:"examples"},"Examples"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use std::sync::Arc;\n\nuse anyhow::Result;\nuse opendal::services::Huggingface;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n // Create Huggingface backend builder\n let mut builder = Huggingface::default();\n \n // set the type of Huggingface repository\n builder.repo_type("dataset");\n // set the id of Huggingface repository\n builder.repo_id("databricks/databricks-dolly-15k");\n // set the revision of Huggingface repository\n builder.revision("main");\n // set the root for Huggingface, all operations will happen under this root\n builder.root("/path/to/dir");\n // set the token for accessing the repository\n builder.token("access_token");\n\n let op: Operator = Operator::new(builder)?.finish();\n\n Ok(())\n}\n')))}l.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"Hugging Face"},p=void 0,d={unversionedId:"services/huggingface",id:"services/huggingface",title:"Hugging Face",description:"Hugging Face services support.",source:"@site/docs/services/huggingface.mdx",sourceDirName:"services",slug:"/services/huggingface",permalink:"/docs/services/huggingface",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/huggingface.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Hugging Face"},sidebar:"docs",previous:{title:"HTTP",permalink:"/docs/services/http"},next:{title:"IPFS",permalink:"/docs/services/ipfs"}},m={},g=[{value:"Via Config",id:"via-config",level:3}],f={toc:g},h="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(h,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi"},"Hugging Face")," services support."),(0,r.kt)(l,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n\n map.insert("repo_type".to_string(), "dataset".to_string());\n map.insert("repo_id".to_string(), "databricks/databricks-dolly-15k".to_string());\n map.insert("revision".to_string(), "main".to_string());\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("token".to_string(), "access_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Huggingface, map)?;\n\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n // Use `huggingface` or `hf` for scheme name\n const op = new Operator("huggingface", {\n repo_type: "dataset",\n repo_id: "databricks/databricks-dolly-15k",\n revision: "main",\n root: "/path/to/dir",\n token: "access_token",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\n# Use `huggingface` or `hf` for scheme name\nop = opendal.Operator("huggingface",\n repo_type="dataset",\n repo_id="databricks/databricks-dolly-15k",\n revision="main",\n root: "/path/to/dir",\n token: "access_token",\n)\n')))))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f1ca5a39.b31952c1.js b/assets/js/f1ca5a39.c5ac8d5a.js similarity index 87% rename from assets/js/f1ca5a39.b31952c1.js rename to assets/js/f1ca5a39.c5ac8d5a.js index 62b12fefd836..40d560adcc81 100644 --- a/assets/js/f1ca5a39.b31952c1.js +++ b/assets/js/f1ca5a39.c5ac8d5a.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4538],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>g});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function k(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:a,groupId:n}),[p,k]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),k(e)}),[c,k,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function N(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function g(e){const t=(0,f.Z)();return r.createElement(N,(0,n.Z)({key:String(t)},e))}},4418:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Note",id:"note",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"note"},"Note"),(0,r.kt)("p",null,"OpenDAL will build rocksdb from source by default."),(0,r.kt)("p",null,"To link with existing rocksdb lib, please set one of the following:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ROCKSDB_LIB_DIR")," to the dir that contains ",(0,r.kt)("inlineCode",{parentName:"li"},"librocksdb.so")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ROCKSDB_STATIC")," to the dir that contains ",(0,r.kt)("inlineCode",{parentName:"li"},"librocksdb.a"))),(0,r.kt)("p",null,"If the version of RocksDB is below 6.0, you may encounter compatibility\nissues. It is advisable to follow the steps provided in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/facebook/rocksdb/blob/main/INSTALL.md"},(0,r.kt)("inlineCode",{parentName:"a"},"INSTALL")),"\nfile to build rocksdb, rather than relying on system libraries that\nmay be outdated and incompatible."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"datadir"),": Set the path to the rocksdb data directory")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"RocksdbBuilder"),"]","'s docs for more information."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Rocksdb;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Rocksdb::default();\n builder.datadir("/tmp/opendal/rocksdb");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"RocksDB"},p=void 0,d={unversionedId:"services/rocksdb",id:"services/rocksdb",title:"RocksDB",description:"RocksDB service support.",source:"@site/docs/services/rocksdb.mdx",sourceDirName:"services",slug:"/services/rocksdb",permalink:"/docs/services/rocksdb",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/rocksdb.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"RocksDB"},sidebar:"docs",previous:{title:"Redis",permalink:"/docs/services/redis"},next:{title:"S3",permalink:"/docs/services/s3"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"RocksDB service support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("datadir".to_string(), "/tmp/opendal/rocksdb".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Rocksdb, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("rocksdb", {\n datadir: "/tmp/opendal/rocksdb",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("rocksdb",\n datadir="/tmp/opendal/rocksdb",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[4538],{9613:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return a?n.createElement(b,i(i({ref:t},u),{},{components:a})):n.createElement(b,i({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var c=2;c{a.d(t,{Z:()=>i});var n=a(9496),r=a(5924);const l={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},8750:(e,t,a)=>{a.d(t,{Z:()=>g});var n=a(8126),r=a(9496),l=a(5924),i=a(3053),o=a(3442),s=a(9356),c=a(4634),u=a(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function k(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=b({queryString:a,groupId:n}),[p,k]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),c(e),k(e)}),[c,k,l]),tabValues:l}}var f=a(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:a,selectedValue:o,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==o&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function y(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function N(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,n.Z)({},e,t)),r.createElement(y,(0,n.Z)({},e,t)))}function g(e){const t=(0,f.Z)();return r.createElement(N,(0,n.Z)({key:String(t)},e))}},4418:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>u,metadata:()=>d,toc:()=>b});var n=a(8126),r=(a(9496),a(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Note",id:"note",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(i,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","blocking")),(0,r.kt)("h2",{id:"note"},"Note"),(0,r.kt)("p",null,"OpenDAL will build rocksdb from source by default."),(0,r.kt)("p",null,"To link with existing rocksdb lib, please set one of the following:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ROCKSDB_LIB_DIR")," to the dir that contains ",(0,r.kt)("inlineCode",{parentName:"li"},"librocksdb.so")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ROCKSDB_STATIC")," to the dir that contains ",(0,r.kt)("inlineCode",{parentName:"li"},"librocksdb.a"))),(0,r.kt)("p",null,"If the version of RocksDB is below 6.0, you may encounter compatibility\nissues. It is advisable to follow the steps provided in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/facebook/rocksdb/blob/main/INSTALL.md"},(0,r.kt)("inlineCode",{parentName:"a"},"INSTALL")),"\nfile to build rocksdb, rather than relying on system libraries that\nmay be outdated and incompatible."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the working directory of ",(0,r.kt)("inlineCode",{parentName:"li"},"OpenDAL")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"datadir"),": Set the path to the rocksdb data directory")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"RocksdbBuilder"),"]","'s docs for more information."),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Rocksdb;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Rocksdb::default();\n builder.datadir("/tmp/opendal/rocksdb");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}o.isMDXComponent=!0;var s=a(8750),c=a(5810);const u={title:"RocksDB"},p=void 0,d={unversionedId:"services/rocksdb",id:"services/rocksdb",title:"RocksDB",description:"RocksDB service support.",source:"@site/docs/services/rocksdb.mdx",sourceDirName:"services",slug:"/services/rocksdb",permalink:"/docs/services/rocksdb",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/rocksdb.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"RocksDB"},sidebar:"docs",previous:{title:"Redis",permalink:"/docs/services/redis"},next:{title:"S3",permalink:"/docs/services/s3"}},m={},b=[{value:"Via Config",id:"via-config",level:3}],k={toc:b},f="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(f,(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"RocksDB service support."),(0,r.kt)(o,{components:a.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("datadir".to_string(), "/tmp/opendal/rocksdb".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Rocksdb, map)?;\n Ok(())\n}\n'))),(0,r.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("rocksdb", {\n datadir: "/tmp/opendal/rocksdb",\n });\n}\n'))),(0,r.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("rocksdb",\n datadir="/tmp/opendal/rocksdb",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f9145722.8485308c.js b/assets/js/f9145722.f3da9ce7.js similarity index 86% rename from assets/js/f9145722.8485308c.js rename to assets/js/f9145722.f3da9ce7.js index 73bae7ed888d..b777c93db119 100644 --- a/assets/js/f9145722.8485308c.js +++ b/assets/js/f9145722.f3da9ce7.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[6529],{9613:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>k});var n=r(9496);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(r),m=a,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return r?n.createElement(k,o(o({ref:t},u),{},{components:r})):n.createElement(k,o({ref:t},u))}));function k(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=r.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,o[1]=i;for(var c=2;c{r.d(t,{Z:()=>o});var n=r(9496),a=r(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:r,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,o),hidden:r},t)}},8750:(e,t,r)=>{r.d(t,{Z:()=>N});var n=r(8126),a=r(9496),l=r(5924),o=r(3053),i=r(3442),s=r(9356),c=r(4634),u=r(6038);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}}))}function d(e){const{values:t,children:r}=e;return(0,a.useMemo)((()=>{const e=t??p(r);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function m(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:r}=e;const n=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:r=!1,groupId:n}=e,l=d(e),[o,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=k({queryString:r,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(r);return[n,(0,a.useCallback)((e=>{r&&l.set(e)}),[r,l])]}({groupId:n}),v=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{v&&i(v)}),[v]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var v=r(5667);const b={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:r,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,r=u.indexOf(t),n=c[r].value;n!==i&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const r=u.indexOf(e.currentTarget)+1;t=u[r]??u[0];break}case"ArrowLeft":{const r=u.indexOf(e.currentTarget)-1;t=u[r]??u[u.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":r},t)},c.map((e=>{let{value:t,label:r,attributes:o}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":i===t})}),r??t)})))}function g(e){let{lazy:t,children:r,selectedValue:n}=e;const l=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function y(e){const t=f(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",b.tabList)},a.createElement(h,(0,n.Z)({},e,t)),a.createElement(g,(0,n.Z)({},e,t)))}function N(e){const t=(0,v.Z)();return a.createElement(y,(0,n.Z)({key:String(t)},e))}},2527:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>b,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var n=r(8126),a=(r(9496),r(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Credentials related",id:"credentials-related",level:3},{value:"Just provide Access Token (Temporary)",id:"just-provide-access-token-temporary",level:4},{value:"Or provide Client ID and Client Secret and refresh token (Long Term)",id:"or-provide-client-id-and-client-secret-and-refresh-token-long-term",level:4},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...r}=e;return(0,a.kt)(o,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"capabilities"},"Capabilities"),(0,a.kt)("p",null,"This service can be used to:"),(0,a.kt)("ul",{className:"contains-task-list"},(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","batch")),(0,a.kt)("h1",{id:"configuration"},"Configuration"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend")),(0,a.kt)("h3",{id:"credentials-related"},"Credentials related"),(0,a.kt)("h4",{id:"just-provide-access-token-temporary"},"Just provide Access Token (Temporary)"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"access_token"),": set the access_token for google drive api\nPlease notice its expiration.")),(0,a.kt)("h4",{id:"or-provide-client-id-and-client-secret-and-refresh-token-long-term"},"Or provide Client ID and Client Secret and refresh token (Long Term)"),(0,a.kt)("p",null,"If you want to let OpenDAL to refresh the access token automatically,\nplease provide the following fields:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"refresh_token"),": set the refresh_token for google drive api"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"client_id"),": set the client_id for google drive api"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"client_secret"),": set the client_secret for google drive api")),(0,a.kt)("p",null,"OpenDAL is a library, it cannot do the first step of OAuth2 for you.\nYou need to get authorization code from user by calling GoogleDrive's authorize url\nand exchange it for refresh token."),(0,a.kt)("p",null,"Make sure you have enabled Google Drive API in your Google Cloud Console.\nAnd your OAuth scope contains ",(0,a.kt)("inlineCode",{parentName:"p"},"https://www.googleapis.com/auth/drive"),"."),(0,a.kt)("p",null,"Please refer to ",(0,a.kt)("a",{parentName:"p",href:"https://developers.google.com/identity/protocols/oauth2/"},"GoogleDrive OAuth2 Flow"),"\nfor more information."),(0,a.kt)("p",null,"You can refer to ","[",(0,a.kt)("inlineCode",{parentName:"p"},"GdriveBuilder"),"]","'s docs for more information"),(0,a.kt)("h2",{id:"example"},"Example"),(0,a.kt)("h3",{id:"via-builder"},"Via Builder"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Gdrive;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Gdrive::default();\n builder.root("/test");\n builder.access_token("");\n\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=r(8750),c=r(5810);const u={title:"Gdrive"},p=void 0,d={unversionedId:"services/gdrive",id:"services/gdrive",title:"Gdrive",description:"Google Drive services support.",source:"@site/docs/services/gdrive.mdx",sourceDirName:"services",slug:"/services/gdrive",permalink:"/docs/services/gdrive",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/gdrive.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"Gdrive"},sidebar:"docs",previous:{title:"Gcs",permalink:"/docs/services/gcs"},next:{title:"GHAC",permalink:"/docs/services/ghac"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],f={toc:k},v="wrapper";function b(e){let{components:t,...r}=e;return(0,a.kt)(v,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://drive.google.com"},"Google Drive")," services support."),(0,a.kt)(i,{components:r.components,mdxType:"Docs"}),(0,a.kt)("h3",{id:"via-config"},"Via Config"),(0,a.kt)(s.Z,{mdxType:"Tabs"},(0,a.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("access_token".to_string(), "your_access_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Gdrive, map)?;\n Ok(())\n}\n'))),(0,a.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("gdrive", {\n root: "/path/to/dir",\n access_token: "your_access_token",\n });\n}\n'))),(0,a.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("gdrive",\n root="/path/to/dir",\n access_token="your_access_token",\n)\n')))))}b.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[6529],{9613:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>k});var n=r(9496);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(r),m=a,k=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return r?n.createElement(k,o(o({ref:t},u),{},{components:r})):n.createElement(k,o({ref:t},u))}));function k(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=r.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,o[1]=i;for(var c=2;c{r.d(t,{Z:()=>o});var n=r(9496),a=r(5924);const l={tabItem:"tabItem_mw14"};function o(e){let{children:t,hidden:r,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,o),hidden:r},t)}},8750:(e,t,r)=>{r.d(t,{Z:()=>N});var n=r(8126),a=r(9496),l=r(5924),o=r(3053),i=r(3442),s=r(9356),c=r(4634),u=r(6038);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}}))}function d(e){const{values:t,children:r}=e;return(0,a.useMemo)((()=>{const e=t??p(r);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function m(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function k(e){let{queryString:t=!1,groupId:r}=e;const n=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:r=!1,groupId:n}=e,l=d(e),[o,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,c]=k({queryString:r,groupId:n}),[p,f]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(r);return[n,(0,a.useCallback)((e=>{r&&l.set(e)}),[r,l])]}({groupId:n}),v=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{v&&i(v)}),[v]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),f(e)}),[c,f,l]),tabValues:l}}var v=r(5667);const b={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function h(e){let{className:t,block:r,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,r=u.indexOf(t),n=c[r].value;n!==i&&(p(t),s(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const r=u.indexOf(e.currentTarget)+1;t=u[r]??u[0];break}case"ArrowLeft":{const r=u.indexOf(e.currentTarget)-1;t=u[r]??u[u.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":r},t)},c.map((e=>{let{value:t,label:r,attributes:o}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":i===t})}),r??t)})))}function g(e){let{lazy:t,children:r,selectedValue:n}=e;const l=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function y(e){const t=f(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",b.tabList)},a.createElement(h,(0,n.Z)({},e,t)),a.createElement(g,(0,n.Z)({},e,t)))}function N(e){const t=(0,v.Z)();return a.createElement(y,(0,n.Z)({key:String(t)},e))}},2527:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>b,frontMatter:()=>u,metadata:()=>d,toc:()=>k});var n=r(8126),a=(r(9496),r(9613));const l={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Credentials related",id:"credentials-related",level:3},{value:"Just provide Access Token (Temporary)",id:"just-provide-access-token-temporary",level:4},{value:"Or provide Client ID and Client Secret and refresh token (Long Term)",id:"or-provide-client-id-and-client-secret-and-refresh-token-long-term",level:4},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},o="wrapper";function i(e){let{components:t,...r}=e;return(0,a.kt)(o,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"capabilities"},"Capabilities"),(0,a.kt)("p",null,"This service can be used to:"),(0,a.kt)("ul",{className:"contains-task-list"},(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","list"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","batch")),(0,a.kt)("h1",{id:"configuration"},"Configuration"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for backend")),(0,a.kt)("h3",{id:"credentials-related"},"Credentials related"),(0,a.kt)("h4",{id:"just-provide-access-token-temporary"},"Just provide Access Token (Temporary)"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"access_token"),": set the access_token for google drive api\nPlease notice its expiration.")),(0,a.kt)("h4",{id:"or-provide-client-id-and-client-secret-and-refresh-token-long-term"},"Or provide Client ID and Client Secret and refresh token (Long Term)"),(0,a.kt)("p",null,"If you want to let OpenDAL to refresh the access token automatically,\nplease provide the following fields:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"refresh_token"),": set the refresh_token for google drive api"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"client_id"),": set the client_id for google drive api"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"client_secret"),": set the client_secret for google drive api")),(0,a.kt)("p",null,"OpenDAL is a library, it cannot do the first step of OAuth2 for you.\nYou need to get authorization code from user by calling GoogleDrive's authorize url\nand exchange it for refresh token."),(0,a.kt)("p",null,"Make sure you have enabled Google Drive API in your Google Cloud Console.\nAnd your OAuth scope contains ",(0,a.kt)("inlineCode",{parentName:"p"},"https://www.googleapis.com/auth/drive"),"."),(0,a.kt)("p",null,"Please refer to ",(0,a.kt)("a",{parentName:"p",href:"https://developers.google.com/identity/protocols/oauth2/"},"GoogleDrive OAuth2 Flow"),"\nfor more information."),(0,a.kt)("p",null,"You can refer to ","[",(0,a.kt)("inlineCode",{parentName:"p"},"GdriveBuilder"),"]","'s docs for more information"),(0,a.kt)("h2",{id:"example"},"Example"),(0,a.kt)("h3",{id:"via-builder"},"Via Builder"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Gdrive;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Gdrive::default();\n builder.root("/test");\n builder.access_token("");\n\n Ok(())\n}\n')))}i.isMDXComponent=!0;var s=r(8750),c=r(5810);const u={title:"Gdrive"},p=void 0,d={unversionedId:"services/gdrive",id:"services/gdrive",title:"Gdrive",description:"Google Drive services support.",source:"@site/docs/services/gdrive.mdx",sourceDirName:"services",slug:"/services/gdrive",permalink:"/docs/services/gdrive",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/gdrive.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"Gdrive"},sidebar:"docs",previous:{title:"Gcs",permalink:"/docs/services/gcs"},next:{title:"GHAC",permalink:"/docs/services/ghac"}},m={},k=[{value:"Via Config",id:"via-config",level:3}],f={toc:k},v="wrapper";function b(e){let{components:t,...r}=e;return(0,a.kt)(v,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://drive.google.com"},"Google Drive")," services support."),(0,a.kt)(i,{components:r.components,mdxType:"Docs"}),(0,a.kt)("h3",{id:"via-config"},"Via Config"),(0,a.kt)(s.Z,{mdxType:"Tabs"},(0,a.kt)(c.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("access_token".to_string(), "your_access_token".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Gdrive, map)?;\n Ok(())\n}\n'))),(0,a.kt)(c.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("gdrive", {\n root: "/path/to/dir",\n access_token: "your_access_token",\n });\n}\n'))),(0,a.kt)(c.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("gdrive",\n root="/path/to/dir",\n access_token="your_access_token",\n)\n')))))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/fde7cc64.1a42e061.js b/assets/js/fde7cc64.569e278a.js similarity index 85% rename from assets/js/fde7cc64.1a42e061.js rename to assets/js/fde7cc64.569e278a.js index e11a282a037c..4e8dd1724744 100644 --- a/assets/js/fde7cc64.1a42e061.js +++ b/assets/js/fde7cc64.569e278a.js @@ -1 +1 @@ -"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[3454],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,f=p["".concat(s,".").concat(m)]||p[m]||d[m]||o;return n?a.createElement(f,i(i({ref:t},c),{},{components:n})):a.createElement(f,i({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,i[1]=l;for(var u=2;u{n.d(t,{Z:()=>i});var a=n(9496),r=n(5924);const o={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(o.tabItem,i),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),o=n(5924),i=n(3053),l=n(3442),s=n(9356),u=n(4634),c=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,l.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(o),(0,r.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(a.location.search);t.set(o,e),a.replace({...a.location,search:t.toString()})}),[o,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,o=d(e),[i,l]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:o}))),[s,u]=f({queryString:n,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,o]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:a}),k=(()=>{const e=s??p;return m({value:e,tabValues:o})?e:null})();(0,r.useLayoutEffect)((()=>{k&&l(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),b(e)}),[u,b,o]),tabValues:o}}var k=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:n,selectedValue:l,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=u[n].value;a!==l&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:l===t?0:-1,"aria-selected":l===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,o.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":l===t})}),n??t)})))}function y(e){let{lazy:t,children:n,selectedValue:a}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",h.tabList)},r.createElement(v,(0,a.Z)({},e,t)),r.createElement(y,(0,a.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},4657:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>f});var a=n(8126),r=(n(9496),n(9613));const o={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function l(e){let{components:t,...n}=e;return(0,r.kt)(i,(0,a.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note"),": As for ",(0,r.kt)("a",{parentName:"p",href:"https://apple.github.io/foundationdb/known-limitations"},"Known Limitations - FoundationDB"),", keys cannot exceed 10,000 bytes in size, and values cannot exceed 100,000 bytes in size. Errors will be raised by OpenDAL if these limits are exceeded."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for this backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"config_path"),": Set the configuration path for foundationdb. If not provided, the default configuration path will be used.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"FoundationdbBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Foundationdb;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Foundationdb::default();\n builder.config_path("/etc/foundationdb/foundationdb.conf");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}l.isMDXComponent=!0;var s=n(8750),u=n(5810);const c={title:"FoundationDB"},p=void 0,d={unversionedId:"services/foundationdb",id:"services/foundationdb",title:"FoundationDB",description:"FoundationDB services support.",source:"@site/docs/services/foundationdb.mdx",sourceDirName:"services",slug:"/services/foundationdb",permalink:"/docs/services/foundationdb",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/foundationdb.mdx",tags:[],version:"current",lastUpdatedBy:"Alex Overchenko",lastUpdatedAt:1707399503,formattedLastUpdatedAt:"Feb 8, 2024",frontMatter:{title:"FoundationDB"},sidebar:"docs",previous:{title:"Etcd",permalink:"/docs/services/etcd"},next:{title:"Fs",permalink:"/docs/services/fs"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(k,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.foundationdb.org/"},"FoundationDB")," services support."),(0,r.kt)(l,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("config_path".to_string(), "/path/to/config".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Foundationdb, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("foundationdb", {\n root: "/path/to/dir",\n config_path: "/path/to/config",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("foundationdb",\n root="/path/to/dir",\n config_path="/path/to/config",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkopendal_website=self.webpackChunkopendal_website||[]).push([[3454],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,f=p["".concat(s,".").concat(m)]||p[m]||d[m]||o;return n?a.createElement(f,i(i({ref:t},c),{},{components:n})):a.createElement(f,i({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,i[1]=l;for(var u=2;u{n.d(t,{Z:()=>i});var a=n(9496),r=n(5924);const o={tabItem:"tabItem_mw14"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(o.tabItem,i),hidden:n},t)}},8750:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(8126),r=n(9496),o=n(5924),i=n(3053),l=n(3442),s=n(9356),u=n(4634),c=n(6038);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,l.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(o),(0,r.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(a.location.search);t.set(o,e),a.replace({...a.location,search:t.toString()})}),[o,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,o=d(e),[i,l]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:o}))),[s,u]=f({queryString:n,groupId:a}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,o]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:a}),k=(()=>{const e=s??p;return m({value:e,tabValues:o})?e:null})();(0,r.useLayoutEffect)((()=>{k&&l(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),b(e)}),[u,b,o]),tabValues:o}}var k=n(5667);const h={tabList:"tabList_r_eZ",tabItem:"tabItem_ZrSx"};function v(e){let{className:t,block:n,selectedValue:l,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=u[n].value;a!==l&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:l===t?0:-1,"aria-selected":l===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,o.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":l===t})}),n??t)})))}function y(e){let{lazy:t,children:n,selectedValue:a}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=b(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",h.tabList)},r.createElement(v,(0,a.Z)({},e,t)),r.createElement(y,(0,a.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},4657:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>f});var a=n(8126),r=(n(9496),n(9613));const o={toc:[{value:"Capabilities",id:"capabilities",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example",id:"example",level:2},{value:"Via Builder",id:"via-builder",level:3}]},i="wrapper";function l(e){let{components:t,...n}=e;return(0,r.kt)(i,(0,a.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"capabilities"},"Capabilities"),(0,r.kt)("p",null,"This service can be used to:"),(0,r.kt)("ul",{className:"contains-task-list"},(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","stat"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","read"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","write"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","create_dir"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","delete"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","copy"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","rename"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"list")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","scan"),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ",(0,r.kt)("del",{parentName:"li"},"presign")),(0,r.kt)("li",{parentName:"ul",className:"task-list-item"},(0,r.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","blocking")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note"),": As for ",(0,r.kt)("a",{parentName:"p",href:"https://apple.github.io/foundationdb/known-limitations"},"Known Limitations - FoundationDB"),", keys cannot exceed 10,000 bytes in size, and values cannot exceed 100,000 bytes in size. Errors will be raised by OpenDAL if these limits are exceeded."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"root"),": Set the work directory for this backend."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"config_path"),": Set the configuration path for foundationdb. If not provided, the default configuration path will be used.")),(0,r.kt)("p",null,"You can refer to ","[",(0,r.kt)("inlineCode",{parentName:"p"},"FoundationdbBuilder"),"]","'s docs for more information"),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"via-builder"},"Via Builder"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::services::Foundationdb;\nuse opendal::Operator;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut builder = Foundationdb::default();\n builder.config_path("/etc/foundationdb/foundationdb.conf");\n\n let op: Operator = Operator::new(builder)?.finish();\n Ok(())\n}\n')))}l.isMDXComponent=!0;var s=n(8750),u=n(5810);const c={title:"FoundationDB"},p=void 0,d={unversionedId:"services/foundationdb",id:"services/foundationdb",title:"FoundationDB",description:"FoundationDB services support.",source:"@site/docs/services/foundationdb.mdx",sourceDirName:"services",slug:"/services/foundationdb",permalink:"/docs/services/foundationdb",draft:!1,editUrl:"https://github.com/apache/opendal/tree/main/website/docs/services/foundationdb.mdx",tags:[],version:"current",lastUpdatedBy:"\u7eaa\u534e\u88d5",lastUpdatedAt:1707458180,formattedLastUpdatedAt:"Feb 9, 2024",frontMatter:{title:"FoundationDB"},sidebar:"docs",previous:{title:"Etcd",permalink:"/docs/services/etcd"},next:{title:"Fs",permalink:"/docs/services/fs"}},m={},f=[{value:"Via Config",id:"via-config",level:3}],b={toc:f},k="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(k,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.foundationdb.org/"},"FoundationDB")," services support."),(0,r.kt)(l,{components:n.components,mdxType:"Docs"}),(0,r.kt)("h3",{id:"via-config"},"Via Config"),(0,r.kt)(s.Z,{mdxType:"Tabs"},(0,r.kt)(u.Z,{value:"rust",label:"Rust",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use anyhow::Result;\nuse opendal::Operator;\nuse opendal::Scheme;\nuse std::collections::HashMap;\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n let mut map = HashMap::new();\n map.insert("root".to_string(), "/path/to/dir".to_string());\n map.insert("config_path".to_string(), "/path/to/config".to_string());\n\n let op: Operator = Operator::via_map(Scheme::Foundationdb, map)?;\n Ok(())\n}\n'))),(0,r.kt)(u.Z,{value:"node.js",label:"Node.js",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},'import { Operator } from "opendal";\n\nasync function main() {\n const op = new Operator("foundationdb", {\n root: "/path/to/dir",\n config_path: "/path/to/config",\n });\n}\n'))),(0,r.kt)(u.Z,{value:"python",label:"Python",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'import opendal\n\nop = opendal.Operator("foundationdb",\n root="/path/to/dir",\n config_path="/path/to/config",\n)\n')))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.4d04377e.js b/assets/js/runtime~main.c97fb7e4.js similarity index 58% rename from assets/js/runtime~main.4d04377e.js rename to assets/js/runtime~main.c97fb7e4.js index ffeb2433addf..e79e92cc4224 100644 --- a/assets/js/runtime~main.4d04377e.js +++ b/assets/js/runtime~main.c97fb7e4.js @@ -1 +1 @@ -(()=>{"use strict";var e,c,a,b,d,f={},t={};function r(e){var c=t[e];if(void 0!==c)return c.exports;var a=t[e]={exports:{}};return f[e].call(a.exports,a,a.exports,r),a.exports}r.m=f,e=[],r.O=(c,a,b,d)=>{if(!a){var f=1/0;for(i=0;i=d)&&Object.keys(r.O).every((e=>r.O[e](a[o])))?a.splice(o--,1):(t=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[a,b,d]},r.n=e=>{var c=e&&e.__esModule?()=>e.default:()=>e;return r.d(c,{a:c}),c},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,b){if(1&b&&(e=this(e)),8&b)return e;if("object"==typeof e&&e){if(4&b&&e.__esModule)return e;if(16&b&&"function"==typeof e.then)return e}var d=Object.create(null);r.r(d);var f={};c=c||[null,a({}),a([]),a(a)];for(var t=2&b&&e;"object"==typeof t&&!~c.indexOf(t);t=a(t))Object.getOwnPropertyNames(t).forEach((c=>f[c]=()=>e[c]));return f.default=()=>e,r.d(d,f),d},r.d=(e,c)=>{for(var a in c)r.o(c,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:c[a]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((c,a)=>(r.f[a](e,c),c)),[])),r.u=e=>"assets/js/"+({39:"79029d83",53:"935f2afb",217:"b56f9725",442:"4c9803b5",455:"07df3158",520:"069a7000",533:"b2b675dd",716:"a0405932",843:"21b25a7c",990:"592d1076",1011:"cc62039a",1163:"434bbc94",1372:"1db64337",1477:"b2f554cd",1513:"9897d641",1652:"8cc9519e",1713:"a7023ddc",1725:"381c04e3",1832:"c03bef3a",1846:"054cd2fb",1902:"fb47c099",2113:"0605a481",2115:"65bf2b43",2161:"b114cefa",2217:"eec267e4",2425:"cca28864",2505:"14a24c8e",2535:"814f3328",2651:"8070e160",2652:"8bf4b5be",2804:"2cbf1097",2963:"3632610d",3057:"136e1c50",3085:"1f391b9e",3089:"a6aa9e1f",3454:"fde7cc64",3463:"3aebe779",3608:"9e4087bc",3702:"151cd40f",3845:"e892cec6",3880:"7caca07b",4013:"01a85c17",4157:"283e63f8",4195:"c4f5d8e4",4197:"9355d619",4263:"3f2bc239",4277:"939f74f6",4348:"98cc138c",4434:"67ecc70e",4477:"1957547a",4536:"22d8fa67",4538:"f1ca5a39",4543:"09d8124e",4551:"621b831b",4600:"8fb00c63",4610:"c6f88384",4649:"7263c0b5",4719:"8f4159f2",4790:"d3c0d8d5",4832:"ece86388",5098:"a9c30f2e",5214:"bb5b2057",5420:"ce1f9e9a",5490:"7d293e3a",5571:"6a41242b",5606:"beae818e",5737:"39a95de5",5750:"93c7665c",5822:"be97ea89",5885:"6f4d3fa1",5927:"c46c6b55",5982:"6dc695d1",6037:"8a2489d3",6103:"ccc49370",6152:"29b208a4",6529:"f9145722",6611:"209227ae",6664:"355132e1",6752:"4e2d8f56",6915:"093f5f04",6948:"e19a6781",7218:"064c7027",7254:"42347498",7289:"c6ab695b",7489:"500d55cb",7566:"64ca138b",7616:"306a8c6c",7757:"57a16c1d",7763:"09cd8fb6",7794:"02514dc9",7872:"5771c448",7912:"1133ea6a",7918:"17896441",8610:"6875c492",8848:"1fc57329",8864:"5f123d4e",8874:"c0600a1b",8992:"5341786c",9499:"fbfa070b",9514:"1be78505",9817:"14eb3368",9826:"ddccef4c"}[e]||e)+"."+{39:"322dedd9",53:"a10027a9",217:"49de58c5",442:"055957d2",455:"cd104b49",520:"56d2bde2",533:"abeaba7f",716:"3c0491e5",843:"4fa9bdce",990:"0507ddd8",1011:"621bca3e",1163:"e749da08",1299:"805f3512",1372:"21dfa61f",1477:"165e30ef",1513:"29df769a",1652:"65bf3c5a",1713:"3bd1a05f",1725:"46eeea24",1832:"653e8781",1846:"7fb77413",1902:"df8a9eab",2113:"b050f3b9",2115:"0017c3d9",2161:"59bcc56a",2217:"67033eae",2425:"ce67771d",2505:"f31158d6",2535:"dd233b07",2651:"07907d7d",2652:"e3d66258",2804:"f00467d0",2963:"752d730c",3057:"74aba368",3085:"ec88971c",3089:"a0bcf835",3454:"1a42e061",3463:"512e4ef8",3608:"7c9c38c9",3702:"5befd2b3",3845:"7e5de66d",3880:"31b6335a",4013:"5e6dbc3a",4157:"787ca911",4195:"2d58203f",4197:"12c7346a",4263:"d21ff932",4277:"560b3cdf",4348:"783dba3a",4434:"16eb2d15",4477:"64bba61c",4536:"bad6217a",4538:"b31952c1",4543:"853100c7",4551:"6c6e7519",4600:"55fa52da",4610:"87880a8c",4649:"79fbe95c",4719:"31de883f",4790:"08792998",4832:"7815eae5",5098:"4a8d52e9",5214:"2c831502",5420:"9e9490dd",5490:"cf1e0e8b",5571:"0a66a4ef",5606:"d058c3d4",5737:"a9638d17",5750:"cc1d1677",5822:"e828b6a7",5885:"d26d09df",5927:"f2ce15fd",5982:"e2efda96",6037:"76acf7d6",6103:"aa3463a4",6152:"a7f31f6c",6529:"8485308c",6611:"d561ae8d",6664:"5e3a79e9",6752:"349778ec",6915:"e12fced7",6948:"cedaa5e2",7218:"7562beab",7254:"a32a7c70",7289:"8c41f546",7489:"6f07c671",7566:"4e0eed58",7606:"995c8a43",7616:"1ed9b96b",7757:"53fcfb13",7763:"834644b2",7794:"0bdc7cb7",7872:"3254e038",7912:"c887d501",7918:"6afa6031",8575:"c2d26b90",8610:"4fa15e68",8848:"e2dcc927",8864:"d44f927d",8874:"44ab92a8",8992:"c1558368",9499:"f1826695",9514:"10d3673d",9817:"9fe0af0d",9826:"92f66ee2"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,c)=>Object.prototype.hasOwnProperty.call(e,c),b={},d="opendal-website:",r.l=(e,c,a,f)=>{if(b[e])b[e].push(c);else{var t,o;if(void 0!==a)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var d=b[e];if(delete b[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(a))),c)return c(a)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={17896441:"7918",42347498:"7254","79029d83":"39","935f2afb":"53",b56f9725:"217","4c9803b5":"442","07df3158":"455","069a7000":"520",b2b675dd:"533",a0405932:"716","21b25a7c":"843","592d1076":"990",cc62039a:"1011","434bbc94":"1163","1db64337":"1372",b2f554cd:"1477","9897d641":"1513","8cc9519e":"1652",a7023ddc:"1713","381c04e3":"1725",c03bef3a:"1832","054cd2fb":"1846",fb47c099:"1902","0605a481":"2113","65bf2b43":"2115",b114cefa:"2161",eec267e4:"2217",cca28864:"2425","14a24c8e":"2505","814f3328":"2535","8070e160":"2651","8bf4b5be":"2652","2cbf1097":"2804","3632610d":"2963","136e1c50":"3057","1f391b9e":"3085",a6aa9e1f:"3089",fde7cc64:"3454","3aebe779":"3463","9e4087bc":"3608","151cd40f":"3702",e892cec6:"3845","7caca07b":"3880","01a85c17":"4013","283e63f8":"4157",c4f5d8e4:"4195","9355d619":"4197","3f2bc239":"4263","939f74f6":"4277","98cc138c":"4348","67ecc70e":"4434","1957547a":"4477","22d8fa67":"4536",f1ca5a39:"4538","09d8124e":"4543","621b831b":"4551","8fb00c63":"4600",c6f88384:"4610","7263c0b5":"4649","8f4159f2":"4719",d3c0d8d5:"4790",ece86388:"4832",a9c30f2e:"5098",bb5b2057:"5214",ce1f9e9a:"5420","7d293e3a":"5490","6a41242b":"5571",beae818e:"5606","39a95de5":"5737","93c7665c":"5750",be97ea89:"5822","6f4d3fa1":"5885",c46c6b55:"5927","6dc695d1":"5982","8a2489d3":"6037",ccc49370:"6103","29b208a4":"6152",f9145722:"6529","209227ae":"6611","355132e1":"6664","4e2d8f56":"6752","093f5f04":"6915",e19a6781:"6948","064c7027":"7218",c6ab695b:"7289","500d55cb":"7489","64ca138b":"7566","306a8c6c":"7616","57a16c1d":"7757","09cd8fb6":"7763","02514dc9":"7794","5771c448":"7872","1133ea6a":"7912","6875c492":"8610","1fc57329":"8848","5f123d4e":"8864",c0600a1b:"8874","5341786c":"8992",fbfa070b:"9499","1be78505":"9514","14eb3368":"9817",ddccef4c:"9826"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(c,a)=>{var b=r.o(e,c)?e[c]:void 0;if(0!==b)if(b)a.push(b[2]);else if(/^(1303|532)$/.test(c))e[c]=0;else{var d=new Promise(((a,d)=>b=e[c]=[a,d]));a.push(b[2]=d);var f=r.p+r.u(c),t=new Error;r.l(f,(a=>{if(r.o(e,c)&&(0!==(b=e[c])&&(e[c]=void 0),b)){var d=a&&("load"===a.type?"missing":a.type),f=a&&a.target&&a.target.src;t.message="Loading chunk "+c+" failed.\n("+d+": "+f+")",t.name="ChunkLoadError",t.type=d,t.request=f,b[1](t)}}),"chunk-"+c,c)}},r.O.j=c=>0===e[c];var c=(c,a)=>{var b,d,f=a[0],t=a[1],o=a[2],n=0;if(f.some((c=>0!==e[c]))){for(b in t)r.o(t,b)&&(r.m[b]=t[b]);if(o)var i=o(r)}for(c&&c(a);n{"use strict";var e,c,a,d,b,f={},t={};function r(e){var c=t[e];if(void 0!==c)return c.exports;var a=t[e]={exports:{}};return f[e].call(a.exports,a,a.exports,r),a.exports}r.m=f,e=[],r.O=(c,a,d,b)=>{if(!a){var f=1/0;for(i=0;i=b)&&Object.keys(r.O).every((e=>r.O[e](a[o])))?a.splice(o--,1):(t=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[a,d,b]},r.n=e=>{var c=e&&e.__esModule?()=>e.default:()=>e;return r.d(c,{a:c}),c},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var b=Object.create(null);r.r(b);var f={};c=c||[null,a({}),a([]),a(a)];for(var t=2&d&&e;"object"==typeof t&&!~c.indexOf(t);t=a(t))Object.getOwnPropertyNames(t).forEach((c=>f[c]=()=>e[c]));return f.default=()=>e,r.d(b,f),b},r.d=(e,c)=>{for(var a in c)r.o(c,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:c[a]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((c,a)=>(r.f[a](e,c),c)),[])),r.u=e=>"assets/js/"+({39:"79029d83",53:"935f2afb",217:"b56f9725",442:"4c9803b5",455:"07df3158",520:"069a7000",533:"b2b675dd",716:"a0405932",843:"21b25a7c",990:"592d1076",1011:"cc62039a",1163:"434bbc94",1372:"1db64337",1477:"b2f554cd",1513:"9897d641",1652:"8cc9519e",1713:"a7023ddc",1725:"381c04e3",1832:"c03bef3a",1846:"054cd2fb",1902:"fb47c099",2113:"0605a481",2115:"65bf2b43",2161:"b114cefa",2217:"eec267e4",2425:"cca28864",2505:"14a24c8e",2535:"814f3328",2651:"8070e160",2652:"8bf4b5be",2804:"2cbf1097",2963:"3632610d",3057:"136e1c50",3085:"1f391b9e",3089:"a6aa9e1f",3454:"fde7cc64",3463:"3aebe779",3608:"9e4087bc",3702:"151cd40f",3845:"e892cec6",3880:"7caca07b",4013:"01a85c17",4157:"283e63f8",4195:"c4f5d8e4",4197:"9355d619",4263:"3f2bc239",4277:"939f74f6",4348:"98cc138c",4434:"67ecc70e",4477:"1957547a",4536:"22d8fa67",4538:"f1ca5a39",4543:"09d8124e",4551:"621b831b",4600:"8fb00c63",4610:"c6f88384",4649:"7263c0b5",4719:"8f4159f2",4790:"d3c0d8d5",4832:"ece86388",5098:"a9c30f2e",5214:"bb5b2057",5420:"ce1f9e9a",5490:"7d293e3a",5571:"6a41242b",5606:"beae818e",5737:"39a95de5",5750:"93c7665c",5822:"be97ea89",5885:"6f4d3fa1",5927:"c46c6b55",5982:"6dc695d1",6037:"8a2489d3",6103:"ccc49370",6152:"29b208a4",6529:"f9145722",6611:"209227ae",6664:"355132e1",6752:"4e2d8f56",6915:"093f5f04",6948:"e19a6781",7218:"064c7027",7254:"42347498",7289:"c6ab695b",7489:"500d55cb",7566:"64ca138b",7616:"306a8c6c",7757:"57a16c1d",7763:"09cd8fb6",7794:"02514dc9",7872:"5771c448",7912:"1133ea6a",7918:"17896441",8610:"6875c492",8848:"1fc57329",8864:"5f123d4e",8874:"c0600a1b",8992:"5341786c",9499:"fbfa070b",9514:"1be78505",9817:"14eb3368",9826:"ddccef4c"}[e]||e)+"."+{39:"322dedd9",53:"a10027a9",217:"c79979b0",442:"055957d2",455:"cd104b49",520:"56d2bde2",533:"abeaba7f",716:"049de26a",843:"4fa9bdce",990:"ac92c2ff",1011:"ff84ee63",1163:"7f039215",1299:"805f3512",1372:"80b76c10",1477:"165e30ef",1513:"29df769a",1652:"8d1888a2",1713:"3bd1a05f",1725:"fb6cc6ba",1832:"653e8781",1846:"300f2b6d",1902:"df8a9eab",2113:"d9ef883b",2115:"797d900c",2161:"32ae26c4",2217:"81118d8b",2425:"ce67771d",2505:"f31158d6",2535:"dd233b07",2651:"edd5bf6f",2652:"e3d66258",2804:"abc52b0c",2963:"dccddc34",3057:"e340d499",3085:"ec88971c",3089:"a0bcf835",3454:"569e278a",3463:"512e4ef8",3608:"7c9c38c9",3702:"da6f53bd",3845:"f0305c4d",3880:"31b6335a",4013:"5e6dbc3a",4157:"787ca911",4195:"2d58203f",4197:"12c7346a",4263:"d21ff932",4277:"fae2644a",4348:"783dba3a",4434:"b853346f",4477:"829b930e",4536:"7650f82d",4538:"c5ac8d5a",4543:"22b6d153",4551:"12eded49",4600:"02174c0b",4610:"87880a8c",4649:"22c96f51",4719:"b290c7bd",4790:"ffdfbe35",4832:"7815eae5",5098:"4a8d52e9",5214:"a672d192",5420:"9e9490dd",5490:"cf1e0e8b",5571:"ddda23c1",5606:"d058c3d4",5737:"ec02f38b",5750:"cc1d1677",5822:"e828b6a7",5885:"03a29c20",5927:"4c1f6eb0",5982:"a62a6276",6037:"76acf7d6",6103:"aa3463a4",6152:"4ec1c1a4",6529:"f3da9ce7",6611:"d561ae8d",6664:"5e3a79e9",6752:"6a3a99d1",6915:"ee86dd60",6948:"cedaa5e2",7218:"7562beab",7254:"27faf4e2",7289:"53f5eeda",7489:"853d6c8d",7566:"4e0eed58",7606:"995c8a43",7616:"1ed9b96b",7757:"c1c4598c",7763:"834644b2",7794:"0bdc7cb7",7872:"3254e038",7912:"c887d501",7918:"6afa6031",8575:"c2d26b90",8610:"4fa15e68",8848:"e2dcc927",8864:"d44f927d",8874:"caef7777",8992:"c1558368",9499:"f1826695",9514:"10d3673d",9817:"9fe0af0d",9826:"33d34d8d"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,c)=>Object.prototype.hasOwnProperty.call(e,c),d={},b="opendal-website:",r.l=(e,c,a,f)=>{if(d[e])d[e].push(c);else{var t,o;if(void 0!==a)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var b=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),b&&b.forEach((e=>e(a))),c)return c(a)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={17896441:"7918",42347498:"7254","79029d83":"39","935f2afb":"53",b56f9725:"217","4c9803b5":"442","07df3158":"455","069a7000":"520",b2b675dd:"533",a0405932:"716","21b25a7c":"843","592d1076":"990",cc62039a:"1011","434bbc94":"1163","1db64337":"1372",b2f554cd:"1477","9897d641":"1513","8cc9519e":"1652",a7023ddc:"1713","381c04e3":"1725",c03bef3a:"1832","054cd2fb":"1846",fb47c099:"1902","0605a481":"2113","65bf2b43":"2115",b114cefa:"2161",eec267e4:"2217",cca28864:"2425","14a24c8e":"2505","814f3328":"2535","8070e160":"2651","8bf4b5be":"2652","2cbf1097":"2804","3632610d":"2963","136e1c50":"3057","1f391b9e":"3085",a6aa9e1f:"3089",fde7cc64:"3454","3aebe779":"3463","9e4087bc":"3608","151cd40f":"3702",e892cec6:"3845","7caca07b":"3880","01a85c17":"4013","283e63f8":"4157",c4f5d8e4:"4195","9355d619":"4197","3f2bc239":"4263","939f74f6":"4277","98cc138c":"4348","67ecc70e":"4434","1957547a":"4477","22d8fa67":"4536",f1ca5a39:"4538","09d8124e":"4543","621b831b":"4551","8fb00c63":"4600",c6f88384:"4610","7263c0b5":"4649","8f4159f2":"4719",d3c0d8d5:"4790",ece86388:"4832",a9c30f2e:"5098",bb5b2057:"5214",ce1f9e9a:"5420","7d293e3a":"5490","6a41242b":"5571",beae818e:"5606","39a95de5":"5737","93c7665c":"5750",be97ea89:"5822","6f4d3fa1":"5885",c46c6b55:"5927","6dc695d1":"5982","8a2489d3":"6037",ccc49370:"6103","29b208a4":"6152",f9145722:"6529","209227ae":"6611","355132e1":"6664","4e2d8f56":"6752","093f5f04":"6915",e19a6781:"6948","064c7027":"7218",c6ab695b:"7289","500d55cb":"7489","64ca138b":"7566","306a8c6c":"7616","57a16c1d":"7757","09cd8fb6":"7763","02514dc9":"7794","5771c448":"7872","1133ea6a":"7912","6875c492":"8610","1fc57329":"8848","5f123d4e":"8864",c0600a1b:"8874","5341786c":"8992",fbfa070b:"9499","1be78505":"9514","14eb3368":"9817",ddccef4c:"9826"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(c,a)=>{var d=r.o(e,c)?e[c]:void 0;if(0!==d)if(d)a.push(d[2]);else if(/^(1303|532)$/.test(c))e[c]=0;else{var b=new Promise(((a,b)=>d=e[c]=[a,b]));a.push(d[2]=b);var f=r.p+r.u(c),t=new Error;r.l(f,(a=>{if(r.o(e,c)&&(0!==(d=e[c])&&(e[c]=void 0),d)){var b=a&&("load"===a.type?"missing":a.type),f=a&&a.target&&a.target.src;t.message="Loading chunk "+c+" failed.\n("+b+": "+f+")",t.name="ChunkLoadError",t.type=b,t.request=f,d[1](t)}}),"chunk-"+c,c)}},r.O.j=c=>0===e[c];var c=(c,a)=>{var d,b,f=a[0],t=a[1],o=a[2],n=0;if(f.some((c=>0!==e[c]))){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(o)var i=o(r)}for(c&&c(a);n Apache OpenDAL™ is now Graduated | Apache OpenDAL™ - +

Apache OpenDAL™ is now Graduated

· 6 min read

Hello, everyone! I'm happy to announce that Apache OpenDAL™ has graduated from the Apache Incubator to become a Top-Level Project of the Apache Software Foundation.

What's Apache OpenDAL?

Apache OpenDAL is a data access layer that allows users to easily and efficiently retrieve data from various storage services in a unified way. Our VISION is access data freely.

OpenDAL could be used as a better SDK for your storage services: A SDK with native integration of retry, logging, metrics, tracing, timeout, throttle, and more.

OpenDAL could be used as a super connector for your storage services: A connector that supports all kinds of storage services from Object Storage (s3, gcs, azblob), File Storage (fs, azdls, hdfs), Consumer Cloud Storage (gdrive, onedrive), Key-Value Storage (rocksdb, sled) to Cache Storage (memcached, moka).

OpenDAL could be used as an elegant client for your storage services: A client with well designed API and many language bindings: Rust, C, Cpp, Dotnet, Go, Haskell, Java, Lua, Node.js, Ocaml, Php, Python, Ruby, Swift and Zig.

Need to access data? Give OpenDAL a try!

async fn main() -> Result<()> {
// Init s3 service.
let mut builder = services::S3::default();
builder.bucket("test");

// Init an operator
let op = Operator::via_map(builder)?
// Add logging
.layer(LoggingLayer::default())
.finish();

// Write data
op.write("hello.txt", "Hello, World!").await?;

// Read data
let bs = op.read("hello.txt").await?;

// Fetch metadata
let meta = op.stat("hello.txt").await?;
let mode = meta.mode();
let length = meta.content_length();

// Delete
op.delete("hello.txt").await?;

Ok(())
}

What's the ASF?

The Apache Software Foundation (ASF) is a nonprofit corporation to support a number of open-source software projects. The Apache Software Foundation exists to provide software for the public good. We believe in the power of community over code, known as The Apache Way. Thousands of people around the world contribute to ASF open source projects every day.

The OpenDAL Community believes the apache way that:

  • Earned Authority: all individuals are given the opportunity to participate, but their influence is based on publicly earned merit – what they contribute to the community.
  • Community of Peers: individuals participate at the ASF, not organizations.
  • Open Communications: as a virtual organization, the ASF requires all communications related to code and decision-making to be publicly accessible to ensure asynchronous collaboration, as necessitated by a globally-distributed community.
  • Consensus Decision Making: Apache Projects are overseen by a self-selected team of active volunteers who are contributing to their respective projects.
  • Responsible Oversight: The ASF governance model is based on trust and delegated oversight.

The original creators Databend chosen to contribute OpenDAL to the ASF, embracing the Apache way through joining the incubator program.

What's graduation?

In the Apache Incubator, the OpenDAL community is learning the Apache Way through daily development activities, growing its community and producing Apache releases.

During the incubation, we:

  • Consist of 19 committers, including mentors, with 12 serving as PPMC members.
  • Boast 164 contributors.
  • Made 9 releases—averaging at least one per month.
  • Had 7 different release managers to date.
  • Used by 10 known entities and is a dependency for 263 GitHub projects and 18 crates.io packages.
  • Opened 1,200+ issues with 1,100+ successfully resolved.
  • Submitted a total of 2,400+ PRs, most of them have been merged or closed.

The graduation signifies that the OpenDAL Community is recognized as a mature community, which entails:

  • CODE: OpenDAL is an Apache 2.0 licensed open-source project with accessible, buildable code on GitHub, featuring a traceable history and authenticated code provenance.
  • LICENSE: OpenDAL maintains open-source compliance for all code and dependencies, requires contributor agreements, and clearly documents copyright ownership.
  • Releases: OpenDAL offers standardized, committee-approved source code releases with secure signatures, provides convenience binaries, and has a well-documented, repeatable release process.
  • Quality: OpenDAL is committed to code quality transparency, prioritizes security with quick issue responses, ensures backward compatibility with clear documentation, and actively addresses bug reports in a timely manner.
  • Community: OpenDAL offers a comprehensive homepage, welcomes diverse contributions, promotes a meritocratic approach for active contributors, operates on community consensus, and ensures timely responses to user queries through various channels.
  • Consensus: OpenDAL has a public list of key decision-makers and uses a consensus approach for decisions, documented on its main communication channel. It follows standard voting rules and records all important discussions in writing.
  • Independence: OpenDAL is independent, with contributors from various companies acting on their own, not as representatives of any organization.

What's next?

After graduation, OpenDAL Community will continue to focus on the following aspects under the VISION: access data freely.

More Stable Services

OpenDAL now supports 59 services, although only some of them are stable.

stable for OpenDAL means that

  • Have integration tests covered.
  • Have at least one production user.

The stable service established a feedback loop between the OpenDAL community and its users. Users can submit bug reports or feature requests to the OpenDAL community, which in turn can enhance the service using this feedback while ensuring existing features remain intact.

After graduation, the OpenDAL community will focus on improving the stability of current services instead of just expanding our offerings.

We plan to:

More Useful Documents

OpenDAL have good docs for it's rust core, but not for other language bindings.

The lack of comprehensive documentation makes OpenDAL challenging for users to operate in Java or Python. Without user feedback, the community is unable to enhance this documentation, leading to a detrimental cycle that must be broken.

After graduation, the OpenDAL community will improve the documentation of other language bindings.

We plan to:

  • Introduce code generation to automatically create documentation for the service builder due to its numerous configurations.
  • Add more API Docs and examples for other language bindings.

OpenDAL have good docs for it's public API, but not for its internal design.

OpenDAL is proud of its elegant design, but it is not well documented. This makes it difficult for new contributors to understand the codebase and make contributions.

After graduation, the OpenDAL community will improve the documentation of its internal design.

We plan to:

  • Optimize the codebase to make it easier to understand.
  • Add more blog posts to explain the design of OpenDAL.

More Production Users

OpenDAL requires more production users, as they are vital to the success of our project. Increased user production leads to more valuable feedback, a more engaged contributor base, and a stronger community. We've started the initial loop; let's expand it!

After graduation, the OpenDAL community will focus on attracting more production users.

We plan to:

Conclusion

The OpenDAL Community aims to create a world where users can freely access data across any storage service in any manner they choose. Graduation is just the beginning—let's work together to make our VISION a reality!

- + \ No newline at end of file diff --git a/blog/archive/index.html b/blog/archive/index.html index de8a0576f738..201cd62c5c20 100644 --- a/blog/archive/index.html +++ b/blog/archive/index.html @@ -5,13 +5,13 @@ Archive | Apache OpenDAL™ - + - + \ No newline at end of file diff --git a/blog/how-opendal-read-data/index.html b/blog/how-opendal-read-data/index.html index 51d99756afa3..2bf7e8dafea1 100644 --- a/blog/how-opendal-read-data/index.html +++ b/blog/how-opendal-read-data/index.html @@ -5,13 +5,13 @@ Apache OpenDAL™ Internal: Data Reading | Apache OpenDAL™ - +

Apache OpenDAL™ Internal: Data Reading

· 8 min read

As the Apache OpenDAL™ community continues to grow, new abstractions are constantly being added, which has brought some burdens to new contributors participating in development. Many maintainers hope to have a deeper understanding of OpenDAL's internal implementation. At the same time, OpenDAL's core design has not changed significantly for a long time, making it possible to write a series on internal implementation. I believe now is the time to write a series of articles on OpenDAL's internal implementation, to explain from the maintainer's perspective how OpenDAL is designed, implemented, and how it can be expanded. With the impending release of OpenDAL v0.40, I hope this series of articles will better help the community understand the past, master the present, and shape the future.

The first article will discuss OpenDAL's most commonly used data reading function. I will start from the outermost interface and then gradually unfold according to the calling sequence of OpenDAL. Let's get started!

Overall Framework

Before starting to introduce the specific OpenDAL interface, let's first get familiar with the OpenDAL project.

OpenDAL is an Apache Incubator project aimed at helping users access data from various storage services in a unified, convenient, and efficient way. Its project vision is "free access to data":

  • Free from services: Any service can be accessed freely through native interfaces
  • Free from implementations: No matter how the underlying implementation is, it can be called in a unified way
  • Free to integrate: Able to freely integrate with various services and languages
  • Free to zero cost: Users don't have to pay for features they don't use

On this philosophical foundation, OpenDAL Rust Core can be mainly divided into the following components:

  • Operator: The outer interface exposed to users
  • Layers: Specific implementation of different middleware
  • Services: Specific implementation of different services

From a macroscopic perspective, OpenDAL's data reading call stack would look like this:

All Layers and Services have implemented a unified Accessor interface, erasing all type information when building the Operator. For the Operator, regardless of what services are used or how many middleware are added, all call logic is consistent. This design splits OpenDAL's API into Public API and Raw API, where the Public API is directly exposed to users, providing convenient top-level interfaces, and Raw API is provided to OpenDAL internal developers, maintaining a unified internal interface and providing some convenient implementation.

Operator

OpenDAL's Operator API will adhere to a consistent calling paradigm as much as possible, reducing users' learning and usage costs. For example, OpenDAL offers the following APIs for read:

  • op.read(path): Reads the entire content of the specified file
  • op.reader(path): Creates a Reader for streaming reading
  • op.read_with(path).range(1..1024): Reads file content using specified parameters, such as range
  • op.reader_with(path).range(1..1024): Creates a Reader for streaming reading with specified parameters

It's not hard to see that read is more like syntactic sugar, allowing users to quickly read files without considering various traits like AsyncRead. The reader provides more flexibility, implementing widely-used community traits like AsyncSeek, AsyncRead, allowing more flexible data reading. read_with and reader_with assist users in specifying various parameters in a more natural way through Future Builder functions.

The internal logic of the Operator would look like this:

Its main job is to encapsulate the interface for the user:

  • Completing the construction of OpRead: the args for read operation.
  • Calling the read function provided by Accessor
  • Wrapping the returned value as Reader and implementing interfaces like AsyncSeek, AsyncRead, etc., based on Reader

Layers

A little secret here is that OpenDAL will automatically apply some Layers to the Service to implement some internal logic. As of the completion of this article, OpenDAL's automatically added Layers include:

  • ErrorContextLayer: Injects context information, such as scheme, path, etc., into all returned errors of Operation
  • CompleteLayer: Adds necessary capabilities to services, such as adding seek support to s3
  • TypeEraseLayer: Implements type erasure, uniformly erasing associated types in Accessor, so users don't need to carry generic parameters when using it

Here, ErrorContextLayer and TypeEraseLayer are relatively simple and won't be elaborated on. The focus is on CompleteLayer, aimed at adding seek or next support to OpenDAL's returned Reader in a zero-cost way, so users don't have to re-implement it. OpenDAL initially returned Reader and SeekableReader through different function calls in early versions, but the actual user feedback was not very good; almost all users were using SeekableReader. Therefore, OpenDAL subsequently added seek support as the first priority to the internal Read trait during the refactor:

pub trait Read: Unpin + Send + Sync {
/// Read bytes asynchronously.
fn poll_read(&mut self, cx: &mut Context<'_>, buf: &mut [u8]) -> Poll<Result<usize>>;

/// Seek asynchronously.
///
/// Returns `Unsupported` error if underlying reader doesn't support seek.
fn poll_seek(&mut self, cx: &mut Context<'_>, pos: io::SeekFrom) -> Poll<Result<u64>>;

/// Stream [`Bytes`] from underlying reader.
///
/// Returns `Unsupported` error if underlying reader doesn't support stream.
///
/// This API exists for avoiding bytes copying inside async runtime.
/// Users can poll bytes from underlying reader and decide when to
/// read/consume them.
fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Result<Bytes>>>;
}

To implement a service's reading capability in OpenDAL, one needs to implement this trait, which is an internal interface and will not be directly exposed to users. Among them:

  • poll_read is the most basic requirement; all services must implement this interface.
  • When the service natively supports seek, poll_seek can be implemented, and OpenDAL will correctly dispatch, such as local fs;
  • When the service natively supports next, meaning it returns streaming Bytes, poll_next can be implemented, like HTTP-based services, where the underlying layer is a TCP Stream, and hyper will encapsulate it as a bytes stream.

Through the Read trait, OpenDAL ensures that all services can expose their native support capabilities as much as possible, thereby achieving efficient reading for different services.

Based on this trait, OpenDAL will complete according to the capabilities supported by each service:

  • Both seek/next are supported: Direct return
  • No support for next: Encapsulate using StreamableReader to simulate next support
  • No support for seek: Encapsulate using ByRangeSeekableReader to simulate seek support
  • Neither seek/next supported: Encapsulate using both methods

ByRangeSeekableReader mainly utilizes the service's ability to support range read, dropping the current reader when the user seeks and initiating a new request at the specified location.

OpenDAL exposes a unified Reader implementation through CompleteLayer, so users don't have to worry about whether the underlying service supports seek; OpenDAL will always choose the optimal way to initiate the request.

Services

After the completion of the Layers, it's time to call the specific implementation of the Service. Here, the most common services fs and s3 are used as examples to explain how data is read.

Service fs

tokio::fs::File implements tokio::AsyncRead and tokio::AsyncSeek. Using async_compat::Compat, we have transformed it into futures::AsyncRead and futures::AsyncSeek. Based on this, we provide a built-in function oio::into_read_from_file to transform it into a type that implements oio::Read.

There's nothing particularly complex in the implementation of oio::into_read_from_file; read and seek are mostly calling the functions provided by the incoming File type. The tricky part is about the correct handling of seek and range: seeking to the right side of the range is allowed, and this will not cause an error, and reading will only return empty, but seeking to the left side of the range is illegal, and the Reader must return InvalidInput for proper upper-level handling.

Interesting history: there was an issue in the initial implementation of this part, discovered during fuzz testing.

Services s3

S3 is an HTTP-based service, and opendal provides a lot of HTTP-based wrappers to help developers reuse logic; they only need to build a request and return a well-constructed Body. OpenDAL Raw API encapsulates a set of reqwest-based interfaces, and the HTTP GET interface returns a Response<IncomingAsyncBody>:

/// IncomingAsyncBody carries the content returned by remote servers.
pub struct IncomingAsyncBody {
/// # TODO
///
/// hyper returns `impl Stream<Item = crate::Result<Bytes>>` but we can't
/// write the types in stable. So we will box here.
///
/// After [TAIT](https://rust-lang.github.io/rfcs/2515-type_alias_impl_trait.html)
/// has been stable, we can change `IncomingAsyncBody` into `IncomingAsyncBody<S>`.
inner: oio::Streamer,
size: Option<u64>,
consumed: u64,
chunk: Option<Bytes>,
}

The stream contained in this body is the bytes stream returned by reqwest, and opendal implements content length checks and read support on this basis.

Here's an extra note about a small pitfall with reqwest/hyper: reqwest and hyper do not check the returned content length, so an illegal server may return a data volume that does not match the expected content length instead of an error, leading to unexpected data behavior. OpenDAL specifically added checks here, returning ContentIncomplete when data is insufficient and ContentTruncated when data exceeds expectations, avoiding users receiving illegal data.

Conclusion

This article introduces from top to bottom how OpenDAL implements data reading:

  • Operator is responsible for exposing user-friendly interfaces
  • Layers are responsible for completing the capabilities of the services
  • Services are responsible for the specific implementation of different services

Throughout the entire chain, OpenDAL adheres as much as possible to the principle of zero cost, prioritizing the use of native service capabilities, then considering simulation through other methods, and finally returning unsupported errors. Through this three-tier design, users don't need to understand the details of the underlying service, nor do they need to integrate different service SDKs to easily call op.read(path) to access data in any storage service.

This is: How OpenDAL read data freely!

- + \ No newline at end of file diff --git a/blog/index.html b/blog/index.html index 44791e45e8a6..af151f29eebb 100644 --- a/blog/index.html +++ b/blog/index.html @@ -5,13 +5,13 @@ Blog | Apache OpenDAL™ - +

· 6 min read

Hello, everyone! I'm happy to announce that Apache OpenDAL™ has graduated from the Apache Incubator to become a Top-Level Project of the Apache Software Foundation.

What's Apache OpenDAL?

Apache OpenDAL is a data access layer that allows users to easily and efficiently retrieve data from various storage services in a unified way. Our VISION is access data freely.

OpenDAL could be used as a better SDK for your storage services: A SDK with native integration of retry, logging, metrics, tracing, timeout, throttle, and more.

OpenDAL could be used as a super connector for your storage services: A connector that supports all kinds of storage services from Object Storage (s3, gcs, azblob), File Storage (fs, azdls, hdfs), Consumer Cloud Storage (gdrive, onedrive), Key-Value Storage (rocksdb, sled) to Cache Storage (memcached, moka).

OpenDAL could be used as an elegant client for your storage services: A client with well designed API and many language bindings: Rust, C, Cpp, Dotnet, Go, Haskell, Java, Lua, Node.js, Ocaml, Php, Python, Ruby, Swift and Zig.

Need to access data? Give OpenDAL a try!

async fn main() -> Result<()> {
// Init s3 service.
let mut builder = services::S3::default();
builder.bucket("test");

// Init an operator
let op = Operator::via_map(builder)?
// Add logging
.layer(LoggingLayer::default())
.finish();

// Write data
op.write("hello.txt", "Hello, World!").await?;

// Read data
let bs = op.read("hello.txt").await?;

// Fetch metadata
let meta = op.stat("hello.txt").await?;
let mode = meta.mode();
let length = meta.content_length();

// Delete
op.delete("hello.txt").await?;

Ok(())
}

What's the ASF?

The Apache Software Foundation (ASF) is a nonprofit corporation to support a number of open-source software projects. The Apache Software Foundation exists to provide software for the public good. We believe in the power of community over code, known as The Apache Way. Thousands of people around the world contribute to ASF open source projects every day.

The OpenDAL Community believes the apache way that:

  • Earned Authority: all individuals are given the opportunity to participate, but their influence is based on publicly earned merit – what they contribute to the community.
  • Community of Peers: individuals participate at the ASF, not organizations.
  • Open Communications: as a virtual organization, the ASF requires all communications related to code and decision-making to be publicly accessible to ensure asynchronous collaboration, as necessitated by a globally-distributed community.
  • Consensus Decision Making: Apache Projects are overseen by a self-selected team of active volunteers who are contributing to their respective projects.
  • Responsible Oversight: The ASF governance model is based on trust and delegated oversight.

The original creators Databend chosen to contribute OpenDAL to the ASF, embracing the Apache way through joining the incubator program.

What's graduation?

In the Apache Incubator, the OpenDAL community is learning the Apache Way through daily development activities, growing its community and producing Apache releases.

During the incubation, we:

  • Consist of 19 committers, including mentors, with 12 serving as PPMC members.
  • Boast 164 contributors.
  • Made 9 releases—averaging at least one per month.
  • Had 7 different release managers to date.
  • Used by 10 known entities and is a dependency for 263 GitHub projects and 18 crates.io packages.
  • Opened 1,200+ issues with 1,100+ successfully resolved.
  • Submitted a total of 2,400+ PRs, most of them have been merged or closed.

The graduation signifies that the OpenDAL Community is recognized as a mature community, which entails:

  • CODE: OpenDAL is an Apache 2.0 licensed open-source project with accessible, buildable code on GitHub, featuring a traceable history and authenticated code provenance.
  • LICENSE: OpenDAL maintains open-source compliance for all code and dependencies, requires contributor agreements, and clearly documents copyright ownership.
  • Releases: OpenDAL offers standardized, committee-approved source code releases with secure signatures, provides convenience binaries, and has a well-documented, repeatable release process.
  • Quality: OpenDAL is committed to code quality transparency, prioritizes security with quick issue responses, ensures backward compatibility with clear documentation, and actively addresses bug reports in a timely manner.
  • Community: OpenDAL offers a comprehensive homepage, welcomes diverse contributions, promotes a meritocratic approach for active contributors, operates on community consensus, and ensures timely responses to user queries through various channels.
  • Consensus: OpenDAL has a public list of key decision-makers and uses a consensus approach for decisions, documented on its main communication channel. It follows standard voting rules and records all important discussions in writing.
  • Independence: OpenDAL is independent, with contributors from various companies acting on their own, not as representatives of any organization.

What's next?

After graduation, OpenDAL Community will continue to focus on the following aspects under the VISION: access data freely.

More Stable Services

OpenDAL now supports 59 services, although only some of them are stable.

stable for OpenDAL means that

  • Have integration tests covered.
  • Have at least one production user.

The stable service established a feedback loop between the OpenDAL community and its users. Users can submit bug reports or feature requests to the OpenDAL community, which in turn can enhance the service using this feedback while ensuring existing features remain intact.

After graduation, the OpenDAL community will focus on improving the stability of current services instead of just expanding our offerings.

We plan to:

More Useful Documents

OpenDAL have good docs for it's rust core, but not for other language bindings.

The lack of comprehensive documentation makes OpenDAL challenging for users to operate in Java or Python. Without user feedback, the community is unable to enhance this documentation, leading to a detrimental cycle that must be broken.

After graduation, the OpenDAL community will improve the documentation of other language bindings.

We plan to:

  • Introduce code generation to automatically create documentation for the service builder due to its numerous configurations.
  • Add more API Docs and examples for other language bindings.

OpenDAL have good docs for it's public API, but not for its internal design.

OpenDAL is proud of its elegant design, but it is not well documented. This makes it difficult for new contributors to understand the codebase and make contributions.

After graduation, the OpenDAL community will improve the documentation of its internal design.

We plan to:

  • Optimize the codebase to make it easier to understand.
  • Add more blog posts to explain the design of OpenDAL.

More Production Users

OpenDAL requires more production users, as they are vital to the success of our project. Increased user production leads to more valuable feedback, a more engaged contributor base, and a stronger community. We've started the initial loop; let's expand it!

After graduation, the OpenDAL community will focus on attracting more production users.

We plan to:

Conclusion

The OpenDAL Community aims to create a world where users can freely access data across any storage service in any manner they choose. Graduation is just the beginning—let's work together to make our VISION a reality!

· 4 min read

OwO (Outcome, Working, Outlook) is an Apache OpenDAL™ release blog series, where we share the current work status and future plans.

Hello! It's been a while since our last update. We've been hard at work determining the optimal way to implement new features and improvements. We're thrilled to announce that we'll soon be releasing v0.40.

This post is structured into three main sections:

  • Outcome (1st O in OwO): Summarizes the key accomplishments in the v0.40 release.
  • Working (the w in OwO): Provides an update on our current work.
  • Outlook (2nd O in OwO): Discusses what lies ahead for OpenDAL.

Outcome

OpenDAL now comprises four primary components:

  • Core: The core library written in Rust.
  • Bindings: Language bindings powered by the OpenDAL Rust core.
  • Applications: Applications built using the OpenDAL Rust core.
  • Integrations: Collaborations with other projects.

Core

Unifying Append and Write Functions

OpenDAL has supported append operations since v0.36. We've found, however, that this led to significant duplication between append and write. As a result, we've streamlined the two functionalities into a single write function. Our users can now:

let mut w = op.writer_with("test.txt").append(true).await?;
w.write(content_a).await?;
w.write(content_b).await?;
w.close().await?;

This way, users can reuse the Writer in their own logic without handling append separately.

New Lister API

To improve API consistency, we've made some adjustments to our listing functions. We've added list and list_with methods that perform single operations and renamed the original list to lister and lister_with.

// Old API
let lister: Lister = op.list("dir").await?;

// New API
let entries: Vec<Entry> = op.list("dir").await?;
let lister: Lister = op.lister("dir").await?;

This brings uniformity to our API offerings.

List With Metakey

To speed up list operations, OpenDAL can now fetch and store metadata during the listing process. This eliminates the need for separate metadata calls:

let entries: Vec<Entry> = op
.list_with("dir/")
.metakey(Metakey::ContentLength | Metakey::ContentType).await?;

// Use the metadata directly!
let meta: &Metadata = entries[0].metadata();

This makes metadata retrieval more intuitive.

Buffered Writer

We've added general buffer support to optimize writing operations.

let w = op.writer_with("path/to/file").buffer(8 * 1024 * 1024).await?

Others

Other improvements in the core library can be found in our CHANGELOG.

Bindings

C++

opendal-cpp is ready for its first release! Welcome to check it out and give us some feedback.

Haskell

opendal-hs is ready for its first release! Welcome to check it out and give us some feedback.

Java

opendal-java enabled more available services in this release, allowing user to visit services like redis that not enabled by default in rust core. And opendal-java enabled blocking layer to allow users visit services like s3 in blocking way.

Welcome to integrate opendal-java into your project and give us some feedback.

New bindings!

Applications

oay

oay is OpenDAL Gateway that allows users to access OpenDAL services via existing protocols like s3 and webdav. It works like a proxy that forwarding requests to OpenDAL services.

In this release, we implement basic webdav support. Users can convert any storage services to a webdav server!

oli

oli is OpenDAL CLI that allows users to access storage services via CLI like s3cmd and gcloud does.

We fixed some experience issues in this release and improved some docs. Welcome to try it out and give us some feedback.

Integrations

object_store

object_store instead to implement object_store's trait over OpenDAL Operator so that users can use OpenDAL as a backend for object_store.

object_store is mostly functional, but there are some edge use cases that OpenDAL has yet to support.

So far, this release hasn't seen progress in this area; we are awaiting the resolution of the issue Allow list paths that do not end with /.

Working

We are working on the following things:

  • object_store support: Make object_store integration works and find a user for it.
  • Remove the / limitation for path, so we can list a path without ending with /.
  • Expand the start-after support to more services (Address #2786).

Outlook

We are exploring some innovative ideas:

  • OpenDAL REST/gRPC API: A REST/gRPC Server for OpenDAL.
  • OpenDAL Cache: OpenDAL native cache libs that allowing users to access data more efficiently.
  • OpenDAL File System: A read-only file system that built upon OpenDAL in rust!
  • kio-opendal: A kio plugin powered by OpenDAL that allows users to visit different storage services in KDE Dolphin.
  • gvfs-opendal: A gvfs plugin powered by OpenDAL that allows users to visit different storage services in GNOME Files

Feel free to join in the discussion!

Summary

This marks our first OpenDAL OwO post. We welcome your feedback.

· 8 min read

As the Apache OpenDAL™ community continues to grow, new abstractions are constantly being added, which has brought some burdens to new contributors participating in development. Many maintainers hope to have a deeper understanding of OpenDAL's internal implementation. At the same time, OpenDAL's core design has not changed significantly for a long time, making it possible to write a series on internal implementation. I believe now is the time to write a series of articles on OpenDAL's internal implementation, to explain from the maintainer's perspective how OpenDAL is designed, implemented, and how it can be expanded. With the impending release of OpenDAL v0.40, I hope this series of articles will better help the community understand the past, master the present, and shape the future.

The first article will discuss OpenDAL's most commonly used data reading function. I will start from the outermost interface and then gradually unfold according to the calling sequence of OpenDAL. Let's get started!

Overall Framework

Before starting to introduce the specific OpenDAL interface, let's first get familiar with the OpenDAL project.

OpenDAL is an Apache Incubator project aimed at helping users access data from various storage services in a unified, convenient, and efficient way. Its project vision is "free access to data":

  • Free from services: Any service can be accessed freely through native interfaces
  • Free from implementations: No matter how the underlying implementation is, it can be called in a unified way
  • Free to integrate: Able to freely integrate with various services and languages
  • Free to zero cost: Users don't have to pay for features they don't use

On this philosophical foundation, OpenDAL Rust Core can be mainly divided into the following components:

  • Operator: The outer interface exposed to users
  • Layers: Specific implementation of different middleware
  • Services: Specific implementation of different services

From a macroscopic perspective, OpenDAL's data reading call stack would look like this:

All Layers and Services have implemented a unified Accessor interface, erasing all type information when building the Operator. For the Operator, regardless of what services are used or how many middleware are added, all call logic is consistent. This design splits OpenDAL's API into Public API and Raw API, where the Public API is directly exposed to users, providing convenient top-level interfaces, and Raw API is provided to OpenDAL internal developers, maintaining a unified internal interface and providing some convenient implementation.

Operator

OpenDAL's Operator API will adhere to a consistent calling paradigm as much as possible, reducing users' learning and usage costs. For example, OpenDAL offers the following APIs for read:

  • op.read(path): Reads the entire content of the specified file
  • op.reader(path): Creates a Reader for streaming reading
  • op.read_with(path).range(1..1024): Reads file content using specified parameters, such as range
  • op.reader_with(path).range(1..1024): Creates a Reader for streaming reading with specified parameters

It's not hard to see that read is more like syntactic sugar, allowing users to quickly read files without considering various traits like AsyncRead. The reader provides more flexibility, implementing widely-used community traits like AsyncSeek, AsyncRead, allowing more flexible data reading. read_with and reader_with assist users in specifying various parameters in a more natural way through Future Builder functions.

The internal logic of the Operator would look like this:

Its main job is to encapsulate the interface for the user:

  • Completing the construction of OpRead: the args for read operation.
  • Calling the read function provided by Accessor
  • Wrapping the returned value as Reader and implementing interfaces like AsyncSeek, AsyncRead, etc., based on Reader

Layers

A little secret here is that OpenDAL will automatically apply some Layers to the Service to implement some internal logic. As of the completion of this article, OpenDAL's automatically added Layers include:

  • ErrorContextLayer: Injects context information, such as scheme, path, etc., into all returned errors of Operation
  • CompleteLayer: Adds necessary capabilities to services, such as adding seek support to s3
  • TypeEraseLayer: Implements type erasure, uniformly erasing associated types in Accessor, so users don't need to carry generic parameters when using it

Here, ErrorContextLayer and TypeEraseLayer are relatively simple and won't be elaborated on. The focus is on CompleteLayer, aimed at adding seek or next support to OpenDAL's returned Reader in a zero-cost way, so users don't have to re-implement it. OpenDAL initially returned Reader and SeekableReader through different function calls in early versions, but the actual user feedback was not very good; almost all users were using SeekableReader. Therefore, OpenDAL subsequently added seek support as the first priority to the internal Read trait during the refactor:

pub trait Read: Unpin + Send + Sync {
/// Read bytes asynchronously.
fn poll_read(&mut self, cx: &mut Context<'_>, buf: &mut [u8]) -> Poll<Result<usize>>;

/// Seek asynchronously.
///
/// Returns `Unsupported` error if underlying reader doesn't support seek.
fn poll_seek(&mut self, cx: &mut Context<'_>, pos: io::SeekFrom) -> Poll<Result<u64>>;

/// Stream [`Bytes`] from underlying reader.
///
/// Returns `Unsupported` error if underlying reader doesn't support stream.
///
/// This API exists for avoiding bytes copying inside async runtime.
/// Users can poll bytes from underlying reader and decide when to
/// read/consume them.
fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Result<Bytes>>>;
}

To implement a service's reading capability in OpenDAL, one needs to implement this trait, which is an internal interface and will not be directly exposed to users. Among them:

  • poll_read is the most basic requirement; all services must implement this interface.
  • When the service natively supports seek, poll_seek can be implemented, and OpenDAL will correctly dispatch, such as local fs;
  • When the service natively supports next, meaning it returns streaming Bytes, poll_next can be implemented, like HTTP-based services, where the underlying layer is a TCP Stream, and hyper will encapsulate it as a bytes stream.

Through the Read trait, OpenDAL ensures that all services can expose their native support capabilities as much as possible, thereby achieving efficient reading for different services.

Based on this trait, OpenDAL will complete according to the capabilities supported by each service:

  • Both seek/next are supported: Direct return
  • No support for next: Encapsulate using StreamableReader to simulate next support
  • No support for seek: Encapsulate using ByRangeSeekableReader to simulate seek support
  • Neither seek/next supported: Encapsulate using both methods

ByRangeSeekableReader mainly utilizes the service's ability to support range read, dropping the current reader when the user seeks and initiating a new request at the specified location.

OpenDAL exposes a unified Reader implementation through CompleteLayer, so users don't have to worry about whether the underlying service supports seek; OpenDAL will always choose the optimal way to initiate the request.

Services

After the completion of the Layers, it's time to call the specific implementation of the Service. Here, the most common services fs and s3 are used as examples to explain how data is read.

Service fs

tokio::fs::File implements tokio::AsyncRead and tokio::AsyncSeek. Using async_compat::Compat, we have transformed it into futures::AsyncRead and futures::AsyncSeek. Based on this, we provide a built-in function oio::into_read_from_file to transform it into a type that implements oio::Read.

There's nothing particularly complex in the implementation of oio::into_read_from_file; read and seek are mostly calling the functions provided by the incoming File type. The tricky part is about the correct handling of seek and range: seeking to the right side of the range is allowed, and this will not cause an error, and reading will only return empty, but seeking to the left side of the range is illegal, and the Reader must return InvalidInput for proper upper-level handling.

Interesting history: there was an issue in the initial implementation of this part, discovered during fuzz testing.

Services s3

S3 is an HTTP-based service, and opendal provides a lot of HTTP-based wrappers to help developers reuse logic; they only need to build a request and return a well-constructed Body. OpenDAL Raw API encapsulates a set of reqwest-based interfaces, and the HTTP GET interface returns a Response<IncomingAsyncBody>:

/// IncomingAsyncBody carries the content returned by remote servers.
pub struct IncomingAsyncBody {
/// # TODO
///
/// hyper returns `impl Stream<Item = crate::Result<Bytes>>` but we can't
/// write the types in stable. So we will box here.
///
/// After [TAIT](https://rust-lang.github.io/rfcs/2515-type_alias_impl_trait.html)
/// has been stable, we can change `IncomingAsyncBody` into `IncomingAsyncBody<S>`.
inner: oio::Streamer,
size: Option<u64>,
consumed: u64,
chunk: Option<Bytes>,
}

The stream contained in this body is the bytes stream returned by reqwest, and opendal implements content length checks and read support on this basis.

Here's an extra note about a small pitfall with reqwest/hyper: reqwest and hyper do not check the returned content length, so an illegal server may return a data volume that does not match the expected content length instead of an error, leading to unexpected data behavior. OpenDAL specifically added checks here, returning ContentIncomplete when data is insufficient and ContentTruncated when data exceeds expectations, avoiding users receiving illegal data.

Conclusion

This article introduces from top to bottom how OpenDAL implements data reading:

  • Operator is responsible for exposing user-friendly interfaces
  • Layers are responsible for completing the capabilities of the services
  • Services are responsible for the specific implementation of different services

Throughout the entire chain, OpenDAL adheres as much as possible to the principle of zero cost, prioritizing the use of native service capabilities, then considering simulation through other methods, and finally returning unsupported errors. Through this three-tier design, users don't need to understand the details of the underlying service, nor do they need to integrate different service SDKs to easily call op.read(path) to access data in any storage service.

This is: How OpenDAL read data freely!

· 5 min read

If you're committed to building cloud-native, cross-cloud-first applications and services, or you want to support configurable storage backends to meet complex data access needs, or if you're tired of juggling various SDKs and hoping for a unified abstraction and development experience, Apache OpenDAL™ will be your perfect partner.

OpenDAL Arch

- + \ No newline at end of file diff --git a/blog/opendal-access-data-freely/index.html b/blog/opendal-access-data-freely/index.html index 5cffaa8389ba..1282cf52e6be 100644 --- a/blog/opendal-access-data-freely/index.html +++ b/blog/opendal-access-data-freely/index.html @@ -5,13 +5,13 @@ Apache OpenDAL™: Access Data Freely | Apache OpenDAL™ - +

Apache OpenDAL™: Access Data Freely

· 5 min read

If you're committed to building cloud-native, cross-cloud-first applications and services, or you want to support configurable storage backends to meet complex data access needs, or if you're tired of juggling various SDKs and hoping for a unified abstraction and development experience, Apache OpenDAL™ will be your perfect partner.

OpenDAL Arch

What is OpenDAL?

OpenDAL is a data access layer that allows users to easily and efficiently retrieve data from various storage services in a unified way.

Data Access Layer means: OpenDAL is in a critical position in the data read-write process. We shield the implementation details of different storage backends and provide a set of unified interface abstractions externally.

Next, let's try to answer "What OpenDAL is not" and deconstruct OpenDAL from another perspective:

Opendal Is Not a Proxy Service

OpenDAL is provided in the form of a library, not as a service or application that proxies various storage backends.

If you want to integrate OpenDAL into an existing project, you need to call OpenDAL's interface directly through the bindings supported by OpenDAL to access the storage services.

Opendal Is Not an SDK Aggregator

Although OpenDAL replaces various SDKs in the application architecture, it is not implemented as an SDK aggregator.

In other words, OpenDAL does not simply call various storage service SDKs. We have developed our own docking with various storage services based on a unified Rust core to ensure that the differences between services are smoothed out.

For example, for S3, OpenDAL manually constructs HTTP requests and parses HTTP responses to ensure that all behaviors comply with API specifications and are fully under the control of OpenDAL. Due to OpenDAL's native takeover of the data access process, we can easily implement unified retry and logging mechanisms for various storage backends and ensure behavioral consistency.

For compatible services with S3, due to the limitations of native storage services and differences in API implementation, compatibility and behavioral details may differ from S3. For example, OSS needs to set an independent header to ensure consistent behavior for Range. In addition to docking with native storage services, OpenDAL will also perform targeted processing for compatible services to ensure users' data access experience.

Advantages of OpenDAL

OpenDAL is not the only project dedicated to providing data access abstraction, but compared to other similar projects, OpenDAL has the following advantages:

Rich Service Support

OpenDAL supports dozens of storage services, covering a wide range of scenarios and supporting on-demand selection:

  • Standard Storage Protocols: FTP, HTTP, SFTP, WebDAV, etc.
  • Object Storage Services: azblob, gcs, obs, oss, s3, etc.
  • File Storage Services: fs, azdls, hdfs, webhdfs, ipfs, etc.
  • Consumer Cloud Storage Service: Google Drive, OneDrive, Dropbox, etc.
  • Key-Value Storage Service: Memory, Redis, Rocksdb, etc.
  • Cache Storage Service: Ghac, Memcached, etc.

Complete Cross-Language Bindings

With Rust as the core, OpenDAL now provides binding support for multiple languages such as Python/Node.js/Java/C and is also actively developing bindings for other languages.

Cross-language bindings not only provide unified storage access abstractions for other languages but also follow naming conventions and development habits that are common in various languages as much as possible to pave the way for quick use.

Powerful Middleware Support

OpenDAL offers native layer support, enabling users to implement middleware or intercept for all operations.

  • Error Retry: OpenDAL supports fine-grained error retry capabilities. In addition to common request retries, it supports breakpoint resumable transmission without having to re-read the entire file.
  • Observability: OpenDAL implements logging,tracing,and metrics support for all operations. Turning on middleware can directly obtain observability capabilities for storage.
  • Concurrency control, flow control, fuzz testing, and more.

Easy to Use

OpenDAL's API has been well designed and polished in actual use. The documentation covers everything and is easy to get started with. Here's an example of using Python bindings to access HDFS:

import opendal

op = opendal.Operator("hdfs", name_node="hdfs://192.16.8.10.103")
op.read("path/to/file")

Use Cases of OpenDAL

Currently, OpenDAL is widely used in various scenarios that require cloud-native capabilities, including but not limited to databases, data pipelines, and caches. The main user cases include:

  • Databend: A modern Elasticity and Performance cloud data warehouse. Using OpenDAL to read and write persistent data (s3, azblob, gcs, hdfs, etc.) and cache data (fs, redis, rocksdb, moka, etc.).
  • GreptimeDB: An open-source, cloud-native, distributed time-series database. Using OpenDAL to read and write persistent data (s3, azblob, etc.).
  • mozilla/sccache: sccache is ccache with cloud storage. Using OpenDAL to read and write cache data (s3 and ghac, etc.).
  • RisingWave: A Distributed SQL Database for Stream Processing. Using OpenDAL to read and write persistent data (s3, azblob, hdfs, etc.).
  • Vector: A high-performance observability data pipeline. Using OpenDAL to write persistent data (currently mainly using hdfs).

Future Plans of OpenDAL

In addition to further meeting the needs of cloud-native data access, OpenDAL will continue to expand user scenarios and actively explore its use in data science and mobile applications. At the same time, OpenDAL will continue to polish its existing implementations and bindings to provide users with a better integration experience.

OpenDAL will also explore how to improve users' workflows in data management and service integration:

  • Polish the oli command-line tool to help users manage data painlessly.
  • Implement the oay proxy service to provide users with high-quality compatible APIs.

In addition, since OpenDAL is currently a cross-language project, we also plan to write a series of introductory tutorials to help everyone learn OpenDAL from scratch while learning the language.

- + \ No newline at end of file diff --git a/blog/opendal-entered-apache-incubator/index.html b/blog/opendal-entered-apache-incubator/index.html index bbd65b580069..1f4c30772eb5 100644 --- a/blog/opendal-entered-apache-incubator/index.html +++ b/blog/opendal-entered-apache-incubator/index.html @@ -5,13 +5,13 @@ Way to Go: OpenDAL successfully entered Apache Incubator | Apache OpenDAL™ - +

Way to Go: OpenDAL successfully entered Apache Incubator

· 5 min read

OpenDAL successfully entered Apache Incubator

On February 27th, 2023, the OpenDAL project achieved a milestone by winning the approval to join the incubator of the Apache Software Foundation (ASF), the world's leading open source software organization. On March 15th, the OpenDAL project was officially transferred to the Apache Software Foundation.

This is a significant moment for Databend, as it means that OpenDAL's technology and vision have received wider recognition and support from the open source community.

The Apache Incubator was established in October 2002 to provide a path for projects and codebases that aspire to become part of the Apache Software Foundation. Incubating projects need to follow ASF's governance and operational practices, and use ASF's infrastructure and resources. Incubating projects need to go through a series of stages and evaluations before they can graduate to become top-level projects (TLPs) of ASF.

Apache OpenDAL Project Incubation Status - Apache Incubator

https://incubator.apache.org/projects/opendal.html

What is OpenDAL?

Data is one of the most important assets in the future, and data access is the key for realizing data value.

There are various kinds of storage services in the market, each with its own unique interfaces and features, which bring a lot of complexity and inconvenience to data access.

OpenDAL provides a unified, simple, efficient, reliable, and observable data access layer that allows developers to seamlessly use different storage services and enjoy the best user experience.

M*N to M+N with OpenDAL

OpenDAL simplifies the process of interfacing different storage services, and provides features such as automatic retry, request optimization, and observability. With OpenDAL, developers can directly access a bunch of storage services, without having to understand and master the details of specific SDKs.

OpenDAL's features include but are not limited to:

  • Support for dozens of storage services, including local file system, HDFS, S3, OSS, etc.
  • Provide a unified data access interface, without worrying about the underlying storage details.
  • Support for various common data operations, including read, write, list, etc.
  • Support for automatic retry, request optimization, and observability mechanisms.
  • Zero cost, directly mapped to API calls.
  • Cross-language bindings: Python, Node.js, C (being worked on), etc.

The Story about OpenDAL

Born for Universal Data Access

OpenDAL originated from the vision of creating a universal, unified and user-friendly data access layer. It came into being in late 2021, initially as a component of the Databend project.

  • On December 21, 2021, Xuanwo embarked on the design and re-implementation of Databend's storage access layer, dal2: Add basic operations of read, write, stat, delete.
  • On December 27, 2021, the proposal: Vision of Databend DAL was put forward and discussed. On December 29th, dal2's implementation was integrated into Databend.
  • On February 14th 2022 , dal2 officially separated from Databend's code repository and became a standalone top-level project. It was formally renamed OpenDAL.

From One to Multiple

Thanks to Xuanwo, ClSlaid and many other contributors, OpenDAL quickly became a data access layer that supports mainstream storage services such as AWS S3 / Azure Blob / GCS / HDFS, and provided cross-cloud native storage and access support for Databend's COPY INTO, Stage, Storage.

GreptimeDB was the first large-scale Rust database project to actively use OpenDAL after Databend. Later, with Xuanwo's efforts, sccache under Mozilla also tried to use OpenDAL to take over the storage layer. In order to provide more comprehensive support, OpenDAL soon added support for GitHub Action Cache.

Then, RisingWave and Vector were supported as well. The number of OpenDAL users started to grow. More and more users choose OpenDAL as their storage access layer.

Sky's the Limit

OpenDAL has established a small community and formed a product matrix. In addition to the Rust - opendal, it also provides Python - opendal and Nodejs - opendal bindings.

OpenDAL has released 99 versions since its open source, with 700+ GitHub stars, 349K downloads, and 48 developers. The project has been actively updated. We sincerely thank every contributor for their efforts and dedication.

Being a part of Apache incubator is an important milestone in OpenDAL's development history. We hope to leverage ASF's platform and resources to let OpenDAL focus on providing a neutral, vendor-free, painless, and efficient storage access layer, and better serve the developers.

We expect OpenDAL to be widely used in the following application scenarios:

  • Data analysis: OpenDAL can help data analysts quickly read or write data from different storage services, and perform various format conversions and operations.
  • Data science: OpenDAL can help data scientists easily get or save data from different storage services, and perform various preprocessing and postprocessing.
  • Data engineering: OpenDAL can help data engineers efficiently build and manage data pipelines between different storage services, and perform various monitoring and tuning.

Acknowledgements

From Xuanwo

Hello everyone, I'm Xuanwo, the Committer of Apache OpenDAL.

The OpenDAL project embodies my personal dream. Now it has entered the Apache incubator with the collaboration of the community. I feel very happy at this moment. Thank you all contributors for your contributions, thank Databend Labs for your support, thank Champion tison for your guidance, thank Mentors ningjiang, wusheng, tedliu and hexiaoqiao for your advice.

Let us follow the guidance of Apache Way to build a community together and create value for users by providing free, painless and efficient data access experience!

Join Apache OpenDAL Community

We welcome developers and users who are interested in participating in OpenDAL project to join OpenDAL community and follow OpenDAL's latest news. You can get more information through the following ways:

- + \ No newline at end of file diff --git a/blog/owo-1/index.html b/blog/owo-1/index.html index b72e90919983..793f4b1b4f66 100644 --- a/blog/owo-1/index.html +++ b/blog/owo-1/index.html @@ -5,13 +5,13 @@ OwO #1: The v0.40 Release | Apache OpenDAL™ - +

OwO #1: The v0.40 Release

· 4 min read

OwO (Outcome, Working, Outlook) is an Apache OpenDAL™ release blog series, where we share the current work status and future plans.

Hello! It's been a while since our last update. We've been hard at work determining the optimal way to implement new features and improvements. We're thrilled to announce that we'll soon be releasing v0.40.

This post is structured into three main sections:

  • Outcome (1st O in OwO): Summarizes the key accomplishments in the v0.40 release.
  • Working (the w in OwO): Provides an update on our current work.
  • Outlook (2nd O in OwO): Discusses what lies ahead for OpenDAL.

Outcome

OpenDAL now comprises four primary components:

  • Core: The core library written in Rust.
  • Bindings: Language bindings powered by the OpenDAL Rust core.
  • Applications: Applications built using the OpenDAL Rust core.
  • Integrations: Collaborations with other projects.

Core

Unifying Append and Write Functions

OpenDAL has supported append operations since v0.36. We've found, however, that this led to significant duplication between append and write. As a result, we've streamlined the two functionalities into a single write function. Our users can now:

let mut w = op.writer_with("test.txt").append(true).await?;
w.write(content_a).await?;
w.write(content_b).await?;
w.close().await?;

This way, users can reuse the Writer in their own logic without handling append separately.

New Lister API

To improve API consistency, we've made some adjustments to our listing functions. We've added list and list_with methods that perform single operations and renamed the original list to lister and lister_with.

// Old API
let lister: Lister = op.list("dir").await?;

// New API
let entries: Vec<Entry> = op.list("dir").await?;
let lister: Lister = op.lister("dir").await?;

This brings uniformity to our API offerings.

List With Metakey

To speed up list operations, OpenDAL can now fetch and store metadata during the listing process. This eliminates the need for separate metadata calls:

let entries: Vec<Entry> = op
.list_with("dir/")
.metakey(Metakey::ContentLength | Metakey::ContentType).await?;

// Use the metadata directly!
let meta: &Metadata = entries[0].metadata();

This makes metadata retrieval more intuitive.

Buffered Writer

We've added general buffer support to optimize writing operations.

let w = op.writer_with("path/to/file").buffer(8 * 1024 * 1024).await?

Others

Other improvements in the core library can be found in our CHANGELOG.

Bindings

C++

opendal-cpp is ready for its first release! Welcome to check it out and give us some feedback.

Haskell

opendal-hs is ready for its first release! Welcome to check it out and give us some feedback.

Java

opendal-java enabled more available services in this release, allowing user to visit services like redis that not enabled by default in rust core. And opendal-java enabled blocking layer to allow users visit services like s3 in blocking way.

Welcome to integrate opendal-java into your project and give us some feedback.

New bindings!

Applications

oay

oay is OpenDAL Gateway that allows users to access OpenDAL services via existing protocols like s3 and webdav. It works like a proxy that forwarding requests to OpenDAL services.

In this release, we implement basic webdav support. Users can convert any storage services to a webdav server!

oli

oli is OpenDAL CLI that allows users to access storage services via CLI like s3cmd and gcloud does.

We fixed some experience issues in this release and improved some docs. Welcome to try it out and give us some feedback.

Integrations

object_store

object_store instead to implement object_store's trait over OpenDAL Operator so that users can use OpenDAL as a backend for object_store.

object_store is mostly functional, but there are some edge use cases that OpenDAL has yet to support.

So far, this release hasn't seen progress in this area; we are awaiting the resolution of the issue Allow list paths that do not end with /.

Working

We are working on the following things:

  • object_store support: Make object_store integration works and find a user for it.
  • Remove the / limitation for path, so we can list a path without ending with /.
  • Expand the start-after support to more services (Address #2786).

Outlook

We are exploring some innovative ideas:

  • OpenDAL REST/gRPC API: A REST/gRPC Server for OpenDAL.
  • OpenDAL Cache: OpenDAL native cache libs that allowing users to access data more efficiently.
  • OpenDAL File System: A read-only file system that built upon OpenDAL in rust!
  • kio-opendal: A kio plugin powered by OpenDAL that allows users to visit different storage services in KDE Dolphin.
  • gvfs-opendal: A gvfs plugin powered by OpenDAL that allows users to visit different storage services in GNOME Files

Feel free to join in the discussion!

Summary

This marks our first OpenDAL OwO post. We welcome your feedback.

- + \ No newline at end of file diff --git a/blog/tags/announcement/index.html b/blog/tags/announcement/index.html index bb74cc12c4d1..57bac528cd2b 100644 --- a/blog/tags/announcement/index.html +++ b/blog/tags/announcement/index.html @@ -5,13 +5,13 @@ 3 posts tagged with "announcement" | Apache OpenDAL™ - +

3 posts tagged with "announcement"

View All Tags

· 6 min read

Hello, everyone! I'm happy to announce that Apache OpenDAL™ has graduated from the Apache Incubator to become a Top-Level Project of the Apache Software Foundation.

What's Apache OpenDAL?

Apache OpenDAL is a data access layer that allows users to easily and efficiently retrieve data from various storage services in a unified way. Our VISION is access data freely.

OpenDAL could be used as a better SDK for your storage services: A SDK with native integration of retry, logging, metrics, tracing, timeout, throttle, and more.

OpenDAL could be used as a super connector for your storage services: A connector that supports all kinds of storage services from Object Storage (s3, gcs, azblob), File Storage (fs, azdls, hdfs), Consumer Cloud Storage (gdrive, onedrive), Key-Value Storage (rocksdb, sled) to Cache Storage (memcached, moka).

OpenDAL could be used as an elegant client for your storage services: A client with well designed API and many language bindings: Rust, C, Cpp, Dotnet, Go, Haskell, Java, Lua, Node.js, Ocaml, Php, Python, Ruby, Swift and Zig.

Need to access data? Give OpenDAL a try!

async fn main() -> Result<()> {
// Init s3 service.
let mut builder = services::S3::default();
builder.bucket("test");

// Init an operator
let op = Operator::via_map(builder)?
// Add logging
.layer(LoggingLayer::default())
.finish();

// Write data
op.write("hello.txt", "Hello, World!").await?;

// Read data
let bs = op.read("hello.txt").await?;

// Fetch metadata
let meta = op.stat("hello.txt").await?;
let mode = meta.mode();
let length = meta.content_length();

// Delete
op.delete("hello.txt").await?;

Ok(())
}

What's the ASF?

The Apache Software Foundation (ASF) is a nonprofit corporation to support a number of open-source software projects. The Apache Software Foundation exists to provide software for the public good. We believe in the power of community over code, known as The Apache Way. Thousands of people around the world contribute to ASF open source projects every day.

The OpenDAL Community believes the apache way that:

  • Earned Authority: all individuals are given the opportunity to participate, but their influence is based on publicly earned merit – what they contribute to the community.
  • Community of Peers: individuals participate at the ASF, not organizations.
  • Open Communications: as a virtual organization, the ASF requires all communications related to code and decision-making to be publicly accessible to ensure asynchronous collaboration, as necessitated by a globally-distributed community.
  • Consensus Decision Making: Apache Projects are overseen by a self-selected team of active volunteers who are contributing to their respective projects.
  • Responsible Oversight: The ASF governance model is based on trust and delegated oversight.

The original creators Databend chosen to contribute OpenDAL to the ASF, embracing the Apache way through joining the incubator program.

What's graduation?

In the Apache Incubator, the OpenDAL community is learning the Apache Way through daily development activities, growing its community and producing Apache releases.

During the incubation, we:

  • Consist of 19 committers, including mentors, with 12 serving as PPMC members.
  • Boast 164 contributors.
  • Made 9 releases—averaging at least one per month.
  • Had 7 different release managers to date.
  • Used by 10 known entities and is a dependency for 263 GitHub projects and 18 crates.io packages.
  • Opened 1,200+ issues with 1,100+ successfully resolved.
  • Submitted a total of 2,400+ PRs, most of them have been merged or closed.

The graduation signifies that the OpenDAL Community is recognized as a mature community, which entails:

  • CODE: OpenDAL is an Apache 2.0 licensed open-source project with accessible, buildable code on GitHub, featuring a traceable history and authenticated code provenance.
  • LICENSE: OpenDAL maintains open-source compliance for all code and dependencies, requires contributor agreements, and clearly documents copyright ownership.
  • Releases: OpenDAL offers standardized, committee-approved source code releases with secure signatures, provides convenience binaries, and has a well-documented, repeatable release process.
  • Quality: OpenDAL is committed to code quality transparency, prioritizes security with quick issue responses, ensures backward compatibility with clear documentation, and actively addresses bug reports in a timely manner.
  • Community: OpenDAL offers a comprehensive homepage, welcomes diverse contributions, promotes a meritocratic approach for active contributors, operates on community consensus, and ensures timely responses to user queries through various channels.
  • Consensus: OpenDAL has a public list of key decision-makers and uses a consensus approach for decisions, documented on its main communication channel. It follows standard voting rules and records all important discussions in writing.
  • Independence: OpenDAL is independent, with contributors from various companies acting on their own, not as representatives of any organization.

What's next?

After graduation, OpenDAL Community will continue to focus on the following aspects under the VISION: access data freely.

More Stable Services

OpenDAL now supports 59 services, although only some of them are stable.

stable for OpenDAL means that

  • Have integration tests covered.
  • Have at least one production user.

The stable service established a feedback loop between the OpenDAL community and its users. Users can submit bug reports or feature requests to the OpenDAL community, which in turn can enhance the service using this feedback while ensuring existing features remain intact.

After graduation, the OpenDAL community will focus on improving the stability of current services instead of just expanding our offerings.

We plan to:

More Useful Documents

OpenDAL have good docs for it's rust core, but not for other language bindings.

The lack of comprehensive documentation makes OpenDAL challenging for users to operate in Java or Python. Without user feedback, the community is unable to enhance this documentation, leading to a detrimental cycle that must be broken.

After graduation, the OpenDAL community will improve the documentation of other language bindings.

We plan to:

  • Introduce code generation to automatically create documentation for the service builder due to its numerous configurations.
  • Add more API Docs and examples for other language bindings.

OpenDAL have good docs for it's public API, but not for its internal design.

OpenDAL is proud of its elegant design, but it is not well documented. This makes it difficult for new contributors to understand the codebase and make contributions.

After graduation, the OpenDAL community will improve the documentation of its internal design.

We plan to:

  • Optimize the codebase to make it easier to understand.
  • Add more blog posts to explain the design of OpenDAL.

More Production Users

OpenDAL requires more production users, as they are vital to the success of our project. Increased user production leads to more valuable feedback, a more engaged contributor base, and a stronger community. We've started the initial loop; let's expand it!

After graduation, the OpenDAL community will focus on attracting more production users.

We plan to:

Conclusion

The OpenDAL Community aims to create a world where users can freely access data across any storage service in any manner they choose. Graduation is just the beginning—let's work together to make our VISION a reality!

· 5 min read

If you're committed to building cloud-native, cross-cloud-first applications and services, or you want to support configurable storage backends to meet complex data access needs, or if you're tired of juggling various SDKs and hoping for a unified abstraction and development experience, Apache OpenDAL™ will be your perfect partner.

OpenDAL Arch

- + \ No newline at end of file diff --git a/blog/tags/index.html b/blog/tags/index.html index a980eb3631b6..5ede04b9a306 100644 --- a/blog/tags/index.html +++ b/blog/tags/index.html @@ -5,13 +5,13 @@ Tags | Apache OpenDAL™ - + - + \ No newline at end of file diff --git a/blog/tags/internal/index.html b/blog/tags/internal/index.html index de9856d11250..edd3c5a50a84 100644 --- a/blog/tags/internal/index.html +++ b/blog/tags/internal/index.html @@ -5,13 +5,13 @@ One post tagged with "internal" | Apache OpenDAL™ - +

One post tagged with "internal"

View All Tags

· 8 min read

As the Apache OpenDAL™ community continues to grow, new abstractions are constantly being added, which has brought some burdens to new contributors participating in development. Many maintainers hope to have a deeper understanding of OpenDAL's internal implementation. At the same time, OpenDAL's core design has not changed significantly for a long time, making it possible to write a series on internal implementation. I believe now is the time to write a series of articles on OpenDAL's internal implementation, to explain from the maintainer's perspective how OpenDAL is designed, implemented, and how it can be expanded. With the impending release of OpenDAL v0.40, I hope this series of articles will better help the community understand the past, master the present, and shape the future.

The first article will discuss OpenDAL's most commonly used data reading function. I will start from the outermost interface and then gradually unfold according to the calling sequence of OpenDAL. Let's get started!

Overall Framework

Before starting to introduce the specific OpenDAL interface, let's first get familiar with the OpenDAL project.

OpenDAL is an Apache Incubator project aimed at helping users access data from various storage services in a unified, convenient, and efficient way. Its project vision is "free access to data":

  • Free from services: Any service can be accessed freely through native interfaces
  • Free from implementations: No matter how the underlying implementation is, it can be called in a unified way
  • Free to integrate: Able to freely integrate with various services and languages
  • Free to zero cost: Users don't have to pay for features they don't use

On this philosophical foundation, OpenDAL Rust Core can be mainly divided into the following components:

  • Operator: The outer interface exposed to users
  • Layers: Specific implementation of different middleware
  • Services: Specific implementation of different services

From a macroscopic perspective, OpenDAL's data reading call stack would look like this:

All Layers and Services have implemented a unified Accessor interface, erasing all type information when building the Operator. For the Operator, regardless of what services are used or how many middleware are added, all call logic is consistent. This design splits OpenDAL's API into Public API and Raw API, where the Public API is directly exposed to users, providing convenient top-level interfaces, and Raw API is provided to OpenDAL internal developers, maintaining a unified internal interface and providing some convenient implementation.

Operator

OpenDAL's Operator API will adhere to a consistent calling paradigm as much as possible, reducing users' learning and usage costs. For example, OpenDAL offers the following APIs for read:

  • op.read(path): Reads the entire content of the specified file
  • op.reader(path): Creates a Reader for streaming reading
  • op.read_with(path).range(1..1024): Reads file content using specified parameters, such as range
  • op.reader_with(path).range(1..1024): Creates a Reader for streaming reading with specified parameters

It's not hard to see that read is more like syntactic sugar, allowing users to quickly read files without considering various traits like AsyncRead. The reader provides more flexibility, implementing widely-used community traits like AsyncSeek, AsyncRead, allowing more flexible data reading. read_with and reader_with assist users in specifying various parameters in a more natural way through Future Builder functions.

The internal logic of the Operator would look like this:

Its main job is to encapsulate the interface for the user:

  • Completing the construction of OpRead: the args for read operation.
  • Calling the read function provided by Accessor
  • Wrapping the returned value as Reader and implementing interfaces like AsyncSeek, AsyncRead, etc., based on Reader

Layers

A little secret here is that OpenDAL will automatically apply some Layers to the Service to implement some internal logic. As of the completion of this article, OpenDAL's automatically added Layers include:

  • ErrorContextLayer: Injects context information, such as scheme, path, etc., into all returned errors of Operation
  • CompleteLayer: Adds necessary capabilities to services, such as adding seek support to s3
  • TypeEraseLayer: Implements type erasure, uniformly erasing associated types in Accessor, so users don't need to carry generic parameters when using it

Here, ErrorContextLayer and TypeEraseLayer are relatively simple and won't be elaborated on. The focus is on CompleteLayer, aimed at adding seek or next support to OpenDAL's returned Reader in a zero-cost way, so users don't have to re-implement it. OpenDAL initially returned Reader and SeekableReader through different function calls in early versions, but the actual user feedback was not very good; almost all users were using SeekableReader. Therefore, OpenDAL subsequently added seek support as the first priority to the internal Read trait during the refactor:

pub trait Read: Unpin + Send + Sync {
/// Read bytes asynchronously.
fn poll_read(&mut self, cx: &mut Context<'_>, buf: &mut [u8]) -> Poll<Result<usize>>;

/// Seek asynchronously.
///
/// Returns `Unsupported` error if underlying reader doesn't support seek.
fn poll_seek(&mut self, cx: &mut Context<'_>, pos: io::SeekFrom) -> Poll<Result<u64>>;

/// Stream [`Bytes`] from underlying reader.
///
/// Returns `Unsupported` error if underlying reader doesn't support stream.
///
/// This API exists for avoiding bytes copying inside async runtime.
/// Users can poll bytes from underlying reader and decide when to
/// read/consume them.
fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Result<Bytes>>>;
}

To implement a service's reading capability in OpenDAL, one needs to implement this trait, which is an internal interface and will not be directly exposed to users. Among them:

  • poll_read is the most basic requirement; all services must implement this interface.
  • When the service natively supports seek, poll_seek can be implemented, and OpenDAL will correctly dispatch, such as local fs;
  • When the service natively supports next, meaning it returns streaming Bytes, poll_next can be implemented, like HTTP-based services, where the underlying layer is a TCP Stream, and hyper will encapsulate it as a bytes stream.

Through the Read trait, OpenDAL ensures that all services can expose their native support capabilities as much as possible, thereby achieving efficient reading for different services.

Based on this trait, OpenDAL will complete according to the capabilities supported by each service:

  • Both seek/next are supported: Direct return
  • No support for next: Encapsulate using StreamableReader to simulate next support
  • No support for seek: Encapsulate using ByRangeSeekableReader to simulate seek support
  • Neither seek/next supported: Encapsulate using both methods

ByRangeSeekableReader mainly utilizes the service's ability to support range read, dropping the current reader when the user seeks and initiating a new request at the specified location.

OpenDAL exposes a unified Reader implementation through CompleteLayer, so users don't have to worry about whether the underlying service supports seek; OpenDAL will always choose the optimal way to initiate the request.

Services

After the completion of the Layers, it's time to call the specific implementation of the Service. Here, the most common services fs and s3 are used as examples to explain how data is read.

Service fs

tokio::fs::File implements tokio::AsyncRead and tokio::AsyncSeek. Using async_compat::Compat, we have transformed it into futures::AsyncRead and futures::AsyncSeek. Based on this, we provide a built-in function oio::into_read_from_file to transform it into a type that implements oio::Read.

There's nothing particularly complex in the implementation of oio::into_read_from_file; read and seek are mostly calling the functions provided by the incoming File type. The tricky part is about the correct handling of seek and range: seeking to the right side of the range is allowed, and this will not cause an error, and reading will only return empty, but seeking to the left side of the range is illegal, and the Reader must return InvalidInput for proper upper-level handling.

Interesting history: there was an issue in the initial implementation of this part, discovered during fuzz testing.

Services s3

S3 is an HTTP-based service, and opendal provides a lot of HTTP-based wrappers to help developers reuse logic; they only need to build a request and return a well-constructed Body. OpenDAL Raw API encapsulates a set of reqwest-based interfaces, and the HTTP GET interface returns a Response<IncomingAsyncBody>:

/// IncomingAsyncBody carries the content returned by remote servers.
pub struct IncomingAsyncBody {
/// # TODO
///
/// hyper returns `impl Stream<Item = crate::Result<Bytes>>` but we can't
/// write the types in stable. So we will box here.
///
/// After [TAIT](https://rust-lang.github.io/rfcs/2515-type_alias_impl_trait.html)
/// has been stable, we can change `IncomingAsyncBody` into `IncomingAsyncBody<S>`.
inner: oio::Streamer,
size: Option<u64>,
consumed: u64,
chunk: Option<Bytes>,
}

The stream contained in this body is the bytes stream returned by reqwest, and opendal implements content length checks and read support on this basis.

Here's an extra note about a small pitfall with reqwest/hyper: reqwest and hyper do not check the returned content length, so an illegal server may return a data volume that does not match the expected content length instead of an error, leading to unexpected data behavior. OpenDAL specifically added checks here, returning ContentIncomplete when data is insufficient and ContentTruncated when data exceeds expectations, avoiding users receiving illegal data.

Conclusion

This article introduces from top to bottom how OpenDAL implements data reading:

  • Operator is responsible for exposing user-friendly interfaces
  • Layers are responsible for completing the capabilities of the services
  • Services are responsible for the specific implementation of different services

Throughout the entire chain, OpenDAL adheres as much as possible to the principle of zero cost, prioritizing the use of native service capabilities, then considering simulation through other methods, and finally returning unsupported errors. Through this three-tier design, users don't need to understand the details of the underlying service, nor do they need to integrate different service SDKs to easily call op.read(path) to access data in any storage service.

This is: How OpenDAL read data freely!

- + \ No newline at end of file diff --git a/blog/tags/owo/index.html b/blog/tags/owo/index.html index b58e69637278..2e1f98002386 100644 --- a/blog/tags/owo/index.html +++ b/blog/tags/owo/index.html @@ -5,13 +5,13 @@ One post tagged with "owo" | Apache OpenDAL™ - +

One post tagged with "owo"

View All Tags

· 4 min read

OwO (Outcome, Working, Outlook) is an Apache OpenDAL™ release blog series, where we share the current work status and future plans.

Hello! It's been a while since our last update. We've been hard at work determining the optimal way to implement new features and improvements. We're thrilled to announce that we'll soon be releasing v0.40.

This post is structured into three main sections:

  • Outcome (1st O in OwO): Summarizes the key accomplishments in the v0.40 release.
  • Working (the w in OwO): Provides an update on our current work.
  • Outlook (2nd O in OwO): Discusses what lies ahead for OpenDAL.

Outcome

OpenDAL now comprises four primary components:

  • Core: The core library written in Rust.
  • Bindings: Language bindings powered by the OpenDAL Rust core.
  • Applications: Applications built using the OpenDAL Rust core.
  • Integrations: Collaborations with other projects.

Core

Unifying Append and Write Functions

OpenDAL has supported append operations since v0.36. We've found, however, that this led to significant duplication between append and write. As a result, we've streamlined the two functionalities into a single write function. Our users can now:

let mut w = op.writer_with("test.txt").append(true).await?;
w.write(content_a).await?;
w.write(content_b).await?;
w.close().await?;

This way, users can reuse the Writer in their own logic without handling append separately.

New Lister API

To improve API consistency, we've made some adjustments to our listing functions. We've added list and list_with methods that perform single operations and renamed the original list to lister and lister_with.

// Old API
let lister: Lister = op.list("dir").await?;

// New API
let entries: Vec<Entry> = op.list("dir").await?;
let lister: Lister = op.lister("dir").await?;

This brings uniformity to our API offerings.

List With Metakey

To speed up list operations, OpenDAL can now fetch and store metadata during the listing process. This eliminates the need for separate metadata calls:

let entries: Vec<Entry> = op
.list_with("dir/")
.metakey(Metakey::ContentLength | Metakey::ContentType).await?;

// Use the metadata directly!
let meta: &Metadata = entries[0].metadata();

This makes metadata retrieval more intuitive.

Buffered Writer

We've added general buffer support to optimize writing operations.

let w = op.writer_with("path/to/file").buffer(8 * 1024 * 1024).await?

Others

Other improvements in the core library can be found in our CHANGELOG.

Bindings

C++

opendal-cpp is ready for its first release! Welcome to check it out and give us some feedback.

Haskell

opendal-hs is ready for its first release! Welcome to check it out and give us some feedback.

Java

opendal-java enabled more available services in this release, allowing user to visit services like redis that not enabled by default in rust core. And opendal-java enabled blocking layer to allow users visit services like s3 in blocking way.

Welcome to integrate opendal-java into your project and give us some feedback.

New bindings!

Applications

oay

oay is OpenDAL Gateway that allows users to access OpenDAL services via existing protocols like s3 and webdav. It works like a proxy that forwarding requests to OpenDAL services.

In this release, we implement basic webdav support. Users can convert any storage services to a webdav server!

oli

oli is OpenDAL CLI that allows users to access storage services via CLI like s3cmd and gcloud does.

We fixed some experience issues in this release and improved some docs. Welcome to try it out and give us some feedback.

Integrations

object_store

object_store instead to implement object_store's trait over OpenDAL Operator so that users can use OpenDAL as a backend for object_store.

object_store is mostly functional, but there are some edge use cases that OpenDAL has yet to support.

So far, this release hasn't seen progress in this area; we are awaiting the resolution of the issue Allow list paths that do not end with /.

Working

We are working on the following things:

  • object_store support: Make object_store integration works and find a user for it.
  • Remove the / limitation for path, so we can list a path without ending with /.
  • Expand the start-after support to more services (Address #2786).

Outlook

We are exploring some innovative ideas:

  • OpenDAL REST/gRPC API: A REST/gRPC Server for OpenDAL.
  • OpenDAL Cache: OpenDAL native cache libs that allowing users to access data more efficiently.
  • OpenDAL File System: A read-only file system that built upon OpenDAL in rust!
  • kio-opendal: A kio plugin powered by OpenDAL that allows users to visit different storage services in KDE Dolphin.
  • gvfs-opendal: A gvfs plugin powered by OpenDAL that allows users to visit different storage services in GNOME Files

Feel free to join in the discussion!

Summary

This marks our first OpenDAL OwO post. We welcome your feedback.

- + \ No newline at end of file diff --git a/community/category/committers/index.html b/community/category/committers/index.html index 489f7f4ef934..a76cb3e2894d 100644 --- a/community/category/committers/index.html +++ b/community/category/committers/index.html @@ -5,13 +5,13 @@ Committers | Apache OpenDAL™ - + - + \ No newline at end of file diff --git a/community/category/pmc-members/index.html b/community/category/pmc-members/index.html index a965facef3a5..19cdc095e9f7 100644 --- a/community/category/pmc-members/index.html +++ b/community/category/pmc-members/index.html @@ -5,13 +5,13 @@ Committers | Apache OpenDAL™ - + - + \ No newline at end of file diff --git a/community/category/reference/index.html b/community/category/reference/index.html index 311af32a4c12..886a2caa7c7b 100644 --- a/community/category/reference/index.html +++ b/community/category/reference/index.html @@ -5,13 +5,13 @@ Reference | Apache OpenDAL™ - + - + \ No newline at end of file diff --git a/community/committers/onboarding/index.html b/community/committers/onboarding/index.html index deb9d2007d1b..c5f79f66e3b9 100644 --- a/community/committers/onboarding/index.html +++ b/community/committers/onboarding/index.html @@ -5,14 +5,14 @@ Onboarding | Apache OpenDAL™ - +

Onboarding

This document primarily serves as a guide for new committers to Apache OpenDAL™.

Upon receiving an invitation email from OpenDAL PMC, a new committer should consider whether accepting. If they decide in favor, they should select "Reply All" and express their decision.

Submit CLA

  1. Download the ICLA from https://www.apache.org/licenses/contributor-agreements.html#clas. If a corporation assigns employees to work on an Apache project, please download the CCLA.
  2. Complete the ICLA based on your particulars. Please note:
  3. Sign the document by hand or by electronic signature
  4. Send your icla.pdf (and icla.pdf.asc if PGP-signed) to secretary@apache.org.

After waiting for some time, you will receive an email notifying you that your CLA has been successfully recorded.

Setup ASF Account

When receiving an email with the subject "Welcome to the Apache Software Foundation" from root@apache.org, we can begin setting up an ASF account.

Setup LDAP Password

  1. Go to https://id.apache.org/reset/enter and enter your ApacheID.
  2. Check your email and click the provided link to reset your password.
  1. Navigate to https://gitbox.apache.org/boxer/ and enter your ApacheID and password.
  2. Click "Authenticate with GitHub" and follow the given instructions to link your ASF account to GitHub.
  3. Check your email titled "[GitHub] @asfgit has invited you to join the @apache organization" and accept the invitation.
  4. Wait momentarily, and the website will refresh on its own.
  5. (If you do not enable 2FA on GitHub) Please follow the instruction.

Your ApacheID and GitHub ID will now both appear on https://gitbox.apache.org/boxer/. Congrats on successfully linking your ASF account to GitHub!

Email Settings

Note: Apache does not provide a mailbox directly.

Receive Email

You can change your forwarding email address at Apache Account Utility Platform

Send Email

To send emails using your apache.org address, configure your email client to leverage the mail-relay service. For specifics, refer to this guide.

Here's an illustration for Gmail users:

  1. Open Gmail settings and select "See all settings".
  2. Navigate to "Accounts and Import", then locate "Send mail as".
  3. Click "Add another email address" and enter your name and apache.org email address.
  4. Input the SMTP server information:
    • SMTP Server: mail-relay.apache.org
    • Port: 587
    • Username: your apacheID
    • Password: your apacheID password
    • Secured connection using TLS
  5. Click "Add account" and you will receive an email from Gmail that need to confirm.

Gmail Settings

Subscribe to Mailing List

  1. Send email to dev-subscribe@opendal.apache.org
  2. You will receive an email with the subject "confirm subscribe to dev@opendal.apache.org"
  3. Reply to the email with "Confirm" in the body

If you receive an email with the subject "WELCOME to dev@opendal.apache.org", you have successfully subscribed to the mailing list.

Setup 1password

OpenDAL offers a 1Password open-source team license for conducting local integration tests (Thanks to 1Password!). Once you have been added to OpenDAL's committer list, one of the PMC members will invite you to join the team.

Please download your preferred clients to begin using it. You can create your own vault that is accessible only by yourself. Neither the 1password team nor OpenDAL PMC members can access it unless you choose to share it.

Summit PR for News

Add your name and GitHub ID to the website/community/news.md file and submit a PR for the website.

- + \ No newline at end of file diff --git a/community/committers/reference/generate_release_note/index.html b/community/committers/reference/generate_release_note/index.html index b77ade1c81b8..785122d72095 100644 --- a/community/committers/reference/generate_release_note/index.html +++ b/community/committers/reference/generate_release_note/index.html @@ -5,13 +5,13 @@ Generate release note | Apache OpenDAL™ - +

Generate release note

This document describes how to generate release notes using GitHub:

  1. Go to https://github.com/apache/opendal/releases/new to start a new release.
  2. Fill the tag with draft.
  3. Click on Generate release notes to generate them.
  4. Copy the generated content and close the page.

Please note that we only use this feature to generate release notes, so please do not click on Publish Release or Save draft. We will publish it after creating the tag.

- + \ No newline at end of file diff --git a/community/committers/reference/setup_gpg/index.html b/community/committers/reference/setup_gpg/index.html index 08756f571ed1..54d0c9a3229a 100644 --- a/community/committers/reference/setup_gpg/index.html +++ b/community/committers/reference/setup_gpg/index.html @@ -5,13 +5,13 @@ Setup GPG key | Apache OpenDAL™ - +

Setup GPG key

note

This section is a brief from the Cryptography with OpenPGP guideline.

Install GPG

For more details, please refer to GPG official website. Here shows one approach to install GPG with apt:

sudo apt install gnupg2

Generate GPG Key

Attentions:

  • Name is best to keep consistent with your full name of Apache ID;
  • Email should be the Apache email;
  • Name is best to only use English to avoid garbled.

Run gpg --full-gen-key and complete the generation interactively:

gpg (GnuPG) 2.2.20; Copyright (C) 2020 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(14) Existing key from card
Your selection? 1 # input 1
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 4096 # input 4096
Requested keysize is 4096 bits
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 0 # input 0
Key does not expire at all
Is this correct? (y/N) y # input y

GnuPG needs to construct a user ID to identify your key.

Real name: Hulk Lin # input your name
Email address: hulk@apache.org # input your email
Comment: # input some annotations, optional
You selected this USER-ID:
"Hulk <hulk@apache.org>"

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O # input O
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.

# Input the security key
┌──────────────────────────────────────────────────────┐
│ Please enter this passphrase │
│ │
│ Passphrase: _______________________________ │
│ │
<OK> <Cancel>
└──────────────────────────────────────────────────────┘
# key generation will be done after your inputting the key with the following output
gpg: key E49B00F626B marked as ultimately trusted
gpg: revocation certificate stored as '/Users/hulk/.gnupg/openpgp-revocs.d/F77B887A4F25A9468C513E9AA3008E49B00F626B.rev'
public and secret key created and signed.

pub rsa4096 2022-07-12 [SC]
F77B887A4F25A9468C513E9AA3008E49B00F626B
uid [ultimate] hulk <hulk@apache.org>
sub rsa4096 2022-07-12 [E]

Upload your key to public GPG keyserver

Firstly, list your key:

gpg --list-keys

The output is like:

-------------------------------
pub rsa4096 2022-07-12 [SC]
F77B887A4F25A9468C513E9AA3008E49B00F626B
uid [ultimate] hulk <hulk@apache.org>
sub rsa4096 2022-07-12 [E]

Then, send your key id to key server:

gpg --keyserver keys.openpgp.org --send-key <key-id> # e.g., F77B887A4F25A9468C513E9AA3008E49B00F626B

Among them, keys.openpgp.org is a randomly selected keyserver, you can use keyserver.ubuntu.com or any other full-featured keyserver.

Check whether the key is created successfully

Uploading takes about one minute; after that, you can check by your email at the corresponding keyserver.

Uploading keys to the keyserver is mainly for joining a Web of Trust.

Add your GPG public key to the KEYS document

info

SVN is required for this step.

The svn repository of the release branch is: https://dist.apache.org/repos/dist/release/opendal

Please always add the public key to KEYS in the release branch:

svn co https://dist.apache.org/repos/dist/release/opendal opendal-dist
# As this step will copy all the versions, it will take some time. If the network is broken, please use svn cleanup to delete the lock before re-execute it.
cd opendal-dist
(gpg --list-sigs YOUR_NAME@apache.org && gpg --export --armor YOUR_NAME@apache.org) >> KEYS # Append your key to the KEYS file
svn add . # It is not needed if the KEYS document exists before.
svn ci -m "add gpg key for YOUR_NAME" # Later on, if you are asked to enter a username and password, just use your apache username and password.

Upload the GPG public key to your GitHub account

- + \ No newline at end of file diff --git a/community/committers/release/index.html b/community/committers/release/index.html index 89f2936e1628..ab30b03d1af2 100644 --- a/community/committers/release/index.html +++ b/community/committers/release/index.html @@ -5,7 +5,7 @@ Create a release | Apache OpenDAL™ - + @@ -19,7 +19,7 @@ increase th RC counting and re-initiate a release with the new release_version. And remember to delete the wrong artifacts from the SVN dist repo. Additionally, you should also drop the staging Maven artifacts on https://repository.apache.org.

Voting

OpenDAL requires votes from both the OpenDAL Community.

Vote should send email to: dev@opendal.apache.org:

Title:

[VOTE] Release Apache OpenDAL ${release_version} - Vote Round 1

Content:

Hello, Apache OpenDAL Community,

This is a call for a vote to release Apache OpenDAL version ${opendal_version}.

The tag to be voted on is ${opendal_version}.

The release candidate:

https://dist.apache.org/repos/dist/dev/opendal/${release_version}/

Keys to verify the release candidate:

https://downloads.apache.org/opendal/KEYS

Git tag for the release:

https://github.com/apache/opendal/releases/tag/${release_version}

Maven staging repo:

https://repository.apache.org/content/repositories/orgapacheopendal-${maven_artifact_number}/

Pypi testing repo:

https://test.pypi.org/project/opendal/

Please download, verify, and test.

The VOTE will be open for at least 72 hours and until the necessary
number of votes are reached.

[ ] +1 approve
[ ] +0 no opinion
[ ] -1 disapprove with the reason

To learn more about apache opendal, please see https://opendal.apache.org/

Checklist for reference:

[ ] Download links are valid.
[ ] Checksums and signatures.
[ ] LICENSE/NOTICE files exist
[ ] No unexpected binary files
[ ] All source files have ASF headers
[ ] Can compile from source

More detailed checklist please refer to:
https://github.com/apache/opendal/tree/main/scripts

To compile from source, please refer to:
https://github.com/apache/opendal/blob/main/CONTRIBUTING.md

Here is a Python script in release to help you verify the release candidate:

./scripts/verify.py

Thanks

${name}

Example: https://lists.apache.org/thread/c211gqq2yl15jbxqk4rcnq1bdqltjm5l

The vote should be open for at least 72 hours except the following cases:

  1. Security issues
  2. The wild user effected bug fixs
  3. Any other emergency cases

The Release manager should claim the emergency cases in the vote email if he want to vote it rapidly.

Tips: The 72 hours is the minimum time for voting, so we can ensure that community members from various time zones can participate in the verification process.

After at least 3 +1 binding vote (from OpenDAL Podling PMC member) and no veto, claim the vote result:

Title:

[RESULT][VOTE] Release Apache OpenDAL ${release_version} - Vote Round 1

Content:

Hello, Apache OpenDAL Community,

The vote to release Apache OpenDAL ${release_version} has passed.

The vote PASSED with 3 +1 binding and 1 +1 non-binding votes, no +0 or -1 votes:

Binding votes:

- xxx
- yyy
- zzz

Non-Binding votes:

- aaa

Vote thread: ${vote_thread_url}

Thanks

${name}

Example: https://lists.apache.org/thread/xk5myl10mztcfotn59oo59s4ckvojds6

Official Release

Push the release git tag

# Checkout the tags that passed VOTE
git checkout ${release_version}
# Tag with the opendal version
git tag -s ${opendal_version}
# Push tags to github to trigger releases
git push origin ${opendal_version}

Publish artifacts to SVN RELEASE branch

svn mv https://dist.apache.org/repos/dist/dev/opendal/${release_version} https://dist.apache.org/repos/dist/release/opendal/${opendal_version} -m "Release ${opendal_version}"

Change the download link in the website to the new release version.

Update the latest release link and add the new release link to the version list.

Take Add 0.39.0 release link to download.md as an example.

Release Maven artifacts

  1. Open https://repository.apache.org/#stagingRepositories.
  2. Find the artifact orgapacheopendal-${maven_artifact_number}, click the "Release" button.

It will take some time to sync the Maven artifacts to the Maven Central.

caution

If the vote failed, click "Drop" to drop the staging Maven artifacts.

Check the language binding artifacts

We need to check the language binding artifacts in the language package repo to make sure they are released successfully.

For Java binding, if we can not find the latest version of artifacts in the repo, we need to check the orgapacheopendal-${maven_artifact_number} artifact status in staging repo.

For non-Java bindings, if we can not find the latest version of artifacts in the repo, we need to check the GitHub action status.

Create a GitHub Release

  • Click here to create a new release.
  • Pick the git tag of this release version from the dropdown menu.
  • Make sure the branch target is main.
  • Generate the release note by clicking the Generate release notes button.
  • Add the release note from every component's upgrade.md if there are breaking changes before the content generated by GitHub. Check them carefully.
  • Publish the release.

Send the announcement

Send the release announcement to dev@opendal.apache.org and CC announce@apache.org.

Tips: Please following the Committer Email guide to make sure you have already set up the email SMTP. Otherwise, your email cannot be sent to the announce mailing list.

Instead of adding breaking changes, let's include the new features as "notable changes" in the announcement.

Title:

[ANNOUNCE] Release Apache OpenDAL ${opendal_version}

Content:

Hi all,

The Apache OpenDAL community is pleased to announce
that Apache OpenDAL ${opendal_version} has been released!

OpenDAL is a data access layer that allows users to easily and efficiently
retrieve data from various storage services in a unified way.

The notable changes since ${opendal_version} include:
1. xxxxx
2. yyyyyy
3. zzzzzz

Please refer to the change log for the complete list of changes:
https://github.com/apache/opendal/releases/tag/v${opendal_version}

Apache OpenDAL website: https://opendal.apache.org/

Download Links: https://opendal.apache.org/download

OpenDAL Resources:
- Issue: https://github.com/apache/opendal/issues
- Mailing list: dev@opendal.apache.org

Thanks
On behalf of Apache OpenDAL community

Example: https://lists.apache.org/thread/oy77n55brvk72tnlb2bjzfs9nz3cfd0s

Post release

After the official release out, you may perform a few post actions.

Remove the old releases

Remove the old releases if any. You only need the latest release there, and older releases are available through the Apache archive.

To clean up old releases, run:

# 1. Get the list of releases
svn ls https://dist.apache.org/repos/dist/release/opendal
# 2. Delete each release (except for the last one)
svn del -m "Archiving OpenDAL release X.Y.Z" https://dist.apache.org/repos/dist/release/opendal/X.Y.Z
- + \ No newline at end of file diff --git a/community/committers/request_for_adding_secrets/index.html b/community/committers/request_for_adding_secrets/index.html index 4dc1ea8ff61a..80e03008a763 100644 --- a/community/committers/request_for_adding_secrets/index.html +++ b/community/committers/request_for_adding_secrets/index.html @@ -5,7 +5,7 @@ Request for adding secrets | Apache OpenDAL™ - + @@ -16,7 +16,7 @@ you can use the secrets in the behavior tests when they are running on the GitHub Actions (You need to be a committer of OpenDAL).

The email should also include the following information:

  • The name of the service
  • The secrets in key-value pairs

If the secrets have expiration dates, please also include the expiration dates. We may need you to update the secrets in the future.

If the secrets are not under your control, please also include the contact information of the owner of the secrets.

And finally, thank you for your support!

- + \ No newline at end of file diff --git a/community/committers/verify/index.html b/community/committers/verify/index.html index db2f3be172a8..3b2d88a48d4a 100644 --- a/community/committers/verify/index.html +++ b/community/committers/verify/index.html @@ -5,7 +5,7 @@ Verify a release candidate | Apache OpenDAL™ - + @@ -13,7 +13,7 @@

Verify a release candidate

To verify a release candidate, the following checklist could be used:

  • Download links are valid.
  • Checksums and signatures.
  • LICENSE/NOTICE files exist.
  • No unexpected binary files.
  • All source files have ASF headers.
  • Can compile from source.
note

It is NOT necessary to run all checks to cast a vote for a release candidate.

However, you should clearly state which checks you did. The release manager needs to ensure that each check was done.

To verify the release candidate, you need to download the release candidate from the dist directory.

Use the following command to download all artifacts, replace "${release_version}-${rc_version}" with the version ID of the version to be released:

svn co https://dist.apache.org/repos/dist/dev/opendal/${release_version}-${rc_version}/

Checksums and signatures

The release candidate should have a checksum and signature file.

For example, if the release candidate is 0.45.0-rc1, the checksum and signature file should be:

https://dist.apache.org/repos/dist/dev/opendal/0.45.0-rc1/apache-opendal-0.45.0-rc1-src.tar.gz.sha512
https://dist.apache.org/repos/dist/dev/opendal/0.45.0-rc1/apache-opendal-0.45.0-rc1-src.tar.gz.asc

Verify checksums and signatures

GnuPG is recommended here. It can be installed with the following command:

apt-get install gnupg
# or
yum install gnupg
# or
brew install gnupg

Firstly, import the OpenDAL release manager's public key:

curl https://downloads.apache.org/opendal/KEYS > KEYS # Download KEYS
gpg --import KEYS # Import KEYS to local

Then, trust the public key:

gpg --edit-key <KEY-used-in-this-version> # Edit the key

It will enter the interactive mode, use the following command to trust the key:

gpg> trust

And then, select the level of trust, for example:

Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)

1 = I don't know or won't say
2 = I do NOT trust
3 = I trust marginally
4 = I trust fully
5 = I trust ultimately
m = back to the main menu

Select 5 to trust the key ultimately.

Now, we could start the verification.

We've provided a script to verify the checksum and signature of the release candidate.

The script is in the scripts directory of our repository. You can download it directly from here or check it out from the repository:

git clone https://github.com/apache/opendal

Run the script in a specific release candidate's folder:

./scripts/check.py

You will see the following output if the verification is successful:

gpg: Signature made Wed 21 Jul 2021 10:00:00 AM CST
gpg: using RSA key 0x1234567890ABCDEF
gpg: Good signature from "Xuanwo<xuanwo@apache.org" [ultimate]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 1234 5678 90AB CDEF 1234 5678 90AB CDEF 1234 5678
Success to verify the gpg sign
apache-opendal-0.36.0-rc1-src.tar.gz: OK
Success to verify the checksum

Check the file content of the source package

Unzip apache-opendal-${release_version}-${rc_version}-src.tar.gz and check the follows:

  • LICENSE and NOTICE files are correct for the repository.
  • All files have ASF license headers if necessary.
  • Building is OK.

Check the Maven artifacts of opendal-java

Download the artifacts from https://repository.apache.org/content/repositories/orgapacheopendal-${maven_artifact_number}/.

You can check the follows:

  • Checksum of JARs match the bundled checksum file.
  • Signature of JARs match the bundled signature file.
  • JARs is reproducible locally. This means you can build the JARs on your machine and verify the checksum is the same with the bundled one.

The reproduciblility requires the same JDK distribution and the same Maven distribution. You should use Eclipse Temurin JDK 8 and the bundled Maven Wrapper to make the same artifacts.

- + \ No newline at end of file diff --git a/community/index.html b/community/index.html index 4f6a261a5237..cf0b21984f23 100644 --- a/community/index.html +++ b/community/index.html @@ -5,7 +5,7 @@ Community | Apache OpenDAL™ - + @@ -21,7 +21,7 @@ Add to your calendar.

People

Thank you to all the contributors for your selfless dedication and expertise in making this project more comprehensive and valuable. We sincerely appreciate your support and efforts!

PMC members and Committers

The committers list could be found here.

Contributors

The contributor list could be found here.

- + \ No newline at end of file diff --git a/community/maturity/index.html b/community/maturity/index.html index 4cbae9b891cf..63971c980bfb 100644 --- a/community/maturity/index.html +++ b/community/maturity/index.html @@ -5,13 +5,13 @@ Maturity | Apache OpenDAL™ - +

Maturity Assessment for Apache OpenDAL™

The goals of this maturity model are to describe how Apache projects operate in a concise and high-level way, and to provide a basic framework that projects may choose to use to evaluate themselves.

More details can be found here.

Status of this assessment

This assessment is still working in progress.

Maturity model assessment

The following table is filled according to the Apache Maturity Model. Mentors and community members are welcome to comment and modify it.

CODE

IDDescriptionStatus
CD10The project produces Open Source software for distribution to the public, at no charge.YES The project source code is licensed under the Apache License 2.0.
CD20Anyone can easily discover and access the project's code..YES The official website includes GitHub link which can access the project's repository on GitHub directly.
CD30Anyone using standard, widely-available tools, can build the code in a reproducible way.YES Apache OpenDAL provide how-to-build document for every component to tell user how to compile on bare metal, such as the core's.
CD40The full history of the project's code is available via a source code control system, in a way that allows anyone to recreate any released version.YES It depends on git, and anyone can view the full history of the project via commit logs.
CD50The source code control system establishes the provenance of each line of code in a reliable way, based on strong authentication of the committer. When third parties contribute code, commit messages provide reliable information about the code provenance.YES The project uses GitHub and managed by Apache Infra, it ensuring provenance of each line of code to a committer. And the third-party contributions are accepted in accordance with the contributing guides.

LICENSE

IDDescriptionStatus
LC10The Apache License, version 2.0, covers the released code.YES The LICENSE is in GitHub repository. And all source files are with APLv2 header, checked by korandoru/hawkeye@v3.6.0.
LC20Libraries that are mandatory dependencies of the project's code do not create more restrictions than the Apache License does.YES All dependencies are listed.
LC30The libraries mentioned in LC20 are available as Open Source software.YES All dependencies are listed are available as Open Source software
LC40Committers are bound by an Individual Contributor Agreement (the "Apache iCLA") that defines which code they may commit and how they need to identify code that is not their own.YES All committers have iCLAs.
LC50The project clearly defines and documents the copyright ownership of everything that the project produces.YES And all source files are with APLv2 header, checked by korandoru/hawkeye@v3.6.0.

Releases

IDDescriptionStatus
RE10Releases consist of source code, distributed using standard and open archive formats that are expected to stay readable in the long term.YES Source release is distributed via dist.apache.org and linked from download page.
RE20The project's PPMC (Project Management Committee, see CS10) approves each software release in order to make the release an act of the Foundation.YES All releases have been voted at dev@opendal.apache.org and general@incubator.apache.org, and have at least 3 PPMC member's votes.
RE30Releases are signed and/or distributed along with digests that anyone can reliably use to validate the downloaded archives.YES All releases are signed, and the KEYS are available.
RE40The project can distribute convenience binaries alongside source code, but they are not Apache Releases, they are provided with no guarantee.YES User can easily build binaries from source code, and we do not provide binaries as Apache Releases.
RE50The project documents a repeatable release process so that someone new to the project can independently generate the complete set of artifacts required for a release.YES We can follow the Release guide to make a new Apache OpenDAL release, and so far we had 6 different release managers.

Quality

IDDescriptionStatus
QU10The project is open and honest about the quality of its code. Various levels of quality and maturity for various modules are natural and acceptable as long as they are clearly communicated.YES We encourage user to report issues.
QU20The project puts a very high priority on producing secure software.YES All security issues will be addressed within 3 days.
QU30The project provides a well-documented, secure and private channel to report security issues, along with a documented way of responding to them.Yes The official website provides a security page
QU40The project puts a high priority on backwards compatibility and aims to document any incompatible changes and provide tools and documentation to help users transition to new features.Yes We follow semantic versions. As long as it's within one major version, it's backward compatible. And when any breaking changes added, we provide corresponding upgrade guides.
QU50The project strives to respond to documented bug reports in a timely manner.YES The project has resolved 1000+ issues and 2300+ pull requests so far, with very prompt response.

Community

IDDescriptionStatus
CO10The project has a well-known homepage that points to all the information required to operate according to this maturity model.YES The official website includes all information user need to run Apache OpenDAL.
CO20The community welcomes contributions from anyone who acts in good faith and in a respectful manner, and who adds value to the project.Yes We provide contributing guides for every component. And we also have a general contributing guide
CO30Contributions include source code, documentation, constructive bug reports, constructive discussions, marketing and generally anything that adds value to the project.YES All good contributions including code and non-code are welcomed.
CO40The community strives to be meritocratic and gives more rights and responsibilities to contributors who, over time, add value to the project.YES The community has elected 2 new PPMC members and 7 new committers so far.
CO50The project documents how contributors can earn more rights such as commit access or decision power, and applies these principles consistently.YES The community has clear docs on nominating committers and PPMC members
CO60The community operates based on consensus of its members (see CS10) who have decision power. Dictators, benevolent or not, are not welcome in Apache projects.YES All decisions are made after vote by community members.
CO70The project strives to answer user questions in a timely manner.YES We use dev@opendal.apache.org, GitHub issue and GitHub discussion to do this in a timely manner.

Consensus

IDDescriptionStatus
CS10The project maintains a public list of its contributors who have decision power. The project's PPMC (Project Management Committee) consists of those contributors.Yes See members with all PPMC members and committers.
CS20Decisions require a consensus among PPMC members and are documented on the project's main communications channel. The PPMC takes community opinions into account, but the PPMC has the final word.YES All decisions are made by votes on dev@opendal.apache.org, and with at least 3 +1 votes from PPMC.
CS30The project uses documented voting rules to build consensus when discussion is not sufficient.YES The project uses the standard ASF voting rules.
CS40In Apache projects, vetoes are only valid for code commits. The person exercising the veto must justify it with a technical explanation, as per the Apache voting rules defined in CS30.YES Apache OpenDAL community has not used the veto power yet except for code commits.
CS50All "important" discussions happen asynchronously in written form on the project's main communications channel. Offline, face-to-face or private discussions that affect the project are also documented on that channel.YES All important discussions and conclusions are recorded in written form.

Independence

IDDescriptionStatus
IN10The project is independent from any corporate or organizational influence.YES The PPMC members and committer of Apache OpenDAL are from several different companies, and majority of them are NOT From the company that donated this project.
IN20Contributors act as themselves, not as representatives of a corporation or organization.YES The contributors act on their own initiative without representing a corporation or organization.
- + \ No newline at end of file diff --git a/community/news/index.html b/community/news/index.html index 39f96a435b5c..90065387b6c6 100644 --- a/community/news/index.html +++ b/community/news/index.html @@ -5,13 +5,13 @@ News | Apache OpenDAL™ - +

News

  • 2024-02-05: Apache OpenDAL 0.45.0 released. RM=Morris Tai
  • 2024-01-23: New Committer, Yang Shuai @hoslo
  • 2024-01-22: New PMC Member, Liuqing Yue @dqhl76
  • 2024-01-21: Apache OpenDAL 0.44.2 released. RM=Zheao Li
  • 2024-01-18: Apache OpenDAL Graduated
  • 2024-01-12: New Committer, Wenkang Xu @WenyXu.
  • 2024-01-06: Apache OpenDAL (incubating) 0.44.1 released. RM=Hao Ding
  • 2024-01-01: New Committer, Congyi Wang @wcy-fdu.
  • 2023-12-31: Apache OpenDAL (incubating) 0.44.0 released. RM=Liuqing Yue
  • 2023-12-11: New PPMC Member, Xiangdong @G-XD.
  • 2023-12-08: Apache OpenDAL (incubating) 0.43.0 released. RM=Xiangdong
  • 2023-11-29: New Committer, Morris Tai @morristai.
  • 2023-11-16: Apache OpenDAL (incubating) 0.42.0 released. RM=Mingzhuo Yin
  • 2023-09-22: New Committer, Zheao Li @Zheaoli.
  • 2023-10-16: Apache OpenDAL (incubating) 0.41.0 released. RM=Han Xu
  • 2023-09-22: New Committer, Xiangdong @G-XD.
  • 2023-09-21: Apache OpenDAL (incubating) 0.40.0 released. RM=Ding Hao
  • 2023-09-08: New PPMC Member, Mingzhuo Yin @silver-ymz.
  • 2023-08-30: New Committer, Dongyang Zheng @Young-Flash.
  • 2023-08-19: New Committer, Liuqing Yue @dqhl76.
  • 2023-07-31: Apache OpenDAL (incubating) 0.39.0 released. RM=Jun Ouyang
  • 2023-07-15: Apache OpenDAL (incubating) 0.38.1 released. RM=Cai Lue
  • 2023-07-15: New Committer, Jun Ouyang @oowl.
  • 2023-06-28: Apache OpenDAL (incubating) 0.38.0 released. RM=Zhuoran Shang
  • 2023-06-16: New Committer, Mingzhuo Yin @silver-ymz.
  • 2023-06-06: Apache OpenDAL (incubating) 0.37.0 released. RM=Han Xu
  • 2023-05-30: Apache OpenDAL (incubating) 0.36.0 released. RM=Ding Hao
  • 2023-05-29: New Committer, Xinyou Ji @Ji-Xinyou.
  • 2023-04-21: New PPMC Member, Han Xu @suyanhanx.
  • 2023-03-20: New Committer, Lusheng Lyu @messense.
  • 2023-03-20: New Committer, Han Xu @suyanhanx.
  • 2023-02-27: Project enters incubation.
- + \ No newline at end of file diff --git a/community/pmc_members/nominate-committer/index.html b/community/pmc_members/nominate-committer/index.html index 2aa7553a4028..319ab822d023 100644 --- a/community/pmc_members/nominate-committer/index.html +++ b/community/pmc_members/nominate-committer/index.html @@ -5,13 +5,13 @@ Nominate Committer | Apache OpenDAL™ - +

Nominate Committer

This document mainly introduces how a PMC member nominates a new committer.

Start vote about the candidate

Start a vote about the candidate via sending email to: private@opendal.apache.org:

  • candidate_name: The full name of the candidate.
  • candidate_github_id: The github id of the candidate.

Title:

[VOTE] Add candidate ${candidate_name} as a new committer

Content:

Hi, All OpenDAL PMC members.

I'd like to take this chance to call the vote for inviting committed
contributor ${candidate_name} (github id: ${candidate_github_id}) as a new committer of Apache
OpenDAL.

${candidate_contributions}

${candidate_name}'s great contributions could be found:

- Github Account: https://github.com/${candidate_github_id}
- Github Pull Requests: https://github.com/apache/opendal/pulls?q=is%3Apr+author%3A${candidate_github_id}+is%3Aclosed
- Github Issues: https://github.com/apache/opendal/issues?q=is%3Aopen+mentions%3A${candidate_github_id}

Please make your valuable evaluation on whether we could invite ${candidate_name} as a
committer:

[ +1 ] Agree to add ${candidate_name} as a committer of OpenDAL.
[ 0 ] Have no sense.
[ -1 ] Disagree to add ${candidate_name} as a committer of OpenDAL, because .....

This vote starts from the moment of sending and will be open for 3 days.

Thanks and best regards,

${your_name}

Example: https://lists.apache.org/thread/j16lvkyrmvg8wyf3z4gqpjky5m594jhy (Private Link)

After at least 3 +1 binding vote and no veto, claim the vote result:

Title:

[RESULT][VOTE] Add candidate ${candidate_name} as a new committer

Content:

Hi, all:

The vote for "Add candidate ${candidate_name} as a new committer" has PASSED and closed now.

The result is as follows:

4 binding +1 Votes:
- voter names

Vote thread: https://lists.apache.org/thread/j16lvkyrmvg8wyf3z4gqpjky5m594jhy

Then I'm going to invite ${candidate_name} to join us.

Thanks for everyone's support!

${your_name}

Send invitation to the candidate

Send an invitation to the candidate and cc private@opendal.apache.org:

Title:

Invitation to become OpenDAL Committer: ${candidate_name}

Content:

Hello ${candidate_name},

The OpenDAL PMC hereby offers you committer privileges
to the project. These privileges are offered on the
understanding that you'll use them reasonably and with
common sense. We like to work on trust rather than
unnecessary constraints.

Being a committer enables you to more easily make
changes without needing to go through the patch
submission process.

Being a committer does not require you to
participate any more than you already do. It does
tend to make one even more committed. You will
probably find that you spend more time here.

Of course, you can decline and instead remain as a
contributor, participating as you do now.

A. This personal invitation is a chance for you to
accept or decline in private. Either way, please
let us know in reply to the [private@opendal.apache.org]
address only.

B. If you accept, the next step is to register an iCLA:
1. Details of the iCLA and the forms are found
through this link: https://www.apache.org/licenses/#clas

2. Instructions for its completion and return to
the Secretary of the ASF are found at
https://www.apache.org/licenses/#submitting

3. When you transmit the completed iCLA, request
to notify the Apache OpenDAL and choose a
unique Apache ID. Look to see if your preferred
ID is already taken at
https://people.apache.org/committer-index.html
This will allow the Secretary to notify the PMC
when your iCLA has been recorded.

When recording of your iCLA is noted, you will
receive a follow-up message with the next steps for
establishing you as a committer.

With the expectation of your acceptance, welcome!

${your_name} (as represents of The Apache OpenDAL PMC)

Add the candidate to the committer list

After the candidate accepts the invitation and the iCLA is recorded, add the candidate to the committer list by whimsy roster tools

- + \ No newline at end of file diff --git a/community/pmc_members/nominate-pmc-member/index.html b/community/pmc_members/nominate-pmc-member/index.html index 454143374b3e..30ceadd91714 100644 --- a/community/pmc_members/nominate-pmc-member/index.html +++ b/community/pmc_members/nominate-pmc-member/index.html @@ -5,13 +5,13 @@ Nominate PMC Member | Apache OpenDAL™ - +

Nominate PMC Member

This document mainly introduces how a PMC member nominates a new PMC member.

Start vote about the candidate

Start a vote about the candidate via sending email to: private@opendal.apache.org:

  • candidate_name: The full name of the candidate.
  • candidate_github_id: The github id of the candidate.

Title:

[VOTE] Add candidate ${candidate_name} as a new PMC member

Content:

Hi, All OpenDAL PMC members.

I would like to nominate ${candidate_name} (github id: ${candidate_github_id}) as a candidate for the OpenDAL PMC member. Since becoming an OpenDAL committer, ${candidate_name} has made significant contributions to various modules of the project.

${candidate_name}'s great contributions could be found:

- Github Account: https://github.com/${candidate_github_id}
- Github Pull Requests: https://github.com/apache/opendal/pulls?q=is%3Apr+author%3A${candidate_github_id}+is%3Aclosed
- Github Issues: https://github.com/apache/opendal/issues?q=is%3Aopen+mentions%3A${candidate_github_id}

Please make your valuable evaluation on whether we could invite ${candidate_name} as a
PMC member:

[ +1 ] Agree to add ${candidate_name} as a PMC member of OpenDAL.
[ 0 ] Have no sense.
[ -1 ] Disagree to add ${candidate_name} as a PMC member of OpenDAL, because .....

This vote starts from the moment of sending and will be open for 3 days.

Thanks and best regards,

${your_name}

Example: https://lists.apache.org/thread/yg2gz2tof3cvbrgp1wxzk6mf9o858h7t (Private Link)

After at least 3 +1 binding vote and no veto, claim the vote result:

Title:

[RESULT][VOTE] Add candidate ${candidate_name} as a new PMC member

Content:

Hi, all:

The vote for "Add candidate ${candidate_name} as a new PMC member" has PASSED and closed now.

The result is as follows:

4 binding +1 Votes:
- voter names

Vote thread: https://lists.apache.org/thread/yg2gz2tof3cvbrgp1wxzk6mf9o858h7t

Then I'm going to invite ${candidate_name} to join us.

Thanks for everyone's support!

${your_name}

Send NOTICE to Board after VOTE PASSED

The nominating PMC member should send a message to the Board board@apache.org with a reference to the vote result in the following form:

Title:

[NOTICE] ${candidate_name} for Apache OpenDAL PMC

Content:

${candidate_name} has been voted as a new member of the Apache OpenDAL PMC. the vote thread is at: 

https://lists.apache.org/thread/yg2gz2tof3cvbrgp1wxzk6mf9o858h7t

Send invitation to the candidate

Send an invitation to the candidate and cc private@opendal.apache.org:

Title:

Invitation to become Apache OpenDAL PMC Member: ${candidate_name}

Content:

Hello ${candidate_name},

In recognition of your contributions to Apache OpenDAL, the OpenDAL PMC has recently voted to add you as a PMC member. The role of a PMC member grants you access to the Project Management Committee (PMC) and enables you to take on greater responsibilities within the OpenDAL project. We hope that you accept this invitation and continue to help us make Apache OpenDAL better.

Please reply to private@opendal.apache.org using the 'reply all' function for your responses.

With the expectation of your acceptance, welcome!

${your_name} (as represents of The Apache OpenDAL PMC)

Add the candidate to the PMC member list

After the candidate accepts the invitation, add the candidate to the PMC member list by whimsy roster tools

- + \ No newline at end of file diff --git a/community/pmc_members/onboarding/index.html b/community/pmc_members/onboarding/index.html index 5afcd71374e8..5ec2fbfecdd6 100644 --- a/community/pmc_members/onboarding/index.html +++ b/community/pmc_members/onboarding/index.html @@ -5,14 +5,14 @@ Onboarding | Apache OpenDAL™ - +

Onboarding

This document primarily serves as a guide for new PMC members to Apache OpenDAL™.

Upon receiving an invitation email from OpenDAL PMC, a new PMC member should consider whether accepting. If they decide in favor, they should select "Reply All" and express their decision.

Subscribe to Private Mailing List

  1. Send email to private-subscribe@opendal.apache.org
  2. You will receive an email with the subject "confirm subscribe to private@opendal.apache.org"
  3. Reply to the email with "Confirm" in the body

If you receive an email with the subject "WELCOME to private@opendal.apache.org", you have successfully subscribed to the private mailing list.

It's required for PMC members to subscribe the private mailing list. The private list is only for confidential discussions that should not be made public, such as the suitability of a particular individual to become a committer or a member of the PMC.

Setup 1Password Secrets Access

Once you have been added to OpenDAL's PMC member list, you will gain the access to all OpenDAL's secrets.

  • Please refrain from modifying secrets in the Services vault as this could disrupt our integration tests.
  • Ensure that you keep all secrets secure and avoid sharing them with others or making them public. Do not commit them anywhere else.

Read PMC Member Guide

Please read PMC GUIDE to know about the general responsibilities of Project Management Committee (PMC) members in managing our project and common how-to procedures for day to day maintenance.

- + \ No newline at end of file diff --git a/community/pmc_members/podling-report/index.html b/community/pmc_members/podling-report/index.html index 465dbb595cdc..f582c743e91f 100644 --- a/community/pmc_members/podling-report/index.html +++ b/community/pmc_members/podling-report/index.html @@ -5,13 +5,13 @@ Podling Status Reports | Apache OpenDAL™ - +

Podling Status Reports

Podling Status Report provides key updates on your podling's status and helps the ASF Board monitor and support the incubating projects. This guide provides step-by-step instructions on how to prepare and submit Podling Status Report effectively.

Frequency of Reporting

New podlings are required to submit reports monthly for the first three months. After this period, the reporting frequency changes to quarterly.

The current reporting frequency for Apache OpenDAL™ is once per quarter. Stay attentive to general@incubator.apache.org (subscribe), where due dates for these reports are announced.

Report Preparation

It's recommended to discuss the report on dev@opendal.apache.org (subscribe), inviting all members to contribute. Here are the critical points your report should address:

  • Any concerns that require the attention of the Incubator PMC or ASF Board.
  • Legal, infrastructure, cross-project, or personal issues that need addressing.
  • Achievements (releases, milestones, etc.) since the last report.
  • The activity and helpfulness of mentors.
  • Any other significant points or thoughts you think should be included.

You can discuss the issues based on the template or refer to previous reports for preparation.

Report Writing and Submission

Podling Status Report has its own format. Please fill it out based on your assessment of the project's incubation status and the materials collected during the preparation phase. We should use the existing format and don’t change the subject headers.

note

Note that IPMC update the template from time to time, so be sure to use the one IPMC provide and not a previous report.

Mentor Sign-off

Each Podling Status Report must be signed off by a mentor. Without a mentor's sign-off, the IPMC will not accept the report, and the podling will need to submit a new report the following month.

After submitting the report, you can send a email to dev@opendal.apache.org to remind our mentors and the community to review the report and provide feedback.

[ANNOUNCE] OpenDAL's Podling Report of <Month><Year>

Hello, everyone!

As a representative of the OpenDAL community, I am pleased to present our <Month><Year> podling report.

We appreciate the opportunity to share updates on our progress and
achievements over the past weeks, and we welcome any feedback or
suggestions that may help us continue to grow and succeed as a project.

Thank you for your continued support.

LINK: <link-of-report-in-cwiki>
- + \ No newline at end of file diff --git a/community/security/index.html b/community/security/index.html index 6a9c447aa388..5ec233d2f642 100644 --- a/community/security/index.html +++ b/community/security/index.html @@ -5,7 +5,7 @@ Security | Apache OpenDAL™ - + @@ -13,7 +13,7 @@

Security

The Apache Software Foundation takes a rigorous stance on eliminating security issues in its software projects. Likewise, Apache OpenDAL™ is also vigilant and takes security issues related to its features and functionality into the highest consideration.

If you have any concerns regarding OpenDAL's security, or you discover a vulnerability or potential threat, please do not hesitate to get in touch with the Apache Security Team by dropping an email at private@opendal.apache.org.

Please specify the project name as "OpenDAL" in the email, and provide a description of the relevant problem or potential threat. You are also urged to recommend how to reproduce and replicate the issue.

The Apache Security Team and the OpenDAL community will get back to you after assessing and analyzing the findings.

Please note that the security issue should be reported on the security email first, before disclosing it on any public domain.

- + \ No newline at end of file diff --git a/docs/category/services/index.html b/docs/category/services/index.html index c5a25b8917c2..9407e30136ee 100644 --- a/docs/category/services/index.html +++ b/docs/category/services/index.html @@ -5,13 +5,13 @@ Services | Apache OpenDAL™ - +

Services

- + \ No newline at end of file diff --git a/docs/lua/classes/opendal.metadata.html b/docs/lua/classes/opendal.metadata.html index 5a7f710f5438..52d09e7a669f 100644 --- a/docs/lua/classes/opendal.metadata.html +++ b/docs/lua/classes/opendal.metadata.html @@ -138,7 +138,7 @@

Returns:

generated by LDoc 1.4.6 -Last updated 2024-02-08 13:38:56 +Last updated 2024-02-09 05:56:48
diff --git a/docs/lua/classes/opendal.operator.html b/docs/lua/classes/opendal.operator.html index 9da0a53a0bc7..bd7fbd622297 100644 --- a/docs/lua/classes/opendal.operator.html +++ b/docs/lua/classes/opendal.operator.html @@ -321,7 +321,7 @@

Returns:

generated by LDoc 1.4.6 -Last updated 2024-02-08 13:38:56 +Last updated 2024-02-09 05:56:48
diff --git a/docs/lua/index.html b/docs/lua/index.html index 4f3ed8c80413..ae9e8e767759 100644 --- a/docs/lua/index.html +++ b/docs/lua/index.html @@ -57,7 +57,7 @@

Classes

generated by LDoc 1.4.6 -Last updated 2024-02-08 13:38:56 +Last updated 2024-02-09 05:56:48
diff --git a/docs/nodejs/classes/BlockingLister.html b/docs/nodejs/classes/BlockingLister.html index d89d79da6fce..33b9bb967712 100644 --- a/docs/nodejs/classes/BlockingLister.html +++ b/docs/nodejs/classes/BlockingLister.html @@ -1,5 +1,5 @@ BlockingLister | Apache OpenDAL™ - v0.45.0

BlockingLister is designed to list entries at given path in a blocking manner.

-

Constructors

Constructors

Methods

Constructors

Methods

Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

\ No newline at end of file +

Constructors

Methods

Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

\ No newline at end of file diff --git a/docs/nodejs/classes/BlockingReader.html b/docs/nodejs/classes/BlockingReader.html index 04ce0213e3f3..743cce644126 100644 --- a/docs/nodejs/classes/BlockingReader.html +++ b/docs/nodejs/classes/BlockingReader.html @@ -1,7 +1,7 @@ BlockingReader | Apache OpenDAL™ - v0.45.0

BlockingReader is designed to read data from given path in an blocking manner.

-

Constructors

Constructors

Methods

Constructors

Methods

  • Create a readable stream from the underlying reader.

    -

    Parameters

    • Optional options: ReadableOptions

    Returns Readable

Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

\ No newline at end of file +

Parameters

  • Optional options: ReadableOptions

Returns Readable

Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

\ No newline at end of file diff --git a/docs/nodejs/classes/BlockingWriter.html b/docs/nodejs/classes/BlockingWriter.html index c47b2862db04..d06c3f17f949 100644 --- a/docs/nodejs/classes/BlockingWriter.html +++ b/docs/nodejs/classes/BlockingWriter.html @@ -1,6 +1,6 @@ BlockingWriter | Apache OpenDAL™ - v0.45.0

BlockingWriter is designed to write data into given path in an blocking manner.

-

Constructors

Constructors

Methods

close createWriteStream write @@ -10,11 +10,11 @@

Close this writer.

Example

const writer = op.writerSync("path/to/file");
writer.write(Buffer.from("hello world"));
writer.close();
-

Returns void

  • Create a writable stream from the underlying writer.

    -

    Parameters

    • Optional options: WritableOptions

    Returns Writable

  • Create a writable stream from the underlying writer.

    +

    Parameters

    • Optional options: WritableOptions

    Returns Writable

  • Safety

    &mut self in async napi methods should be marked as unsafe

    Write bytes into this writer.

    Example

    const writer = await op.writer("path/to/file");
    await writer.write(Buffer.from("hello world"));
    await writer.close();
    -

    Parameters

    • content: string | Buffer

    Returns void

Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

\ No newline at end of file +

Parameters

  • content: string | Buffer

Returns void

Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

\ No newline at end of file diff --git a/docs/nodejs/classes/Capability.html b/docs/nodejs/classes/Capability.html index 447524e993f3..a5abb8ad82a9 100644 --- a/docs/nodejs/classes/Capability.html +++ b/docs/nodejs/classes/Capability.html @@ -7,7 +7,7 @@
  • What's current Operator max supports batch operations count.
  • Add fields of Capabilities with be public and can be accessed directly.

    -

    Constructors

    Constructors

    Accessors

    • get batch(): boolean
    • If operator supports batch.

      -

      Returns boolean

    • get batchDelete(): boolean
    • If operator supports batch delete.

      -

      Returns boolean

    • get batchMaxOperations(): null | bigint
    • The max operations that operator supports in batch.

      -

      Returns null | bigint

    • get blocking(): boolean
    • If operator supports blocking.

      -

      Returns boolean

    • get copy(): boolean
    • If operator supports copy.

      -

      Returns boolean

    • get createDir(): boolean
    • If operator supports create dir.

      -

      Returns boolean

    • get delete(): boolean
    • If operator supports delete.

      -

      Returns boolean

    • get list(): boolean
    • If operator supports list.

      -

      Returns boolean

    • get listWithLimit(): boolean
    • If backend supports list with limit.

      -

      Returns boolean

    • get listWithRecursive(): boolean
    • If backend supports list with recursive.

      -

      Returns boolean

    • get listWithStartAfter(): boolean
    • If backend supports list with start after.

      -

      Returns boolean

    • get presign(): boolean
    • If operator supports presign.

      -

      Returns boolean

    • get presignRead(): boolean
    • If operator supports presign read.

      -

      Returns boolean

    • get presignStat(): boolean
    • If operator supports presign stat.

      -

      Returns boolean

    • get presignWrite(): boolean
    • If operator supports presign write.

      -

      Returns boolean

    • get read(): boolean
    • If operator supports read.

      -

      Returns boolean

    • get readCanNext(): boolean
    • If operator supports next on returning reader.

      -

      Returns boolean

    • get readCanSeek(): boolean
    • If operator supports seek on returning reader.

      -

      Returns boolean

    • get readWithIfMatch(): boolean
    • If operator supports read with if match.

      -

      Returns boolean

    • get readWithIfNoneMatch(): boolean
    • If operator supports read with if none match.

      -

      Returns boolean

    • get readWithOverrideCacheControl(): boolean
    • if operator supports read with override cache control.

      -

      Returns boolean

    • get readWithOverrideContentDisposition(): boolean
    • if operator supports read with override content disposition.

      -

      Returns boolean

    • get readWithOverrideContentType(): boolean
    • if operator supports read with override content type.

      -

      Returns boolean

    • get readWithRange(): boolean
    • If operator supports read with range.

      -

      Returns boolean

    • get rename(): boolean
    • If operator supports rename.

      -

      Returns boolean

    • get stat(): boolean
    • If operator supports stat.

      -

      Returns boolean

    • get statWithIfMatch(): boolean
    • If operator supports stat with if match.

      -

      Returns boolean

    • get statWithIfNoneMatch(): boolean
    • If operator supports stat with if none match.

      -

      Returns boolean

    • get write(): boolean
    • If operator supports write.

      -

      Returns boolean

    • get writeCanAppend(): boolean
    • If operator supports write by append.

      -

      Returns boolean

    • get writeCanEmpty(): boolean
    • If operator supports write with empty content.

      -

      Returns boolean

    • get writeCanMulti(): boolean
    • If operator supports write can be called in multi times.

      -

      Returns boolean

    • get writeMultiAlignSize(): null | bigint
    • write_multi_align_size is the align size that services required in write_multi.

      +

      Returns boolean

    • get batchDelete(): boolean
    • If operator supports batch delete.

      +

      Returns boolean

    • get batchMaxOperations(): null | bigint
    • The max operations that operator supports in batch.

      +

      Returns null | bigint

    • get blocking(): boolean
    • If operator supports blocking.

      +

      Returns boolean

    • get copy(): boolean
    • If operator supports copy.

      +

      Returns boolean

    • get createDir(): boolean
    • If operator supports create dir.

      +

      Returns boolean

    • get delete(): boolean
    • If operator supports delete.

      +

      Returns boolean

    • get list(): boolean
    • If operator supports list.

      +

      Returns boolean

    • get listWithLimit(): boolean
    • If backend supports list with limit.

      +

      Returns boolean

    • get listWithRecursive(): boolean
    • If backend supports list with recursive.

      +

      Returns boolean

    • get listWithStartAfter(): boolean
    • If backend supports list with start after.

      +

      Returns boolean

    • get presign(): boolean
    • If operator supports presign.

      +

      Returns boolean

    • get presignRead(): boolean
    • If operator supports presign read.

      +

      Returns boolean

    • get presignStat(): boolean
    • If operator supports presign stat.

      +

      Returns boolean

    • get presignWrite(): boolean
    • If operator supports presign write.

      +

      Returns boolean

    • get read(): boolean
    • If operator supports read.

      +

      Returns boolean

    • get readCanNext(): boolean
    • If operator supports next on returning reader.

      +

      Returns boolean

    • get readCanSeek(): boolean
    • If operator supports seek on returning reader.

      +

      Returns boolean

    • get readWithIfMatch(): boolean
    • If operator supports read with if match.

      +

      Returns boolean

    • get readWithIfNoneMatch(): boolean
    • If operator supports read with if none match.

      +

      Returns boolean

    • get readWithOverrideCacheControl(): boolean
    • if operator supports read with override cache control.

      +

      Returns boolean

    • get readWithOverrideContentDisposition(): boolean
    • if operator supports read with override content disposition.

      +

      Returns boolean

    • get readWithOverrideContentType(): boolean
    • if operator supports read with override content type.

      +

      Returns boolean

    • get readWithRange(): boolean
    • If operator supports read with range.

      +

      Returns boolean

    • get rename(): boolean
    • If operator supports rename.

      +

      Returns boolean

    • get stat(): boolean
    • If operator supports stat.

      +

      Returns boolean

    • get statWithIfMatch(): boolean
    • If operator supports stat with if match.

      +

      Returns boolean

    • get statWithIfNoneMatch(): boolean
    • If operator supports stat with if none match.

      +

      Returns boolean

    • get write(): boolean
    • If operator supports write.

      +

      Returns boolean

    • get writeCanAppend(): boolean
    • If operator supports write by append.

      +

      Returns boolean

    • get writeCanEmpty(): boolean
    • If operator supports write with empty content.

      +

      Returns boolean

    • get writeCanMulti(): boolean
    • If operator supports write can be called in multi times.

      +

      Returns boolean

    • get writeMultiAlignSize(): null | bigint
    • write_multi_align_size is the align size that services required in write_multi.

      For example, Google GCS requires align size to 256KiB in write_multi.

      -

      Returns null | bigint

    • get writeMultiMaxSize(): null | bigint
    • write_multi_max_size is the max size that services support in write_multi.

      +

      Returns null | bigint

    • get writeMultiMaxSize(): null | bigint
    • write_multi_max_size is the max size that services support in write_multi.

      For example, AWS S3 supports 5GiB as max in write_multi.

      -

      Returns null | bigint

    • get writeMultiMinSize(): null | bigint
    • write_multi_min_size is the min size that services support in write_multi.

      +

      Returns null | bigint

    • get writeMultiMinSize(): null | bigint
    • write_multi_min_size is the min size that services support in write_multi.

      For example, AWS S3 requires at least 5MiB in write_multi expect the last one.

      -

      Returns null | bigint

    • get writeTotalMaxSize(): null | bigint
    • write_total_max_size is the max size that services support in write_total.

      +

      Returns null | bigint

    • get writeTotalMaxSize(): null | bigint
    • write_total_max_size is the max size that services support in write_total.

      For example, Cloudflare D1 supports 1MB as max in write_total.

      -

      Returns null | bigint

    • get writeWithCacheControl(): boolean
    • If operator supports write with cache control.

      -

      Returns boolean

    • get writeWithContentDisposition(): boolean
    • If operator supports write with content disposition.

      -

      Returns boolean

    • get writeWithContentType(): boolean
    • If operator supports write with content type.

      -

      Returns boolean

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file +

    Returns null | bigint

    • get writeWithCacheControl(): boolean
    • If operator supports write with cache control.

      +

      Returns boolean

    • get writeWithContentDisposition(): boolean
    • If operator supports write with content disposition.

      +

      Returns boolean

    • get writeWithContentType(): boolean
    • If operator supports write with content type.

      +

      Returns boolean

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/nodejs/classes/Entry.html b/docs/nodejs/classes/Entry.html index d8df943bdf35..fd472b7c3a81 100644 --- a/docs/nodejs/classes/Entry.html +++ b/docs/nodejs/classes/Entry.html @@ -1,5 +1,5 @@ Entry | Apache OpenDAL™ - v0.45.0

    Entry returned by Lister or BlockingLister to represent a path and it's relative metadata.

    -

    Constructors

    Constructors

    Methods

    Constructors

    Methods

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file +

    Returns string

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/nodejs/classes/ExternalObject.html b/docs/nodejs/classes/ExternalObject.html index 24d9d3013f05..e238facec291 100644 --- a/docs/nodejs/classes/ExternalObject.html +++ b/docs/nodejs/classes/ExternalObject.html @@ -1,3 +1,3 @@ -ExternalObject | Apache OpenDAL™ - v0.45.0

    Class ExternalObject<T>

    Type Parameters

    • T

    Constructors

    constructor +ExternalObject | Apache OpenDAL™ - v0.45.0

    Class ExternalObject<T>

    Type Parameters

    • T

    Constructors

    Properties

    Constructors

    Properties

    : {
        : typeof ;
        [K: symbol]: T;
    }

    Type declaration

    • [K: symbol]: T
    • Readonly : typeof

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file +

    Constructors

    Properties

    : {
        : typeof ;
        [K: symbol]: T;
    }

    Type declaration

    • [K: symbol]: T
    • Readonly : typeof

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/nodejs/classes/Layer.html b/docs/nodejs/classes/Layer.html index 0c35d90af54f..3e3a4a8a31b4 100644 --- a/docs/nodejs/classes/Layer.html +++ b/docs/nodejs/classes/Layer.html @@ -1,3 +1,3 @@ Layer | Apache OpenDAL™ - v0.45.0

    A public layer wrapper

    -

    Constructors

    Constructors

    Constructors

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/nodejs/classes/Lister.html b/docs/nodejs/classes/Lister.html index 349904517694..e68952b50b88 100644 --- a/docs/nodejs/classes/Lister.html +++ b/docs/nodejs/classes/Lister.html @@ -1,10 +1,10 @@ Lister | Apache OpenDAL™ - v0.45.0

    Lister is designed to list entries at given path in an asynchronous manner.

    -

    Constructors

    Constructors

    Methods

    Constructors

    Methods

    • Safety

      &mut self in async napi methods should be marked as unsafe

      napi will make sure the function is safe, and we didn't do unsafe thing internally.

      -

      Returns Promise<null | Entry>

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file +

    Returns Promise<null | Entry>

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/nodejs/classes/Metadata.html b/docs/nodejs/classes/Metadata.html index 45d5d58cddb3..710e3c9a16b9 100644 --- a/docs/nodejs/classes/Metadata.html +++ b/docs/nodejs/classes/Metadata.html @@ -1,5 +1,5 @@ Metadata | Apache OpenDAL™ - v0.45.0

    Metadata carries all metadata associated with a path.

    -

    Constructors

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    • get contentDisposition(): null | string
    • Content-Disposition of this object

      -

      Returns null | string

    • get contentLength(): null | bigint
    • Content Length of this object

      -

      Returns null | bigint

    • get contentMd5(): null | string
    • Content MD5 of this object.

      -

      Returns null | string

    • get contentType(): null | string
    • Content Type of this object.

      -

      Returns null | string

    • get etag(): null | string
    • ETag of this object.

      -

      Returns null | string

    • get lastModified(): null | string
    • Last Modified of this object.

      +

      Returns null | string

    • get contentLength(): null | bigint
    • Content Length of this object

      +

      Returns null | bigint

    • get contentMd5(): null | string
    • Content MD5 of this object.

      +

      Returns null | string

    • get contentType(): null | string
    • Content Type of this object.

      +

      Returns null | string

    • get etag(): null | string
    • ETag of this object.

      +

      Returns null | string

    • get lastModified(): null | string
    • Last Modified of this object.

      We will output this time in RFC3339 format like 1996-12-19T16:39:57+08:00.

      -

      Returns null | string

    Methods

    • Returns true if the <op.stat> object describes a file system directory.

      -

      Returns boolean

    • Returns true if the <op.stat> object describes a regular file.

      -

      Returns boolean

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file +

    Returns null | string

    Methods

    • Returns true if the <op.stat> object describes a file system directory.

      +

      Returns boolean

    • Returns true if the <op.stat> object describes a regular file.

      +

      Returns boolean

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/nodejs/classes/Operator.html b/docs/nodejs/classes/Operator.html index 9e892499d778..03f80179b04d 100644 --- a/docs/nodejs/classes/Operator.html +++ b/docs/nodejs/classes/Operator.html @@ -1,4 +1,4 @@ -Operator | Apache OpenDAL™ - v0.45.0

    Constructors

    constructor +Operator | Apache OpenDAL™ - v0.45.0

    Constructors

    Methods

    append capability check @@ -31,45 +31,45 @@ writer writerSync

    Constructors

    Methods

    • Append bytes into path.

      +

    Methods

    • Append bytes into path.

      Notes

      • It always appends content to the end of the file.
      • It will create file if the path not exists.

      Example

      await op.append("path/to/file", Buffer.from("hello world"));
      // or
      await op.append("path/to/file", "hello world");
      -

      Parameters

      • path: string
      • content: string | Buffer

      Returns Promise<void>

    • Check if this operator can work correctly.

      +

      Parameters

      • path: string
      • content: string | Buffer

      Returns Promise<void>

    • Check if this operator can work correctly.

      We will send a list request to path and return any errors we met.

      Example

      await op.check();
       
      -

      Returns Promise<void>

    • Copy file according to given from and to path.

      +

      Returns Promise<void>

    • Copy file according to given from and to path.

      Example

      await op.copy("path/to/file", "path/to/dest");
       
      -

      Parameters

      • from: string
      • to: string

      Returns Promise<void>

    • Copy file according to given from and to path synchronously.

      +

      Parameters

      • from: string
      • to: string

      Returns Promise<void>

    • Copy file according to given from and to path synchronously.

      Example

      op.copySync("path/to/file", "path/to/dest");
       
      -

      Parameters

      • from: string
      • to: string

      Returns void

    • Create dir with given path.

      +

      Parameters

      • from: string
      • to: string

      Returns void

    • Create dir with given path.

      Example

      await op.createDir("path/to/dir/");
       
      -

      Parameters

      • path: string

      Returns Promise<void>

    • Create dir with given path synchronously.

      +

      Parameters

      • path: string

      Returns Promise<void>

    • Create dir with given path synchronously.

      Example

      op.createDirSync("path/to/dir/");
       
      -

      Parameters

      • path: string

      Returns void

    • Delete the given path.

      +

      Parameters

      • path: string

      Returns void

    • Delete the given path.

      Notes

      Delete not existing error won’t return errors.

      Example

      await op.delete("test");
       
      -

      Parameters

      • path: string

      Returns Promise<void>

    • Delete the given path synchronously.

      +

      Parameters

      • path: string

      Returns Promise<void>

    • Delete the given path synchronously.

      Example

      op.deleteSync("test");
       
      -

      Parameters

      • path: string

      Returns void

    • Check if this path exists or not.

      +

      Parameters

      • path: string

      Returns void

    • Check if this path exists or not.

      Example

      await op.isExist("test");
       
      -

      Parameters

      • path: string

      Returns Promise<boolean>

    • Check if this path exists or not synchronously.

      +

      Parameters

      • path: string

      Returns Promise<boolean>

    • Check if this path exists or not synchronously.

      Example

      op.isExistSync("test");
       
      -

      Parameters

      • path: string

      Returns boolean

    • List given path.

      +

      Parameters

      • path: string

      Returns boolean

    • List given path.

      This function will return an array of entries.

      An error will be returned if given path doesn't end with /.

      Example

      const list = await op.list("path/to/dir/");
      for (let entry of list) {
      let meta = await op.stat(entry.path);
      if (meta.isFile) {
      // do something
      }
      } @@ -77,7 +77,7 @@

      List recursively

      With recursive option, you can list recursively.

      const list = await op.list("path/to/dir/", { recursive: true });
      for (let entry of list) {
      let meta = await op.stat(entry.path);
      if (meta.isFile) {
      // do something
      }
      }
      -

      Parameters

      Returns Promise<Entry[]>

    • List given path synchronously.

      This function will return a array of entries.

      An error will be returned if given path doesn't end with /.

      Example

      const list = op.listSync("path/to/dir/");
      for (let entry of list) {
      let meta = op.statSync(entry.path);
      if (meta.isFile) {
      // do something
      }
      } @@ -85,45 +85,45 @@

      List recursively

      With recursive option, you can list recursively.

      const list = op.listSync("path/to/dir/", { recursive: true });
      for (let entry of list) {
      let meta = op.statSync(entry.path);
      if (meta.isFile) {
      // do something
      }
      }
      -

      Parameters

      Returns Entry[]

    • Get a presigned request for read.

      Unit of expires is seconds.

      Example

      const req = await op.presignRead(path, parseInt(expires));

      console.log("method: ", req.method);
      console.log("url: ", req.url);
      console.log("headers: ", req.headers);
      -

      Parameters

      • path: string
      • expires: number

      Returns Promise<PresignedRequest>

    • Get a presigned request for stat.

      Unit of expires is seconds.

      Example

      const req = await op.presignStat(path, parseInt(expires));

      console.log("method: ", req.method);
      console.log("url: ", req.url);
      console.log("headers: ", req.headers);
      -

      Parameters

      • path: string
      • expires: number

      Returns Promise<PresignedRequest>

    • Get a presigned request for write.

      Unit of expires is seconds.

      Example

      const req = await op.presignWrite(path, parseInt(expires));

      console.log("method: ", req.method);
      console.log("url: ", req.url);
      console.log("headers: ", req.headers);
      -

      Parameters

      • path: string
      • expires: number

      Returns Promise<PresignedRequest>

    • Read the whole path into a buffer.

      Example

      const buf = await op.read("path/to/file");
       
      -

      Parameters

      • path: string

      Returns Promise<Buffer>

    • Read the whole path into a buffer synchronously.

      +

      Parameters

      • path: string

      Returns Promise<Buffer>

    • Read the whole path into a buffer synchronously.

      Example

      const buf = op.readSync("path/to/file");
       
      -

      Parameters

      • path: string

      Returns Buffer

    • Create a reader to read the given path.

      +

      Parameters

      • path: string

      Returns Buffer

    • Create a reader to read the given path.

      It could be used to read large file in a streaming way.

      -

      Parameters

      • path: string

      Returns Promise<Reader>

    • Remove given paths.

      Notes

      If underlying services support delete in batch, we will use batch delete instead.

      Examples

      await op.remove(["abc", "def"]);
       
      -

      Parameters

      • paths: string[]

      Returns Promise<void>

    • Remove the path and all nested dirs and files recursively.

      +

      Parameters

      • paths: string[]

      Returns Promise<void>

    • Remove the path and all nested dirs and files recursively.

      Notes

      If underlying services support delete in batch, we will use batch delete instead.

      Examples

      await op.removeAll("path/to/dir/");
       
      -

      Parameters

      • path: string

      Returns Promise<void>

    • Rename file according to given from and to path.

      +

      Parameters

      • path: string

      Returns Promise<void>

    • Rename file according to given from and to path.

      It's similar to mv command.

      Example

      await op.rename("path/to/file", "path/to/dest");
       
      -

      Parameters

      • from: string
      • to: string

      Returns Promise<void>

    • Rename file according to given from and to path synchronously.

      +

      Parameters

      • from: string
      • to: string

      Returns Promise<void>

    • Rename file according to given from and to path synchronously.

      It's similar to mv command.

      Example

      op.renameSync("path/to/file", "path/to/dest");
       
      -

      Parameters

      • from: string
      • to: string

      Returns void

    • Get current path's metadata without cache directly.

      +

      Parameters

      • from: string
      • to: string

      Returns void

    • Get current path's metadata without cache directly.

      Notes

      Use stat if you:

      • Want detect the outside changes of path.
      • @@ -132,17 +132,17 @@

        You may want to use metadata if you are working with entries returned by Lister. It’s highly possible that metadata you want has already been cached.

        Example

        const meta = await op.stat("test");
        if (meta.isDir) {
        // do something
        }
        -

      Parameters

      • path: string

      Returns Promise<Metadata>

    • Get current path's metadata without cache directly and synchronously.

      +

      Parameters

      • path: string

      Returns Promise<Metadata>

    • Get current path's metadata without cache directly and synchronously.

      Example

      const meta = op.statSync("test");
      if (meta.isDir) {
      // do something
      }
      -

      Parameters

      • path: string

      Returns Metadata

    • Write bytes into path.

      Example

      await op.write("path/to/file", Buffer.from("hello world"));
      // or
      await op.write("path/to/file", "hello world");
      -

      Parameters

      • path: string
      • content: string | Buffer

      Returns Promise<void>

    • Write bytes into path synchronously.

      +

      Parameters

      • path: string
      • content: string | Buffer

      Returns Promise<void>

    • Write bytes into path synchronously.

      Example

      op.writeSync("path/to/file", Buffer.from("hello world"));
      // or
      op.writeSync("path/to/file", "hello world");
      -

      Parameters

      • path: string
      • content: string | Buffer

      Returns void

    • Write multiple bytes into path.

      +

      Parameters

      • path: string
      • content: string | Buffer

      Returns void

    • Write multiple bytes into path.

      It could be used to write large file in a streaming way.

      -

      Parameters

      • path: string

      Returns Promise<Writer>

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file +

    Parameters

    • path: string

    Returns BlockingWriter

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/nodejs/classes/Reader.html b/docs/nodejs/classes/Reader.html index d6352e86c02a..b0324927371b 100644 --- a/docs/nodejs/classes/Reader.html +++ b/docs/nodejs/classes/Reader.html @@ -1,11 +1,11 @@ Reader | Apache OpenDAL™ - v0.45.0

    Reader is designed to read data from given path in an asynchronous manner.

    -

    Constructors

    Constructors

    Methods

    Constructors

    Methods

    • Create a readable stream from the underlying reader.

      -

      Parameters

      • Optional options: ReadableOptions

      Returns Readable

    • Parameters

      • Optional options: ReadableOptions

      Returns Readable

    • Safety

      &mut self in async napi methods should be marked as unsafe

      Read bytes from this reader into given buffer.

      -

      Parameters

      • buf: Buffer

      Returns Promise<bigint>

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file +

    Parameters

    • buf: Buffer

    Returns Promise<bigint>

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/nodejs/classes/RetryLayer.html b/docs/nodejs/classes/RetryLayer.html index b5daceddb5df..9c5c027f98fa 100644 --- a/docs/nodejs/classes/RetryLayer.html +++ b/docs/nodejs/classes/RetryLayer.html @@ -6,27 +6,27 @@

    write and blocking_write don't support retry so far, visit this issue for more details.

    Examples

    const op = new Operator("file", { root: "/tmp" })

    const retry = new RetryLayer();
    retry.max_times = 3;
    retry.jitter = true;

    op.layer(retry.build());
    -

    Constructors

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    • set factor(v): void
    • Set factor of current backoff.

      +

    Constructors

    Accessors

    • set factor(v): void
    • Set factor of current backoff.

      Panics

      This function will panic if input factor smaller than 1.0.

      -

      Parameters

      • v: number

      Returns void

    • set jitter(v): void
    • Set jitter of current backoff.

      +

      Parameters

      • v: number

      Returns void

    • set jitter(v): void
    • Set jitter of current backoff.

      If jitter is enabled, ExponentialBackoff will add a random jitter in `[0, min_delay) to current delay.

      -

      Parameters

      • v: boolean

      Returns void

    • set maxDelay(v): void
    • Set max_delay of current backoff.

      +

      Parameters

      • v: boolean

      Returns void

    • set maxDelay(v): void
    • Set max_delay of current backoff.

      Delay will not increasing if current delay is larger than max_delay.

      Notes

      • The unit of max_delay is millisecond.
      -

      Parameters

      • v: number

      Returns void

    • set maxTimes(v): void
    • Set max_times of current backoff.

      +

      Parameters

      • v: number

      Returns void

    • set maxTimes(v): void
    • Set max_times of current backoff.

      Backoff will return None if max times is reaching.

      -

      Parameters

      • v: number

      Returns void

    • set minDelay(v): void
    • Set min_delay of current backoff.

      +

      Parameters

      • v: number

      Returns void

    • set minDelay(v): void
    • Set min_delay of current backoff.

      Notes

      • The unit of min_delay is millisecond.
      -

      Parameters

      • v: number

      Returns void

    Methods

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file +

    Parameters

    • v: number

    Returns void

    Methods

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/nodejs/classes/Writer.html b/docs/nodejs/classes/Writer.html index ea41ae7a0b96..94c9d65f527b 100644 --- a/docs/nodejs/classes/Writer.html +++ b/docs/nodejs/classes/Writer.html @@ -1,6 +1,6 @@ Writer | Apache OpenDAL™ - v0.45.0

    Writer is designed to write data into given path in an asynchronous manner.

    -

    Constructors

    Constructors

    Methods

    close createWriteStream write @@ -10,11 +10,11 @@

    Close this writer.

    Example

    const writer = await op.writer("path/to/file");
    await writer.write(Buffer.from("hello world"));
    await writer.close();
    -

    Returns Promise<void>

    • Create a writable stream from the underlying writer.

      -

      Parameters

      • Optional options: WritableOptions

      Returns Writable

    • Create a writable stream from the underlying writer.

      +

      Parameters

      • Optional options: WritableOptions

      Returns Writable

    • Safety

      &mut self in async napi methods should be marked as unsafe

      Write bytes into this writer.

      Example

      const writer = await op.writer("path/to/file");
      await writer.write(Buffer.from("hello world"));
      await writer.close();
      -

      Parameters

      • content: string | Buffer

      Returns Promise<void>

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file +

    Parameters

    • content: string | Buffer

    Returns Promise<void>

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/nodejs/interfaces/ListOptions.html b/docs/nodejs/interfaces/ListOptions.html index b53432e9165e..59760993d192 100644 --- a/docs/nodejs/interfaces/ListOptions.html +++ b/docs/nodejs/interfaces/ListOptions.html @@ -1,3 +1,3 @@ -ListOptions | Apache OpenDAL™ - v0.45.0

    Interface ListOptions

    interface ListOptions {
        limit?: number;
        recursive?: boolean;
    }

    Properties

    limit? +ListOptions | Apache OpenDAL™ - v0.45.0

    Interface ListOptions

    interface ListOptions {
        limit?: number;
        recursive?: boolean;
    }

    Properties

    Properties

    limit?: number
    recursive?: boolean

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file +

    Properties

    limit?: number
    recursive?: boolean

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/nodejs/interfaces/PresignedRequest.html b/docs/nodejs/interfaces/PresignedRequest.html index a6f55a63632c..043fd40f889c 100644 --- a/docs/nodejs/interfaces/PresignedRequest.html +++ b/docs/nodejs/interfaces/PresignedRequest.html @@ -1,8 +1,8 @@ PresignedRequest | Apache OpenDAL™ - v0.45.0

    Interface PresignedRequest

    PresignedRequest is a presigned request return by presign.

    -
    interface PresignedRequest {
        headers: Record<string, string>;
        method: string;
        url: string;
    }

    Properties

    interface PresignedRequest {
        headers: Record<string, string>;
        method: string;
        url: string;
    }

    Properties

    Properties

    headers: Record<string, string>

    HTTP headers of this request.

    -
    method: string

    HTTP method of this request.

    -
    url: string

    URL of this request.

    -

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file +
    method: string

    HTTP method of this request.

    +
    url: string

    URL of this request.

    +

    Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

    \ No newline at end of file diff --git a/docs/overview/index.html b/docs/overview/index.html index 8617404ce1be..79ab14695a50 100644 --- a/docs/overview/index.html +++ b/docs/overview/index.html @@ -5,13 +5,13 @@ Welcome to Apache OpenDAL™ | Apache OpenDAL™ - +
    -

    Welcome to Apache OpenDAL™

    OpenDAL represents Open Data Access Layer. Our vision is to access data freely.

    What does OpenDAL do?

    Getting started

    See the page for quick start with multiple languages: Quickstart.

    Why OpenDAL?

    The vision of OpenDAL is access data freely, where "free" refers to four essential aspects:

    1. Free from services

    OpenDAL must enable users to access various storage services ranging from s3 to dropbox via its own native API. It should provide a unified API for accessing all these services.

    For example, we DO

    while we DO NOT

    • Add support for Google Cloud Storage (GCS) via XML API: GCS has native JSON API which is more powerful
    • Add support for structural data in MySQL/PostgreSQL: We can treat a database as a simple key-value store, but we can't support unified access of structural data.

    2. Free from implementations

    OpenDAL needs to separate the various implementation details of services and enables users to write identical logic for different services.

    For example, we DO

    • Add a new capability to indicate whether presign is supported: Users can now write logic based on the can_presign option.
    • Add a default_storage_class configuration for the S3 service: Configuration is specific to the S3 service.
    • Add an option for content_type in the write operation: It aligns with HTTP standards.

    while we DO NOT

    • Add a new option in read for storage_class: As different services could have varying values for this parameter.

    3. Free to integrate

    OpenDAL needs to be integrated with different systems.

    For example, we DO

    • Add Python binding: Python programmers can use OpenDAL.
    • Add object_store integration: object_store users can adopt OpenDAL.

    4. Free of cost

    OpenDAL needs to implement features in a zero cost way which means:

    • Users need not to pay cost for unused features.
    • Users cannot write better implementation for used features.

    For example, we DO

    • Add layer support: Users can add logging/metrics/tracing in zero cost way.
    • Implement seek for Reader: Users cannot write better seek support, they all need to pay the same cost.

    we DO NOT

    • Add Arc for metadata: Users may only need to use metadata once and never clone it. For those who do want this feature, they can add Arc themselves.
    - +

    Welcome to Apache OpenDAL™

    OpenDAL represents Open Data Access Layer. Our vision is to access data freely.

    What does OpenDAL do?

    Getting started

    See the page for quick start with multiple languages: Quickstart.

    Why OpenDAL?

    The vision of OpenDAL is access data freely, where "free" refers to four essential aspects:

    1. Free from services

    OpenDAL must enable users to access various storage services ranging from s3 to dropbox via its own native API. It should provide a unified API for accessing all these services.

    For example, we DO

    while we DO NOT

    • Add support for Google Cloud Storage (GCS) via XML API: GCS has native JSON API which is more powerful
    • Add support for structural data in MySQL/PostgreSQL: We can treat a database as a simple key-value store, but we can't support unified access of structural data.

    2. Free from implementations

    OpenDAL needs to separate the various implementation details of services and enables users to write identical logic for different services.

    For example, we DO

    • Add a new capability to indicate whether presign is supported: Users can now write logic based on the can_presign option.
    • Add a default_storage_class configuration for the S3 service: Configuration is specific to the S3 service.
    • Add an option for content_type in the write operation: It aligns with HTTP standards.

    while we DO NOT

    • Add a new option in read for storage_class: As different services could have varying values for this parameter.

    3. Free to integrate

    OpenDAL needs to be integrated with different systems.

    For example, we DO

    • Add Python binding: Python programmers can use OpenDAL.
    • Add object_store integration: object_store users can adopt OpenDAL.

    4. Free of cost

    OpenDAL needs to implement features in a zero cost way which means:

    • Users need not to pay cost for unused features.
    • Users cannot write better implementation for used features.

    For example, we DO

    • Add layer support: Users can add logging/metrics/tracing in zero cost way.
    • Implement seek for Reader: Users cannot write better seek support, they all need to pay the same cost.

    we DO NOT

    • Add Arc for metadata: Users may only need to use metadata once and never clone it. For those who do want this feature, they can add Arc themselves.
    + \ No newline at end of file diff --git a/docs/python/opendal.html b/docs/python/opendal.html index fe1600c4654a..d06e02ce5d84 100644 --- a/docs/python/opendal.html +++ b/docs/python/opendal.html @@ -219,19 +219,19 @@

    API Documentation

    content_disposition
  • - content_length + mode
  • - content_type + content_md5
  • - mode + content_length
  • etag
  • - content_md5 + content_type
  • @@ -255,121 +255,121 @@

    API Documentation

    Capability @@ -1298,41 +1298,41 @@

    Notes

    -
    +
    - content_length: int + mode: EntryMode
    - + -

    Content length of this entry.

    +

    mode represent this entry's mode.

    -
    +
    - content_type: Optional[str] + content_md5: Optional[str]
    - + -

    Content Type of this entry.

    +

    Content MD5 of this entry.

    -
    +
    - mode: EntryMode + content_length: int
    - + -

    mode represent this entry's mode.

    +

    Content length of this entry.

    @@ -1350,15 +1350,15 @@

    Notes

    -
    +
    - content_md5: Optional[str] + content_type: Optional[str]
    - + -

    Content MD5 of this entry.

    +

    Content Type of this entry.

    @@ -1431,160 +1431,160 @@

    Notes

    -
    +
    - list: bool + stat_with_if_match: bool
    - + -

    If operator supports list.

    +

    If operator supports stat with if match.

    -
    +
    - batch: bool + stat_with_if_none_match: bool
    - + -

    If operator supports batch.

    +

    If operator supports stat with if none match.

    -
    +
    - read_can_seek: bool + write_can_empty: bool
    - + -

    If operator supports seek on returning reader.

    +

    If operator supports write with empty content.

    -
    +
    - create_dir: bool + list: bool
    - + -

    If operator supports create dir.

    +

    If operator supports list.

    -
    +
    - list_with_limit: bool + presign_read: bool
    - + -

    If backend supports list with limit.

    +

    If operator supports presign read.

    -
    +
    - list_with_recursive: bool + write_can_append: bool
    - + -

    If backend supports list without delimiter.

    +

    If operator supports write by append.

    -
    +
    - presign_stat: bool + create_dir: bool
    - + -

    If operator supports presign stat.

    +

    If operator supports create dir.

    -
    +
    - write_multi_min_size: Optional[int] + presign: bool
    - + -

    write_multi_min_size is the min size that services support in write_multi.

    - -

    For example, AWS S3 requires at least 5MiB in write_multi expect the last one.

    +

    If operator supports presign.

    -
    +
    - blocking: bool + write_multi_align_size: Optional[int]
    - + -

    If operator supports blocking.

    +

    write_multi_align_size is the align size that services required in write_multi.

    + +

    For example, Google GCS requires align size to 256KiB in write_multi.

    -
    +
    - stat_with_if_match: bool + write_with_cache_control: bool
    - + -

    If operator supports stat with if match.

    +

    If operator supports write with cache control.

    -
    +
    - read_with_override_content_disposition: bool + list_with_limit: bool
    - + -

    if operator supports read with override content disposition.

    +

    If backend supports list with limit.

    -
    +
    - read_with_range: bool + batch: bool
    - + -

    If operator supports read with range.

    +

    If operator supports batch.

    @@ -1602,43 +1602,28 @@

    Notes

    -
    -
    - read_with_if_none_match: bool - - -
    - - -

    If operator supports read with if none match.

    -
    - - -
    -
    +
    - batch_delete: bool + batch_max_operations: Optional[int]
    - + -

    If operator supports batch delete.

    +

    The max operations that operator supports in batch.

    -
    +
    - write_multi_max_size: Optional[int] + stat: bool
    - + -

    write_multi_max_size is the max size that services support in write_multi.

    - -

    For example, AWS S3 supports 5GiB as max in write_multi.

    +

    If operator supports stat.

    @@ -1656,93 +1641,93 @@

    Notes

    -
    +
    - rename: bool + write_with_content_type: bool
    - + -

    If operator supports rename.

    +

    If operator supports write with content type.

    -
    +
    - stat: bool + read_with_override_cache_control: bool
    - + -

    If operator supports stat.

    +

    if operator supports read with override cache control.

    -
    +
    - presign: bool + read_with_override_content_disposition: bool
    - + -

    If operator supports presign.

    +

    if operator supports read with override content disposition.

    -
    +
    - write_with_cache_control: bool + read_with_override_content_type: bool
    - + -

    If operator supports write with cache control.

    +

    if operator supports read with override content type.

    -
    +
    - write: bool + rename: bool
    - + -

    If operator supports write.

    +

    If operator supports rename.

    -
    +
    - list_with_start_after: bool + read_can_next: bool
    - + -

    If backend supports list with start after.

    +

    If operator supports next on returning reader.

    -
    +
    - presign_write: bool + presign_stat: bool
    - + -

    If operator supports presign write.

    +

    If operator supports presign stat.

    @@ -1762,106 +1747,121 @@

    Notes

    -
    +
    - presign_read: bool + list_with_start_after: bool
    - + -

    If operator supports presign read.

    +

    If backend supports list with start after.

    -
    +
    - write_with_content_type: bool + write: bool
    - + -

    If operator supports write with content type.

    +

    If operator supports write.

    -
    +
    - batch_max_operations: Optional[int] + write_with_content_disposition: bool
    - + -

    The max operations that operator supports in batch.

    +

    If operator supports write with content disposition.

    -
    +
    - stat_with_if_none_match: bool + read_with_range: bool
    - + -

    If operator supports stat with if none match.

    +

    If operator supports read with range.

    -
    +
    - read_with_override_cache_control: bool + read_can_seek: bool
    - + -

    if operator supports read with override cache control.

    +

    If operator supports seek on returning reader.

    -
    +
    - write_can_append: bool + read_with_if_match: bool
    - + -

    If operator supports write by append.

    +

    If operator supports read with if match.

    -
    +
    - write_can_empty: bool + write_multi_max_size: Optional[int]
    - + -

    If operator supports write with empty content.

    +

    write_multi_max_size is the max size that services support in write_multi.

    + +

    For example, AWS S3 supports 5GiB as max in write_multi.

    -
    +
    - write_with_content_disposition: bool + delete: bool
    - + -

    If operator supports write with content disposition.

    +

    If operator supports delete.

    +
    + + +
    +
    +
    + list_with_recursive: bool + + +
    + + +

    If backend supports list without delimiter.

    @@ -1879,69 +1879,69 @@

    Notes

    -
    +
    - write_multi_align_size: Optional[int] + write_multi_min_size: Optional[int]
    - + -

    write_multi_align_size is the align size that services required in write_multi.

    +

    write_multi_min_size is the min size that services support in write_multi.

    -

    For example, Google GCS requires align size to 256KiB in write_multi.

    +

    For example, AWS S3 requires at least 5MiB in write_multi expect the last one.

    -
    +
    - read_with_if_match: bool + presign_write: bool
    - + -

    If operator supports read with if match.

    +

    If operator supports presign write.

    -
    +
    - delete: bool + read_with_if_none_match: bool
    - + -

    If operator supports delete.

    +

    If operator supports read with if none match.

    -
    +
    - read_with_override_content_type: bool + batch_delete: bool
    - + -

    if operator supports read with override content type.

    +

    If operator supports batch delete.

    -
    +
    - read_can_next: bool + blocking: bool
    - + -

    If operator supports next on returning reader.

    +

    If operator supports blocking.

    diff --git a/docs/python/search.js b/docs/python/search.js index 16650cd9794d..c3cd71329774 100644 --- a/docs/python/search.js +++ b/docs/python/search.js @@ -1,6 +1,6 @@ window.pdocSearch = (function(){ /** elasticlunr - http://weixsong.github.io * Copyright (C) 2017 Oliver Nightingale * Copyright (C) 2017 Wei Song * MIT Licensed */!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();oApache OpenDAL\u2122 Python binding

    \n\n

    Installation

    \n\n
    \n
    pip install opendal\n
    \n
    \n\n

    Usage

    \n\n
    \n
    import opendal\n\nop = opendal.Operator("fs", root="/tmp")\nop.write("test.txt", b"Hello World")\nprint(op.read("test.txt"))\nprint(op.stat("test.txt").content_length)\n
    \n
    \n\n

    Or using the async API:

    \n\n
    \n
    import asyncio\n\nasync def main():\nop = opendal.AsyncOperator("fs", root="/tmp")\nawait op.write("test.txt", b"Hello World")\nprint(await op.read("test.txt"))\n\nasyncio.run(main())\n
    \n
    \n"}, "opendal.Operator": {"fullname": "opendal.Operator", "modulename": "opendal", "qualname": "Operator", "kind": "class", "doc": "

    Operator is the entry for all public blocking APIs

    \n\n

    Create a new blocking Operator with the given scheme and options(**kwargs).

    \n"}, "opendal.Operator.__init__": {"fullname": "opendal.Operator.__init__", "modulename": "opendal", "qualname": "Operator.__init__", "kind": "function", "doc": "

    \n", "signature": "(scheme: str, **kwargs)"}, "opendal.Operator.layer": {"fullname": "opendal.Operator.layer", "modulename": "opendal", "qualname": "Operator.layer", "kind": "function", "doc": "

    Add new layers upon existing operator

    \n", "signature": "(self, layer: opendal.layers.Layer):", "funcdef": "def"}, "opendal.Operator.open": {"fullname": "opendal.Operator.open", "modulename": "opendal", "qualname": "Operator.open", "kind": "function", "doc": "

    Open a file-like reader for the given path.

    \n", "signature": "(self, path: str, mode: str) -> opendal.File:", "funcdef": "def"}, "opendal.Operator.read": {"fullname": "opendal.Operator.read", "modulename": "opendal", "qualname": "Operator.read", "kind": "function", "doc": "

    Read the whole path into bytes.

    \n", "signature": "(self, path: str) -> memoryview:", "funcdef": "def"}, "opendal.Operator.write": {"fullname": "opendal.Operator.write", "modulename": "opendal", "qualname": "Operator.write", "kind": "function", "doc": "

    Write bytes into given path.

    \n", "signature": "(\tself,\tpath: str,\tbs: bytes,\tappend: Optional[bool] = None,\tbuffer: Optional[int] = None,\tcontent_type: Optional[str] = None,\tcontent_disposition: Optional[str] = None,\tcache_control: Optional[str] = None):", "funcdef": "def"}, "opendal.Operator.stat": {"fullname": "opendal.Operator.stat", "modulename": "opendal", "qualname": "Operator.stat", "kind": "function", "doc": "

    Get current path's metadata without cache directly.

    \n", "signature": "(self, path: str) -> opendal.Metadata:", "funcdef": "def"}, "opendal.Operator.copy": {"fullname": "opendal.Operator.copy", "modulename": "opendal", "qualname": "Operator.copy", "kind": "function", "doc": "

    Copy source to target.

    \n", "signature": "(self, source: str, target: str):", "funcdef": "def"}, "opendal.Operator.rename": {"fullname": "opendal.Operator.rename", "modulename": "opendal", "qualname": "Operator.rename", "kind": "function", "doc": "

    Rename filename.

    \n", "signature": "(self, source: str, target: str):", "funcdef": "def"}, "opendal.Operator.remove_all": {"fullname": "opendal.Operator.remove_all", "modulename": "opendal", "qualname": "Operator.remove_all", "kind": "function", "doc": "

    Remove all file

    \n", "signature": "(self, path: str):", "funcdef": "def"}, "opendal.Operator.create_dir": {"fullname": "opendal.Operator.create_dir", "modulename": "opendal", "qualname": "Operator.create_dir", "kind": "function", "doc": "

    Create a dir at given path.

    \n\n

    Notes

    \n\n

    To indicate that a path is a directory, it is compulsory to include\na trailing / in the path. Failure to do so may result in\nNotADirectory error being returned by OpenDAL.

    \n\n

    Behavior

    \n\n
      \n
    • Create on existing dir will succeed.
    • \n
    • Create dir is always recursive, works like mkdir -p
    • \n
    \n", "signature": "(self, path: str):", "funcdef": "def"}, "opendal.Operator.delete": {"fullname": "opendal.Operator.delete", "modulename": "opendal", "qualname": "Operator.delete", "kind": "function", "doc": "

    Delete given path.

    \n\n

    Notes

    \n\n
      \n
    • Delete not existing error won't return errors.
    • \n
    \n", "signature": "(self, path: str):", "funcdef": "def"}, "opendal.Operator.list": {"fullname": "opendal.Operator.list", "modulename": "opendal", "qualname": "Operator.list", "kind": "function", "doc": "

    List current dir path.

    \n", "signature": "(self, path: str) -> Iterable[opendal.Entry]:", "funcdef": "def"}, "opendal.Operator.scan": {"fullname": "opendal.Operator.scan", "modulename": "opendal", "qualname": "Operator.scan", "kind": "function", "doc": "

    List dir in flat way.

    \n", "signature": "(self, path: str) -> Iterable[opendal.Entry]:", "funcdef": "def"}, "opendal.Operator.capability": {"fullname": "opendal.Operator.capability", "modulename": "opendal", "qualname": "Operator.capability", "kind": "function", "doc": "

    \n", "signature": "(self) -> opendal.Capability:", "funcdef": "def"}, "opendal.Operator.to_async_operator": {"fullname": "opendal.Operator.to_async_operator", "modulename": "opendal", "qualname": "Operator.to_async_operator", "kind": "function", "doc": "

    \n", "signature": "(self) -> opendal.AsyncOperator:", "funcdef": "def"}, "opendal.AsyncOperator": {"fullname": "opendal.AsyncOperator", "modulename": "opendal", "qualname": "AsyncOperator", "kind": "class", "doc": "

    AsyncOperator is the entry for all public async APIs

    \n\n

    Create a new AsyncOperator with the given scheme and options(**kwargs).

    \n"}, "opendal.AsyncOperator.__init__": {"fullname": "opendal.AsyncOperator.__init__", "modulename": "opendal", "qualname": "AsyncOperator.__init__", "kind": "function", "doc": "

    \n", "signature": "(scheme: str, **kwargs)"}, "opendal.AsyncOperator.layer": {"fullname": "opendal.AsyncOperator.layer", "modulename": "opendal", "qualname": "AsyncOperator.layer", "kind": "function", "doc": "

    Add new layers upon existing operator

    \n", "signature": "(self, layer: opendal.layers.Layer):", "funcdef": "def"}, "opendal.AsyncOperator.open": {"fullname": "opendal.AsyncOperator.open", "modulename": "opendal", "qualname": "AsyncOperator.open", "kind": "function", "doc": "

    Open a file-like reader for the given path.

    \n", "signature": "(self, path: str, mode: str) -> opendal.AsyncFile:", "funcdef": "async def"}, "opendal.AsyncOperator.read": {"fullname": "opendal.AsyncOperator.read", "modulename": "opendal", "qualname": "AsyncOperator.read", "kind": "function", "doc": "

    Read the whole path into bytes.

    \n", "signature": "(self, path: str) -> memoryview:", "funcdef": "async def"}, "opendal.AsyncOperator.write": {"fullname": "opendal.AsyncOperator.write", "modulename": "opendal", "qualname": "AsyncOperator.write", "kind": "function", "doc": "

    Write bytes into given path.

    \n", "signature": "(\tself,\tpath: str,\tbs: bytes,\tappend: Optional[bool] = None,\tbuffer: Optional[int] = None,\tcontent_type: Optional[str] = None,\tcontent_disposition: Optional[str] = None,\tcache_control: Optional[str] = None):", "funcdef": "async def"}, "opendal.AsyncOperator.stat": {"fullname": "opendal.AsyncOperator.stat", "modulename": "opendal", "qualname": "AsyncOperator.stat", "kind": "function", "doc": "

    Get current path's metadata without cache directly.

    \n", "signature": "(self, path: str) -> opendal.Metadata:", "funcdef": "async def"}, "opendal.AsyncOperator.copy": {"fullname": "opendal.AsyncOperator.copy", "modulename": "opendal", "qualname": "AsyncOperator.copy", "kind": "function", "doc": "

    Copy source to target.``

    \n", "signature": "(self, source: str, target: str):", "funcdef": "async def"}, "opendal.AsyncOperator.rename": {"fullname": "opendal.AsyncOperator.rename", "modulename": "opendal", "qualname": "AsyncOperator.rename", "kind": "function", "doc": "

    Rename filename

    \n", "signature": "(self, source: str, target: str):", "funcdef": "async def"}, "opendal.AsyncOperator.remove_all": {"fullname": "opendal.AsyncOperator.remove_all", "modulename": "opendal", "qualname": "AsyncOperator.remove_all", "kind": "function", "doc": "

    Remove all file

    \n", "signature": "(self, path: str):", "funcdef": "async def"}, "opendal.AsyncOperator.create_dir": {"fullname": "opendal.AsyncOperator.create_dir", "modulename": "opendal", "qualname": "AsyncOperator.create_dir", "kind": "function", "doc": "

    Create a dir at given path.

    \n\n

    Notes

    \n\n

    To indicate that a path is a directory, it is compulsory to include\na trailing / in the path. Failure to do so may result in\nNotADirectory error being returned by OpenDAL.

    \n\n

    Behavior

    \n\n
      \n
    • Create on existing dir will succeed.
    • \n
    • Create dir is always recursive, works like mkdir -p
    • \n
    \n", "signature": "(self, path: str):", "funcdef": "async def"}, "opendal.AsyncOperator.delete": {"fullname": "opendal.AsyncOperator.delete", "modulename": "opendal", "qualname": "AsyncOperator.delete", "kind": "function", "doc": "

    Delete given path.

    \n\n

    Notes

    \n\n
      \n
    • Delete not existing error won't return errors.
    • \n
    \n", "signature": "(self, path: str):", "funcdef": "async def"}, "opendal.AsyncOperator.list": {"fullname": "opendal.AsyncOperator.list", "modulename": "opendal", "qualname": "AsyncOperator.list", "kind": "function", "doc": "

    List current dir path.

    \n", "signature": "(self, path: str) -> AsyncIterable[opendal.Entry]:", "funcdef": "async def"}, "opendal.AsyncOperator.scan": {"fullname": "opendal.AsyncOperator.scan", "modulename": "opendal", "qualname": "AsyncOperator.scan", "kind": "function", "doc": "

    List dir in flat way.

    \n", "signature": "(self, path: str) -> AsyncIterable[opendal.Entry]:", "funcdef": "async def"}, "opendal.AsyncOperator.presign_stat": {"fullname": "opendal.AsyncOperator.presign_stat", "modulename": "opendal", "qualname": "AsyncOperator.presign_stat", "kind": "function", "doc": "

    Presign an operation for stat(head) which expires after expire_second seconds.

    \n", "signature": "(self, path: str, expire_second: int) -> opendal.PresignedRequest:", "funcdef": "async def"}, "opendal.AsyncOperator.presign_read": {"fullname": "opendal.AsyncOperator.presign_read", "modulename": "opendal", "qualname": "AsyncOperator.presign_read", "kind": "function", "doc": "

    Presign an operation for read which expires after expire_second seconds.

    \n", "signature": "(self, path: str, expire_second: int) -> opendal.PresignedRequest:", "funcdef": "async def"}, "opendal.AsyncOperator.presign_write": {"fullname": "opendal.AsyncOperator.presign_write", "modulename": "opendal", "qualname": "AsyncOperator.presign_write", "kind": "function", "doc": "

    Presign an operation for write which expires after expire_second seconds.

    \n", "signature": "(self, path: str, expire_second: int) -> opendal.PresignedRequest:", "funcdef": "async def"}, "opendal.AsyncOperator.capability": {"fullname": "opendal.AsyncOperator.capability", "modulename": "opendal", "qualname": "AsyncOperator.capability", "kind": "function", "doc": "

    \n", "signature": "(self) -> opendal.Capability:", "funcdef": "def"}, "opendal.AsyncOperator.to_operator": {"fullname": "opendal.AsyncOperator.to_operator", "modulename": "opendal", "qualname": "AsyncOperator.to_operator", "kind": "function", "doc": "

    \n", "signature": "(self) -> opendal.Operator:", "funcdef": "def"}, "opendal.File": {"fullname": "opendal.File", "modulename": "opendal", "qualname": "File", "kind": "class", "doc": "

    A file-like object.\nCan be used as a context manager.

    \n"}, "opendal.File.read": {"fullname": "opendal.File.read", "modulename": "opendal", "qualname": "File.read", "kind": "function", "doc": "

    Read and return size bytes, or if size is not given, until EOF.

    \n", "signature": "(self, size: Optional[int] = None) -> memoryview:", "funcdef": "def"}, "opendal.File.write": {"fullname": "opendal.File.write", "modulename": "opendal", "qualname": "File.write", "kind": "function", "doc": "

    Write bytes into the file.

    \n", "signature": "(self, bs: bytes):", "funcdef": "def"}, "opendal.File.seek": {"fullname": "opendal.File.seek", "modulename": "opendal", "qualname": "File.seek", "kind": "function", "doc": "

    Change the stream position to the given byte offset.\nOffset is interpreted relative to the position indicated by whence.\nThe default value for whence is SEEK_SET. Values for whence are:

    \n\n
      \n
    • SEEK_SET or 0 \u2013 start of the stream (the default); offset should be zero or positive
    • \n
    • SEEK_CUR or 1 \u2013 current stream position; offset may be negative
    • \n
    • SEEK_END or 2 \u2013 end of the stream; offset is usually negative
    • \n
    \n\n

    Return the new absolute position.

    \n", "signature": "(self, offset: int, whence: int = 0) -> int:", "funcdef": "def"}, "opendal.File.tell": {"fullname": "opendal.File.tell", "modulename": "opendal", "qualname": "File.tell", "kind": "function", "doc": "

    Return the current stream position.

    \n", "signature": "(self) -> int:", "funcdef": "def"}, "opendal.File.close": {"fullname": "opendal.File.close", "modulename": "opendal", "qualname": "File.close", "kind": "function", "doc": "

    \n", "signature": "(self):", "funcdef": "def"}, "opendal.AsyncFile": {"fullname": "opendal.AsyncFile", "modulename": "opendal", "qualname": "AsyncFile", "kind": "class", "doc": "

    A file-like async reader.\nCan be used as an async context manager.

    \n"}, "opendal.AsyncFile.read": {"fullname": "opendal.AsyncFile.read", "modulename": "opendal", "qualname": "AsyncFile.read", "kind": "function", "doc": "

    Read and return size bytes, or if size is not given, until EOF.

    \n", "signature": "(self, size: Optional[int] = None) -> memoryview:", "funcdef": "async def"}, "opendal.AsyncFile.write": {"fullname": "opendal.AsyncFile.write", "modulename": "opendal", "qualname": "AsyncFile.write", "kind": "function", "doc": "

    Write bytes into the file.

    \n", "signature": "(self, bs: bytes):", "funcdef": "async def"}, "opendal.AsyncFile.seek": {"fullname": "opendal.AsyncFile.seek", "modulename": "opendal", "qualname": "AsyncFile.seek", "kind": "function", "doc": "

    Change the stream position to the given byte offset.\noffset is interpreted relative to the position indicated by whence.\nThe default value for whence is SEEK_SET. Values for whence are:

    \n\n
      \n
    • SEEK_SET or 0 \u2013 start of the stream (the default); offset should be zero or positive
    • \n
    • SEEK_CUR or 1 \u2013 current stream position; offset may be negative
    • \n
    • SEEK_END or 2 \u2013 end of the stream; offset is usually negative
    • \n
    \n\n

    Return the new absolute position.

    \n", "signature": "(self, offset: int, whence: int = 0) -> int:", "funcdef": "async def"}, "opendal.AsyncFile.tell": {"fullname": "opendal.AsyncFile.tell", "modulename": "opendal", "qualname": "AsyncFile.tell", "kind": "function", "doc": "

    Return the current stream position.

    \n", "signature": "(self) -> int:", "funcdef": "async def"}, "opendal.AsyncFile.close": {"fullname": "opendal.AsyncFile.close", "modulename": "opendal", "qualname": "AsyncFile.close", "kind": "function", "doc": "

    \n", "signature": "(self):", "funcdef": "async def"}, "opendal.Entry": {"fullname": "opendal.Entry", "modulename": "opendal", "qualname": "Entry", "kind": "class", "doc": "

    \n"}, "opendal.Entry.path": {"fullname": "opendal.Entry.path", "modulename": "opendal", "qualname": "Entry.path", "kind": "variable", "doc": "

    Path of entry. Path is relative to operator's root.

    \n", "annotation": ": str"}, "opendal.EntryMode": {"fullname": "opendal.EntryMode", "modulename": "opendal", "qualname": "EntryMode", "kind": "class", "doc": "

    \n"}, "opendal.EntryMode.is_file": {"fullname": "opendal.EntryMode.is_file", "modulename": "opendal", "qualname": "EntryMode.is_file", "kind": "function", "doc": "

    Returns True if this is a file.

    \n", "signature": "(self) -> bool:", "funcdef": "def"}, "opendal.EntryMode.is_dir": {"fullname": "opendal.EntryMode.is_dir", "modulename": "opendal", "qualname": "EntryMode.is_dir", "kind": "function", "doc": "

    Returns True if this is a directory.

    \n", "signature": "(self) -> bool:", "funcdef": "def"}, "opendal.Metadata": {"fullname": "opendal.Metadata", "modulename": "opendal", "qualname": "Metadata", "kind": "class", "doc": "

    \n"}, "opendal.Metadata.content_disposition": {"fullname": "opendal.Metadata.content_disposition", "modulename": "opendal", "qualname": "Metadata.content_disposition", "kind": "variable", "doc": "

    \n", "annotation": ": Optional[str]"}, "opendal.Metadata.content_length": {"fullname": "opendal.Metadata.content_length", "modulename": "opendal", "qualname": "Metadata.content_length", "kind": "variable", "doc": "

    Content length of this entry.

    \n", "annotation": ": int"}, "opendal.Metadata.content_type": {"fullname": "opendal.Metadata.content_type", "modulename": "opendal", "qualname": "Metadata.content_type", "kind": "variable", "doc": "

    Content Type of this entry.

    \n", "annotation": ": Optional[str]"}, "opendal.Metadata.mode": {"fullname": "opendal.Metadata.mode", "modulename": "opendal", "qualname": "Metadata.mode", "kind": "variable", "doc": "

    mode represent this entry's mode.

    \n", "annotation": ": opendal.EntryMode"}, "opendal.Metadata.etag": {"fullname": "opendal.Metadata.etag", "modulename": "opendal", "qualname": "Metadata.etag", "kind": "variable", "doc": "

    ETag of this entry.

    \n", "annotation": ": Optional[str]"}, "opendal.Metadata.content_md5": {"fullname": "opendal.Metadata.content_md5", "modulename": "opendal", "qualname": "Metadata.content_md5", "kind": "variable", "doc": "

    Content MD5 of this entry.

    \n", "annotation": ": Optional[str]"}, "opendal.PresignedRequest": {"fullname": "opendal.PresignedRequest", "modulename": "opendal", "qualname": "PresignedRequest", "kind": "class", "doc": "

    \n"}, "opendal.PresignedRequest.method": {"fullname": "opendal.PresignedRequest.method", "modulename": "opendal", "qualname": "PresignedRequest.method", "kind": "variable", "doc": "

    Return the HTTP method of this request.

    \n", "annotation": ": str"}, "opendal.PresignedRequest.url": {"fullname": "opendal.PresignedRequest.url", "modulename": "opendal", "qualname": "PresignedRequest.url", "kind": "variable", "doc": "

    Return the URL of this request.

    \n", "annotation": ": str"}, "opendal.PresignedRequest.headers": {"fullname": "opendal.PresignedRequest.headers", "modulename": "opendal", "qualname": "PresignedRequest.headers", "kind": "variable", "doc": "

    Return the HTTP headers of this request.

    \n", "annotation": ": dict[str, str]"}, "opendal.Capability": {"fullname": "opendal.Capability", "modulename": "opendal", "qualname": "Capability", "kind": "class", "doc": "

    Capability is used to describe what operations are supported\nby current Operator.

    \n"}, "opendal.Capability.list": {"fullname": "opendal.Capability.list", "modulename": "opendal", "qualname": "Capability.list", "kind": "variable", "doc": "

    If operator supports list.

    \n", "annotation": ": bool"}, "opendal.Capability.batch": {"fullname": "opendal.Capability.batch", "modulename": "opendal", "qualname": "Capability.batch", "kind": "variable", "doc": "

    If operator supports batch.

    \n", "annotation": ": bool"}, "opendal.Capability.read_can_seek": {"fullname": "opendal.Capability.read_can_seek", "modulename": "opendal", "qualname": "Capability.read_can_seek", "kind": "variable", "doc": "

    If operator supports seek on returning reader.

    \n", "annotation": ": bool"}, "opendal.Capability.create_dir": {"fullname": "opendal.Capability.create_dir", "modulename": "opendal", "qualname": "Capability.create_dir", "kind": "variable", "doc": "

    If operator supports create dir.

    \n", "annotation": ": bool"}, "opendal.Capability.list_with_limit": {"fullname": "opendal.Capability.list_with_limit", "modulename": "opendal", "qualname": "Capability.list_with_limit", "kind": "variable", "doc": "

    If backend supports list with limit.

    \n", "annotation": ": bool"}, "opendal.Capability.list_with_recursive": {"fullname": "opendal.Capability.list_with_recursive", "modulename": "opendal", "qualname": "Capability.list_with_recursive", "kind": "variable", "doc": "

    If backend supports list without delimiter.

    \n", "annotation": ": bool"}, "opendal.Capability.presign_stat": {"fullname": "opendal.Capability.presign_stat", "modulename": "opendal", "qualname": "Capability.presign_stat", "kind": "variable", "doc": "

    If operator supports presign stat.

    \n", "annotation": ": bool"}, "opendal.Capability.write_multi_min_size": {"fullname": "opendal.Capability.write_multi_min_size", "modulename": "opendal", "qualname": "Capability.write_multi_min_size", "kind": "variable", "doc": "

    write_multi_min_size is the min size that services support in write_multi.

    \n\n

    For example, AWS S3 requires at least 5MiB in write_multi expect the last one.

    \n", "annotation": ": Optional[int]"}, "opendal.Capability.blocking": {"fullname": "opendal.Capability.blocking", "modulename": "opendal", "qualname": "Capability.blocking", "kind": "variable", "doc": "

    If operator supports blocking.

    \n", "annotation": ": bool"}, "opendal.Capability.stat_with_if_match": {"fullname": "opendal.Capability.stat_with_if_match", "modulename": "opendal", "qualname": "Capability.stat_with_if_match", "kind": "variable", "doc": "

    If operator supports stat with if match.

    \n", "annotation": ": bool"}, "opendal.Capability.read_with_override_content_disposition": {"fullname": "opendal.Capability.read_with_override_content_disposition", "modulename": "opendal", "qualname": "Capability.read_with_override_content_disposition", "kind": "variable", "doc": "

    if operator supports read with override content disposition.

    \n", "annotation": ": bool"}, "opendal.Capability.read_with_range": {"fullname": "opendal.Capability.read_with_range", "modulename": "opendal", "qualname": "Capability.read_with_range", "kind": "variable", "doc": "

    If operator supports read with range.

    \n", "annotation": ": bool"}, "opendal.Capability.write_can_multi": {"fullname": "opendal.Capability.write_can_multi", "modulename": "opendal", "qualname": "Capability.write_can_multi", "kind": "variable", "doc": "

    If operator supports write can be called in multi times.

    \n", "annotation": ": bool"}, "opendal.Capability.read_with_if_none_match": {"fullname": "opendal.Capability.read_with_if_none_match", "modulename": "opendal", "qualname": "Capability.read_with_if_none_match", "kind": "variable", "doc": "

    If operator supports read with if none match.

    \n", "annotation": ": bool"}, "opendal.Capability.batch_delete": {"fullname": "opendal.Capability.batch_delete", "modulename": "opendal", "qualname": "Capability.batch_delete", "kind": "variable", "doc": "

    If operator supports batch delete.

    \n", "annotation": ": bool"}, "opendal.Capability.write_multi_max_size": {"fullname": "opendal.Capability.write_multi_max_size", "modulename": "opendal", "qualname": "Capability.write_multi_max_size", "kind": "variable", "doc": "

    write_multi_max_size is the max size that services support in write_multi.

    \n\n

    For example, AWS S3 supports 5GiB as max in write_multi.

    \n", "annotation": ": Optional[int]"}, "opendal.Capability.read": {"fullname": "opendal.Capability.read", "modulename": "opendal", "qualname": "Capability.read", "kind": "variable", "doc": "

    If operator supports read.

    \n", "annotation": ": bool"}, "opendal.Capability.rename": {"fullname": "opendal.Capability.rename", "modulename": "opendal", "qualname": "Capability.rename", "kind": "variable", "doc": "

    If operator supports rename.

    \n", "annotation": ": bool"}, "opendal.Capability.stat": {"fullname": "opendal.Capability.stat", "modulename": "opendal", "qualname": "Capability.stat", "kind": "variable", "doc": "

    If operator supports stat.

    \n", "annotation": ": bool"}, "opendal.Capability.presign": {"fullname": "opendal.Capability.presign", "modulename": "opendal", "qualname": "Capability.presign", "kind": "variable", "doc": "

    If operator supports presign.

    \n", "annotation": ": bool"}, "opendal.Capability.write_with_cache_control": {"fullname": "opendal.Capability.write_with_cache_control", "modulename": "opendal", "qualname": "Capability.write_with_cache_control", "kind": "variable", "doc": "

    If operator supports write with cache control.

    \n", "annotation": ": bool"}, "opendal.Capability.write": {"fullname": "opendal.Capability.write", "modulename": "opendal", "qualname": "Capability.write", "kind": "variable", "doc": "

    If operator supports write.

    \n", "annotation": ": bool"}, "opendal.Capability.list_with_start_after": {"fullname": "opendal.Capability.list_with_start_after", "modulename": "opendal", "qualname": "Capability.list_with_start_after", "kind": "variable", "doc": "

    If backend supports list with start after.

    \n", "annotation": ": bool"}, "opendal.Capability.presign_write": {"fullname": "opendal.Capability.presign_write", "modulename": "opendal", "qualname": "Capability.presign_write", "kind": "variable", "doc": "

    If operator supports presign write.

    \n", "annotation": ": bool"}, "opendal.Capability.write_total_max_size": {"fullname": "opendal.Capability.write_total_max_size", "modulename": "opendal", "qualname": "Capability.write_total_max_size", "kind": "variable", "doc": "

    write_total_max_size is the max size that services support in write_total.

    \n\n

    For example, Cloudflare D1 supports 1MB as max in write_total.

    \n", "annotation": ": Optional[int]"}, "opendal.Capability.presign_read": {"fullname": "opendal.Capability.presign_read", "modulename": "opendal", "qualname": "Capability.presign_read", "kind": "variable", "doc": "

    If operator supports presign read.

    \n", "annotation": ": bool"}, "opendal.Capability.write_with_content_type": {"fullname": "opendal.Capability.write_with_content_type", "modulename": "opendal", "qualname": "Capability.write_with_content_type", "kind": "variable", "doc": "

    If operator supports write with content type.

    \n", "annotation": ": bool"}, "opendal.Capability.batch_max_operations": {"fullname": "opendal.Capability.batch_max_operations", "modulename": "opendal", "qualname": "Capability.batch_max_operations", "kind": "variable", "doc": "

    The max operations that operator supports in batch.

    \n", "annotation": ": Optional[int]"}, "opendal.Capability.stat_with_if_none_match": {"fullname": "opendal.Capability.stat_with_if_none_match", "modulename": "opendal", "qualname": "Capability.stat_with_if_none_match", "kind": "variable", "doc": "

    If operator supports stat with if none match.

    \n", "annotation": ": bool"}, "opendal.Capability.read_with_override_cache_control": {"fullname": "opendal.Capability.read_with_override_cache_control", "modulename": "opendal", "qualname": "Capability.read_with_override_cache_control", "kind": "variable", "doc": "

    if operator supports read with override cache control.

    \n", "annotation": ": bool"}, "opendal.Capability.write_can_append": {"fullname": "opendal.Capability.write_can_append", "modulename": "opendal", "qualname": "Capability.write_can_append", "kind": "variable", "doc": "

    If operator supports write by append.

    \n", "annotation": ": bool"}, "opendal.Capability.write_can_empty": {"fullname": "opendal.Capability.write_can_empty", "modulename": "opendal", "qualname": "Capability.write_can_empty", "kind": "variable", "doc": "

    If operator supports write with empty content.

    \n", "annotation": ": bool"}, "opendal.Capability.write_with_content_disposition": {"fullname": "opendal.Capability.write_with_content_disposition", "modulename": "opendal", "qualname": "Capability.write_with_content_disposition", "kind": "variable", "doc": "

    If operator supports write with content disposition.

    \n", "annotation": ": bool"}, "opendal.Capability.copy": {"fullname": "opendal.Capability.copy", "modulename": "opendal", "qualname": "Capability.copy", "kind": "variable", "doc": "

    If operator supports copy.

    \n", "annotation": ": bool"}, "opendal.Capability.write_multi_align_size": {"fullname": "opendal.Capability.write_multi_align_size", "modulename": "opendal", "qualname": "Capability.write_multi_align_size", "kind": "variable", "doc": "

    write_multi_align_size is the align size that services required in write_multi.

    \n\n

    For example, Google GCS requires align size to 256KiB in write_multi.

    \n", "annotation": ": Optional[int]"}, "opendal.Capability.read_with_if_match": {"fullname": "opendal.Capability.read_with_if_match", "modulename": "opendal", "qualname": "Capability.read_with_if_match", "kind": "variable", "doc": "

    If operator supports read with if match.

    \n", "annotation": ": bool"}, "opendal.Capability.delete": {"fullname": "opendal.Capability.delete", "modulename": "opendal", "qualname": "Capability.delete", "kind": "variable", "doc": "

    If operator supports delete.

    \n", "annotation": ": bool"}, "opendal.Capability.read_with_override_content_type": {"fullname": "opendal.Capability.read_with_override_content_type", "modulename": "opendal", "qualname": "Capability.read_with_override_content_type", "kind": "variable", "doc": "

    if operator supports read with override content type.

    \n", "annotation": ": bool"}, "opendal.Capability.read_can_next": {"fullname": "opendal.Capability.read_can_next", "modulename": "opendal", "qualname": "Capability.read_can_next", "kind": "variable", "doc": "

    If operator supports next on returning reader.

    \n", "annotation": ": bool"}, "opendal.layers": {"fullname": "opendal.layers", "modulename": "opendal.layers", "kind": "module", "doc": "

    \n"}, "opendal.layers.Layer": {"fullname": "opendal.layers.Layer", "modulename": "opendal.layers", "qualname": "Layer", "kind": "class", "doc": "

    \n"}, "opendal.layers.RetryLayer": {"fullname": "opendal.layers.RetryLayer", "modulename": "opendal.layers", "qualname": "RetryLayer", "kind": "class", "doc": "

    \n", "bases": "Layer"}, "opendal.layers.RetryLayer.__init__": {"fullname": "opendal.layers.RetryLayer.__init__", "modulename": "opendal.layers", "qualname": "RetryLayer.__init__", "kind": "function", "doc": "

    \n", "signature": "(\tmax_times: Optional[int] = None,\tfactor: Optional[float] = None,\tjitter: bool = False,\tmax_delay: Optional[float] = None,\tmin_delay: Optional[float] = None)"}, "opendal.exceptions": {"fullname": "opendal.exceptions", "modulename": "opendal.exceptions", "kind": "module", "doc": "

    \n"}, "opendal.exceptions.Error": {"fullname": "opendal.exceptions.Error", "modulename": "opendal.exceptions", "qualname": "Error", "kind": "class", "doc": "

    Base class for exceptions in this module.

    \n", "bases": "builtins.Exception"}, "opendal.exceptions.Unexpected": {"fullname": "opendal.exceptions.Unexpected", "modulename": "opendal.exceptions", "qualname": "Unexpected", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.UnexpectedError'>"}, "opendal.exceptions.Unsupported": {"fullname": "opendal.exceptions.Unsupported", "modulename": "opendal.exceptions", "qualname": "Unsupported", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.UnsupportedError'>"}, "opendal.exceptions.ConfigInvalid": {"fullname": "opendal.exceptions.ConfigInvalid", "modulename": "opendal.exceptions", "qualname": "ConfigInvalid", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.ConfigInvalidError'>"}, "opendal.exceptions.NotFound": {"fullname": "opendal.exceptions.NotFound", "modulename": "opendal.exceptions", "qualname": "NotFound", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.NotFoundError'>"}, "opendal.exceptions.PermissionDenied": {"fullname": "opendal.exceptions.PermissionDenied", "modulename": "opendal.exceptions", "qualname": "PermissionDenied", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.PermissionDeniedError'>"}, "opendal.exceptions.IsADirectory": {"fullname": "opendal.exceptions.IsADirectory", "modulename": "opendal.exceptions", "qualname": "IsADirectory", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.IsADirectoryError'>"}, "opendal.exceptions.NotADirectory": {"fullname": "opendal.exceptions.NotADirectory", "modulename": "opendal.exceptions", "qualname": "NotADirectory", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.NotADirectoryError'>"}, "opendal.exceptions.AlreadyExists": {"fullname": "opendal.exceptions.AlreadyExists", "modulename": "opendal.exceptions", "qualname": "AlreadyExists", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.AlreadyExistsError'>"}, "opendal.exceptions.IsSameFile": {"fullname": "opendal.exceptions.IsSameFile", "modulename": "opendal.exceptions", "qualname": "IsSameFile", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.IsSameFileError'>"}, "opendal.exceptions.ConditionNotMatch": {"fullname": "opendal.exceptions.ConditionNotMatch", "modulename": "opendal.exceptions", "qualname": "ConditionNotMatch", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.ConditionNotMatchError'>"}, "opendal.exceptions.ContentTruncated": {"fullname": "opendal.exceptions.ContentTruncated", "modulename": "opendal.exceptions", "qualname": "ContentTruncated", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.ContentTruncatedError'>"}, "opendal.exceptions.ContentIncomplete": {"fullname": "opendal.exceptions.ContentIncomplete", "modulename": "opendal.exceptions", "qualname": "ContentIncomplete", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.ContentIncompleteError'>"}, "opendal.exceptions.InvalidInput": {"fullname": "opendal.exceptions.InvalidInput", "modulename": "opendal.exceptions", "qualname": "InvalidInput", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.InvalidInputError'>"}}, "docInfo": {"opendal": {"qualname": 0, "fullname": 1, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 344}, "opendal.Operator": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 34}, "opendal.Operator.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 3}, "opendal.Operator.layer": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 8}, "opendal.Operator.open": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 39, "bases": 0, "doc": 12}, "opendal.Operator.read": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 9}, "opendal.Operator.write": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 157, "bases": 0, "doc": 8}, "opendal.Operator.stat": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 29, "bases": 0, "doc": 13}, "opendal.Operator.copy": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 7}, "opendal.Operator.rename": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 5}, "opendal.Operator.remove_all": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 5}, "opendal.Operator.create_dir": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 78}, "opendal.Operator.delete": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 24}, "opendal.Operator.list": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 7}, "opendal.Operator.scan": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 8}, "opendal.Operator.capability": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 19, "bases": 0, "doc": 3}, "opendal.Operator.to_async_operator": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 19, "bases": 0, "doc": 3}, "opendal.AsyncOperator": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 33}, "opendal.AsyncOperator.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 3}, "opendal.AsyncOperator.layer": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 8}, "opendal.AsyncOperator.open": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 39, "bases": 0, "doc": 12}, "opendal.AsyncOperator.read": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 9}, "opendal.AsyncOperator.write": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 157, "bases": 0, "doc": 8}, "opendal.AsyncOperator.stat": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 29, "bases": 0, "doc": 13}, "opendal.AsyncOperator.copy": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 7}, "opendal.AsyncOperator.rename": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 4}, "opendal.AsyncOperator.remove_all": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 5}, "opendal.AsyncOperator.create_dir": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 78}, "opendal.AsyncOperator.delete": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 24}, "opendal.AsyncOperator.list": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 7}, "opendal.AsyncOperator.scan": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 8}, "opendal.AsyncOperator.presign_stat": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 17}, "opendal.AsyncOperator.presign_read": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 16}, "opendal.AsyncOperator.presign_write": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 16}, "opendal.AsyncOperator.capability": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 19, "bases": 0, "doc": 3}, "opendal.AsyncOperator.to_operator": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 19, "bases": 0, "doc": 3}, "opendal.File": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 14}, "opendal.File.read": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 16}, "opendal.File.write": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 8}, "opendal.File.seek": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 41, "bases": 0, "doc": 111}, "opendal.File.tell": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 8}, "opendal.File.close": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 11, "bases": 0, "doc": 3}, "opendal.AsyncFile": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 16}, "opendal.AsyncFile.read": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 16}, "opendal.AsyncFile.write": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 8}, "opendal.AsyncFile.seek": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 41, "bases": 0, "doc": 111}, "opendal.AsyncFile.tell": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 8}, "opendal.AsyncFile.close": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 11, "bases": 0, "doc": 3}, "opendal.Entry": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.Entry.path": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 13}, "opendal.EntryMode": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.EntryMode.is_file": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 12}, "opendal.EntryMode.is_dir": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 12}, "opendal.Metadata": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.Metadata.content_disposition": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.Metadata.content_length": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Metadata.content_type": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Metadata.mode": {"qualname": 2, "fullname": 3, "annotation": 3, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.Metadata.etag": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Metadata.content_md5": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.PresignedRequest": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.PresignedRequest.method": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.PresignedRequest.url": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.PresignedRequest.headers": {"qualname": 2, "fullname": 3, "annotation": 3, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 15}, "opendal.Capability.list": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.batch": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.read_can_seek": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.create_dir": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Capability.list_with_limit": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.Capability.list_with_recursive": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.Capability.presign_stat": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Capability.write_multi_min_size": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 35}, "opendal.Capability.blocking": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.stat_with_if_match": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.read_with_override_content_disposition": {"qualname": 6, "fullname": 7, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.read_with_range": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.Capability.write_can_multi": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 13}, "opendal.Capability.read_with_if_none_match": {"qualname": 6, "fullname": 7, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.batch_delete": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Capability.write_multi_max_size": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 31}, "opendal.Capability.read": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.rename": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.stat": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.presign": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.write_with_cache_control": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.write": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.list_with_start_after": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.presign_write": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Capability.write_total_max_size": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 31}, "opendal.Capability.presign_read": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Capability.write_with_content_type": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.batch_max_operations": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.stat_with_if_none_match": {"qualname": 6, "fullname": 7, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.read_with_override_cache_control": {"qualname": 6, "fullname": 7, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.write_can_append": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.Capability.write_can_empty": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.write_with_content_disposition": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.copy": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.write_multi_align_size": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 32}, "opendal.Capability.read_with_if_match": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.delete": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.read_with_override_content_type": {"qualname": 6, "fullname": 7, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.read_can_next": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.layers": {"qualname": 0, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.layers.Layer": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.layers.RetryLayer": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 1, "doc": 3}, "opendal.layers.RetryLayer.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 121, "bases": 0, "doc": 3}, "opendal.exceptions": {"qualname": 0, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.Error": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 2, "doc": 10}, "opendal.exceptions.Unexpected": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.Unsupported": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.ConfigInvalid": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.NotFound": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.PermissionDenied": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.IsADirectory": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.NotADirectory": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.AlreadyExists": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.IsSameFile": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.ConditionNotMatch": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.ContentTruncated": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.ContentIncomplete": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.InvalidInput": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}}, "length": 123, "save": true}, "index": {"qualname": {"root": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 3, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.__init__": {"tf": 1}, "opendal.Operator.layer": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.Operator.capability": {"tf": 1}, "opendal.Operator.to_async_operator": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 17}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 1}}}}}}}, "n": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}}, "df": 2}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 3}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 1}}}}}}}}}}}, "s": {"docs": {"opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 2, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.exceptions.IsADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.IsSameFile": {"tf": 1}}, "df": 1}}}}}}}}}, "f": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}}, "df": 4}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.layers.Layer": {"tf": 1}}, "df": 3}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.list": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 6}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.list_with_limit": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Metadata.content_length": {"tf": 1}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 15}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}}, "df": 3}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 2}}}}, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.layers.RetryLayer": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 2}}}}}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_range": {"tf": 1}}, "df": 1}}}}}, "w": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 17}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 14}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}}, "df": 7}, "r": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "k": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}}, "df": 3}}}, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 4}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}}, "df": 3}}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 8, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.ContentTruncated": {"tf": 1}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.ContentIncomplete": {"tf": 1}}, "df": 1}}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 2}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.ConfigInvalid": {"tf": 1}}, "df": 1}}}}}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.exceptions.ConditionNotMatch": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 3}}}}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.capability": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 42}}}}}}}}, "n": {"docs": {"opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 5}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 2}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.close": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}}, "df": 2}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 2}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.AlreadyExists": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "s": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {"opendal.Operator.to_async_operator": {"tf": 1}}, "df": 1, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 19}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncFile": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}}, "df": 6}}}}}}}}, "f": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability.write_can_append": {"tf": 1}}, "df": 1}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 4}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}}, "df": 3}}}}}}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}}, "df": 4}}}}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {"opendal.Operator.to_async_operator": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 2, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}}, "df": 2}}}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.content_type": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}}, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}}, "df": 7, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.PresignedRequest": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 4}}}}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Entry.path": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.PermissionDenied": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.File.close": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}}, "df": 7}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Entry": {"tf": 1}, "opendal.Entry.path": {"tf": 1}}, "df": 2, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.EntryMode": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 3}}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Metadata.etag": {"tf": 1}}, "df": 1}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Capability.write_can_empty": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"opendal.Metadata": {"tf": 1}, "opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}}, "df": 7}}}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"opendal.PresignedRequest.method": {"tf": 1}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.mode": {"tf": 1}}, "df": 1}}}, "d": {"5": {"docs": {"opendal.Metadata.content_md5": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 4}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}}, "df": 4}}}, "x": {"docs": {"opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 3}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "l": {"docs": {"opendal.PresignedRequest.url": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}}, "df": 1}}}}}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.Unsupported": {"tf": 1}}, "df": 1}}}}}}}}}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"opendal.PresignedRequest.headers": {"tf": 1}}, "df": 1}}}}}}}, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.batch": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 3}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Capability.blocking": {"tf": 1}}, "df": 1}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}}, "df": 2}}, "t": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.NotFound": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.exceptions.NotADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.read_can_next": {"tf": 1}}, "df": 1}}}}}}, "fullname": {"root": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 3, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}}, "df": 2, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal": {"tf": 1}, "opendal.Operator": {"tf": 1}, "opendal.Operator.__init__": {"tf": 1}, "opendal.Operator.layer": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.Operator.capability": {"tf": 1}, "opendal.Operator.to_async_operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}, "opendal.File": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.File.close": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}, "opendal.Entry": {"tf": 1}, "opendal.Entry.path": {"tf": 1}, "opendal.EntryMode": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Metadata": {"tf": 1}, "opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.PresignedRequest": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.layers": {"tf": 1}, "opendal.layers.Layer": {"tf": 1}, "opendal.layers.RetryLayer": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}, "opendal.exceptions": {"tf": 1}, "opendal.exceptions.Error": {"tf": 1}, "opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 123}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.__init__": {"tf": 1}, "opendal.Operator.layer": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.Operator.capability": {"tf": 1}, "opendal.Operator.to_async_operator": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 17}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 1}}}}}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 3}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 1}}}}}}}}}}}, "s": {"docs": {"opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 2, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.exceptions.IsADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.IsSameFile": {"tf": 1}}, "df": 1}}}}}}}}}, "f": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}}, "df": 4}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.layers.Layer": {"tf": 1}}, "df": 3, "s": {"docs": {"opendal.layers": {"tf": 1}, "opendal.layers.Layer": {"tf": 1}, "opendal.layers.RetryLayer": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 4}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.list": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 6}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.list_with_limit": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Metadata.content_length": {"tf": 1}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 15}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}}, "df": 3}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 2}}}}, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.layers.RetryLayer": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 2}}}}}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_range": {"tf": 1}}, "df": 1}}}}}, "w": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 17}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 14}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}}, "df": 7}, "r": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "k": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}}, "df": 3}}}, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 4}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}}, "df": 3}}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 8, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.ContentTruncated": {"tf": 1}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.ContentIncomplete": {"tf": 1}}, "df": 1}}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 2}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.ConfigInvalid": {"tf": 1}}, "df": 1}}}}}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.exceptions.ConditionNotMatch": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 3}}}}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.capability": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 42}}}}}}}}, "n": {"docs": {"opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 5}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 2}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.close": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}}, "df": 2}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 2}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.AlreadyExists": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "s": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {"opendal.Operator.to_async_operator": {"tf": 1}}, "df": 1, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 19}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncFile": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}}, "df": 6}}}}}}}}, "f": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability.write_can_append": {"tf": 1}}, "df": 1}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 4}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}}, "df": 3}}}}}}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}}, "df": 4}}}}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {"opendal.Operator.to_async_operator": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 2, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}}, "df": 2}}}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.content_type": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}}, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}}, "df": 7, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.PresignedRequest": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 4}}}}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Entry.path": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.PermissionDenied": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.File.close": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}}, "df": 7}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Entry": {"tf": 1}, "opendal.Entry.path": {"tf": 1}}, "df": 2, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.EntryMode": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 3}}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Metadata.etag": {"tf": 1}}, "df": 1}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Capability.write_can_empty": {"tf": 1}}, "df": 1}}}}, "x": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions": {"tf": 1}, "opendal.exceptions.Error": {"tf": 1}, "opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 15}}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"opendal.Metadata": {"tf": 1}, "opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}}, "df": 7}}}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"opendal.PresignedRequest.method": {"tf": 1}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.mode": {"tf": 1}}, "df": 1}}}, "d": {"5": {"docs": {"opendal.Metadata.content_md5": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 4}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}}, "df": 4}}}, "x": {"docs": {"opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 3}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "l": {"docs": {"opendal.PresignedRequest.url": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}}, "df": 1}}}}}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.Unsupported": {"tf": 1}}, "df": 1}}}}}}}}}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"opendal.PresignedRequest.headers": {"tf": 1}}, "df": 1}}}}}}}, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.batch": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 3}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Capability.blocking": {"tf": 1}}, "df": 1}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}}, "df": 2}}, "t": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.NotFound": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.exceptions.NotADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.read_can_next": {"tf": 1}}, "df": 1}}}}}}, "annotation": {"root": {"docs": {"opendal.Entry.path": {"tf": 1}, "opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 49, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Entry.path": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 4}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "[": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}}, "df": 4}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 5}}}}}}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Metadata.mode": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Metadata.content_length": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.mode": {"tf": 1}}, "df": 1}}}}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "[": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"opendal.PresignedRequest.headers": {"tf": 1}}, "df": 1}}}}}}}}, "b": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.list": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 34}}}}}}, "default_value": {"root": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1.4142135623730951}, "opendal.exceptions.Unsupported": {"tf": 1.4142135623730951}, "opendal.exceptions.ConfigInvalid": {"tf": 1.4142135623730951}, "opendal.exceptions.NotFound": {"tf": 1.4142135623730951}, "opendal.exceptions.PermissionDenied": {"tf": 1.4142135623730951}, "opendal.exceptions.IsADirectory": {"tf": 1.4142135623730951}, "opendal.exceptions.NotADirectory": {"tf": 1.4142135623730951}, "opendal.exceptions.AlreadyExists": {"tf": 1.4142135623730951}, "opendal.exceptions.IsSameFile": {"tf": 1.4142135623730951}, "opendal.exceptions.ConditionNotMatch": {"tf": 1.4142135623730951}, "opendal.exceptions.ContentTruncated": {"tf": 1.4142135623730951}, "opendal.exceptions.ContentIncomplete": {"tf": 1.4142135623730951}, "opendal.exceptions.InvalidInput": {"tf": 1.4142135623730951}}, "df": 13, "l": {"docs": {}, "df": 0, "t": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 13}}, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 13}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.ConfigInvalid": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.ConditionNotMatch": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.ContentTruncated": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.ContentIncomplete": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}}}}}, "x": {"2": {"7": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1.4142135623730951}, "opendal.exceptions.Unsupported": {"tf": 1.4142135623730951}, "opendal.exceptions.ConfigInvalid": {"tf": 1.4142135623730951}, "opendal.exceptions.NotFound": {"tf": 1.4142135623730951}, "opendal.exceptions.PermissionDenied": {"tf": 1.4142135623730951}, "opendal.exceptions.IsADirectory": {"tf": 1.4142135623730951}, "opendal.exceptions.NotADirectory": {"tf": 1.4142135623730951}, "opendal.exceptions.AlreadyExists": {"tf": 1.4142135623730951}, "opendal.exceptions.IsSameFile": {"tf": 1.4142135623730951}, "opendal.exceptions.ConditionNotMatch": {"tf": 1.4142135623730951}, "opendal.exceptions.ContentTruncated": {"tf": 1.4142135623730951}, "opendal.exceptions.ContentIncomplete": {"tf": 1.4142135623730951}, "opendal.exceptions.InvalidInput": {"tf": 1.4142135623730951}}, "df": 13}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 13}}}}}}}, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}}, "df": 1}}}}}}}}}}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.Unsupported": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "g": {"docs": {}, "df": 0, "t": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 13}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.NotFound": {"tf": 1}}, "df": 1}}}}}}}}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.NotADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.PermissionDenied": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.IsADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.IsSameFile": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}, "n": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.AlreadyExists": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}}}, "signature": {"root": {"0": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}, "docs": {"opendal.Operator.__init__": {"tf": 4.242640687119285}, "opendal.Operator.layer": {"tf": 5.0990195135927845}, "opendal.Operator.open": {"tf": 5.656854249492381}, "opendal.Operator.read": {"tf": 4.47213595499958}, "opendal.Operator.write": {"tf": 11.357816691600547}, "opendal.Operator.stat": {"tf": 4.898979485566356}, "opendal.Operator.copy": {"tf": 5.0990195135927845}, "opendal.Operator.rename": {"tf": 5.0990195135927845}, "opendal.Operator.remove_all": {"tf": 4.242640687119285}, "opendal.Operator.create_dir": {"tf": 4.242640687119285}, "opendal.Operator.delete": {"tf": 4.242640687119285}, "opendal.Operator.list": {"tf": 5.385164807134504}, "opendal.Operator.scan": {"tf": 5.385164807134504}, "opendal.Operator.capability": {"tf": 4}, "opendal.Operator.to_async_operator": {"tf": 4}, "opendal.AsyncOperator.__init__": {"tf": 4.242640687119285}, "opendal.AsyncOperator.layer": {"tf": 5.0990195135927845}, "opendal.AsyncOperator.open": {"tf": 5.656854249492381}, "opendal.AsyncOperator.read": {"tf": 4.47213595499958}, "opendal.AsyncOperator.write": {"tf": 11.357816691600547}, "opendal.AsyncOperator.stat": {"tf": 4.898979485566356}, "opendal.AsyncOperator.copy": {"tf": 5.0990195135927845}, "opendal.AsyncOperator.rename": {"tf": 5.0990195135927845}, "opendal.AsyncOperator.remove_all": {"tf": 4.242640687119285}, "opendal.AsyncOperator.create_dir": {"tf": 4.242640687119285}, "opendal.AsyncOperator.delete": {"tf": 4.242640687119285}, "opendal.AsyncOperator.list": {"tf": 5.385164807134504}, "opendal.AsyncOperator.scan": {"tf": 5.385164807134504}, "opendal.AsyncOperator.presign_stat": {"tf": 5.656854249492381}, "opendal.AsyncOperator.presign_read": {"tf": 5.656854249492381}, "opendal.AsyncOperator.presign_write": {"tf": 5.656854249492381}, "opendal.AsyncOperator.capability": {"tf": 4}, "opendal.AsyncOperator.to_operator": {"tf": 4}, "opendal.File.read": {"tf": 5.5677643628300215}, "opendal.File.write": {"tf": 4.242640687119285}, "opendal.File.seek": {"tf": 5.830951894845301}, "opendal.File.tell": {"tf": 3.4641016151377544}, "opendal.File.close": {"tf": 3.1622776601683795}, "opendal.AsyncFile.read": {"tf": 5.5677643628300215}, "opendal.AsyncFile.write": {"tf": 4.242640687119285}, "opendal.AsyncFile.seek": {"tf": 5.830951894845301}, "opendal.AsyncFile.tell": {"tf": 3.4641016151377544}, "opendal.AsyncFile.close": {"tf": 3.1622776601683795}, "opendal.EntryMode.is_file": {"tf": 3.4641016151377544}, "opendal.EntryMode.is_dir": {"tf": 3.4641016151377544}, "opendal.layers.RetryLayer.__init__": {"tf": 9.9498743710662}}, "df": 46, "s": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}}, "df": 2}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.Operator.open": {"tf": 1.4142135623730951}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 2}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.copy": {"tf": 1.4142135623730951}, "opendal.Operator.rename": {"tf": 1.4142135623730951}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 2}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.rename": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 27}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "f": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.Operator.capability": {"tf": 1}, "opendal.Operator.to_async_operator": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.File.close": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 43}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}}}, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}}, "df": 4}}}}}, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 2}}}}, "k": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}}, "df": 2}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.layer": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.layer": {"tf": 1.4142135623730951}}, "df": 2, "s": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}}, "df": 2}}}}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.Operator.capability": {"tf": 1}, "opendal.Operator.to_async_operator": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 17}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.write": {"tf": 2.23606797749979}, "opendal.AsyncOperator.write": {"tf": 2.23606797749979}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 2}}, "df": 5}}}}}}}, "f": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 21}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}}}}}}}}}}}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "w": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 4}}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}}, "df": 2}}}}}}}, "a": {"docs": {}, "df": 0, "x": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1.4142135623730951}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 1}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.open": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 1}}}}, "l": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 1}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1.7320508075688772}}, "df": 1}}}}}, "b": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}}, "df": 4}, "y": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}}, "df": 4}}}}, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 5}}}, "u": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}}}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}}}, "s": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.to_async_operator": {"tf": 1}}, "df": 1}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncOperator.open": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 2}}}}}}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.write": {"tf": 2.23606797749979}, "opendal.AsyncOperator.write": {"tf": 2.23606797749979}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 2}}, "df": 5}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.seek": {"tf": 1.7320508075688772}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1.7320508075688772}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 12}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}}, "df": 2}}}}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.write": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.write": {"tf": 1.4142135623730951}}, "df": 2}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.capability": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}}, "df": 2}}}}}}}}}}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}}, "df": 4}}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}}}}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 4}}}}, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}}}}, "w": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}, "j": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "bases": {"root": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.layers.RetryLayer": {"tf": 1}}, "df": 1}}}}}, "b": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}}}}}}}, "doc": {"root": {"0": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}, "1": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2, "m": {"docs": {}, "df": 0, "b": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 1}}}, "2": {"5": {"6": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}}}}, "docs": {}, "df": 0}, "docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}, "5": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {"opendal.Capability.write_multi_max_size": {"tf": 1}}, "df": 1}}}}, "docs": {"opendal": {"tf": 15.905973720586866}, "opendal.Operator": {"tf": 3.605551275463989}, "opendal.Operator.__init__": {"tf": 1.7320508075688772}, "opendal.Operator.layer": {"tf": 1.4142135623730951}, "opendal.Operator.open": {"tf": 1.7320508075688772}, "opendal.Operator.read": {"tf": 1.7320508075688772}, "opendal.Operator.write": {"tf": 1.7320508075688772}, "opendal.Operator.stat": {"tf": 2.23606797749979}, "opendal.Operator.copy": {"tf": 1.7320508075688772}, "opendal.Operator.rename": {"tf": 1.7320508075688772}, "opendal.Operator.remove_all": {"tf": 1.4142135623730951}, "opendal.Operator.create_dir": {"tf": 4.898979485566356}, "opendal.Operator.delete": {"tf": 3.4641016151377544}, "opendal.Operator.list": {"tf": 1.7320508075688772}, "opendal.Operator.scan": {"tf": 1.7320508075688772}, "opendal.Operator.capability": {"tf": 1.7320508075688772}, "opendal.Operator.to_async_operator": {"tf": 1.7320508075688772}, "opendal.AsyncOperator": {"tf": 3.605551275463989}, "opendal.AsyncOperator.__init__": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.layer": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.open": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.read": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.write": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.stat": {"tf": 2.23606797749979}, "opendal.AsyncOperator.copy": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.rename": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.remove_all": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.create_dir": {"tf": 4.898979485566356}, "opendal.AsyncOperator.delete": {"tf": 3.4641016151377544}, "opendal.AsyncOperator.list": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.scan": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.presign_stat": {"tf": 2.23606797749979}, "opendal.AsyncOperator.presign_read": {"tf": 2.23606797749979}, "opendal.AsyncOperator.presign_write": {"tf": 2.23606797749979}, "opendal.AsyncOperator.capability": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.to_operator": {"tf": 1.7320508075688772}, "opendal.File": {"tf": 1.7320508075688772}, "opendal.File.read": {"tf": 1.7320508075688772}, "opendal.File.write": {"tf": 1.7320508075688772}, "opendal.File.seek": {"tf": 6}, "opendal.File.tell": {"tf": 1.7320508075688772}, "opendal.File.close": {"tf": 1.7320508075688772}, "opendal.AsyncFile": {"tf": 1.7320508075688772}, "opendal.AsyncFile.read": {"tf": 1.7320508075688772}, "opendal.AsyncFile.write": {"tf": 1.7320508075688772}, "opendal.AsyncFile.seek": {"tf": 6}, "opendal.AsyncFile.tell": {"tf": 1.7320508075688772}, "opendal.AsyncFile.close": {"tf": 1.7320508075688772}, "opendal.Entry": {"tf": 1.7320508075688772}, "opendal.Entry.path": {"tf": 1.7320508075688772}, "opendal.EntryMode": {"tf": 1.7320508075688772}, "opendal.EntryMode.is_file": {"tf": 2.23606797749979}, "opendal.EntryMode.is_dir": {"tf": 2.23606797749979}, "opendal.Metadata": {"tf": 1.7320508075688772}, "opendal.Metadata.content_disposition": {"tf": 1.7320508075688772}, "opendal.Metadata.content_length": {"tf": 1.7320508075688772}, "opendal.Metadata.content_type": {"tf": 1.7320508075688772}, "opendal.Metadata.mode": {"tf": 1.7320508075688772}, "opendal.Metadata.etag": {"tf": 1.7320508075688772}, "opendal.Metadata.content_md5": {"tf": 1.7320508075688772}, "opendal.PresignedRequest": {"tf": 1.7320508075688772}, "opendal.PresignedRequest.method": {"tf": 1.7320508075688772}, "opendal.PresignedRequest.url": {"tf": 1.7320508075688772}, "opendal.PresignedRequest.headers": {"tf": 1.7320508075688772}, "opendal.Capability": {"tf": 1.7320508075688772}, "opendal.Capability.list": {"tf": 1.7320508075688772}, "opendal.Capability.batch": {"tf": 1.7320508075688772}, "opendal.Capability.read_can_seek": {"tf": 1.7320508075688772}, "opendal.Capability.create_dir": {"tf": 1.7320508075688772}, "opendal.Capability.list_with_limit": {"tf": 1.7320508075688772}, "opendal.Capability.list_with_recursive": {"tf": 1.7320508075688772}, "opendal.Capability.presign_stat": {"tf": 1.7320508075688772}, "opendal.Capability.write_multi_min_size": {"tf": 2.449489742783178}, "opendal.Capability.blocking": {"tf": 1.7320508075688772}, "opendal.Capability.stat_with_if_match": {"tf": 1.7320508075688772}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1.7320508075688772}, "opendal.Capability.read_with_range": {"tf": 1.7320508075688772}, "opendal.Capability.write_can_multi": {"tf": 1.7320508075688772}, "opendal.Capability.read_with_if_none_match": {"tf": 1.7320508075688772}, "opendal.Capability.batch_delete": {"tf": 1.7320508075688772}, "opendal.Capability.write_multi_max_size": {"tf": 2.449489742783178}, "opendal.Capability.read": {"tf": 1.7320508075688772}, "opendal.Capability.rename": {"tf": 1.7320508075688772}, "opendal.Capability.stat": {"tf": 1.7320508075688772}, "opendal.Capability.presign": {"tf": 1.7320508075688772}, "opendal.Capability.write_with_cache_control": {"tf": 1.7320508075688772}, "opendal.Capability.write": {"tf": 1.7320508075688772}, "opendal.Capability.list_with_start_after": {"tf": 1.7320508075688772}, "opendal.Capability.presign_write": {"tf": 1.7320508075688772}, "opendal.Capability.write_total_max_size": {"tf": 2.449489742783178}, "opendal.Capability.presign_read": {"tf": 1.7320508075688772}, "opendal.Capability.write_with_content_type": {"tf": 1.7320508075688772}, "opendal.Capability.batch_max_operations": {"tf": 1.7320508075688772}, "opendal.Capability.stat_with_if_none_match": {"tf": 1.7320508075688772}, "opendal.Capability.read_with_override_cache_control": {"tf": 1.7320508075688772}, "opendal.Capability.write_can_append": {"tf": 1.7320508075688772}, "opendal.Capability.write_can_empty": {"tf": 1.7320508075688772}, "opendal.Capability.write_with_content_disposition": {"tf": 1.7320508075688772}, "opendal.Capability.copy": {"tf": 1.7320508075688772}, "opendal.Capability.write_multi_align_size": {"tf": 2.449489742783178}, "opendal.Capability.read_with_if_match": {"tf": 1.7320508075688772}, "opendal.Capability.delete": {"tf": 1.7320508075688772}, "opendal.Capability.read_with_override_content_type": {"tf": 1.7320508075688772}, "opendal.Capability.read_can_next": {"tf": 1.7320508075688772}, "opendal.layers": {"tf": 1.7320508075688772}, "opendal.layers.Layer": {"tf": 1.7320508075688772}, "opendal.layers.RetryLayer": {"tf": 1.7320508075688772}, "opendal.layers.RetryLayer.__init__": {"tf": 1.7320508075688772}, "opendal.exceptions": {"tf": 1.7320508075688772}, "opendal.exceptions.Error": {"tf": 1.7320508075688772}, "opendal.exceptions.Unexpected": {"tf": 1.7320508075688772}, "opendal.exceptions.Unsupported": {"tf": 1.7320508075688772}, "opendal.exceptions.ConfigInvalid": {"tf": 1.7320508075688772}, "opendal.exceptions.NotFound": {"tf": 1.7320508075688772}, "opendal.exceptions.PermissionDenied": {"tf": 1.7320508075688772}, "opendal.exceptions.IsADirectory": {"tf": 1.7320508075688772}, "opendal.exceptions.NotADirectory": {"tf": 1.7320508075688772}, "opendal.exceptions.AlreadyExists": {"tf": 1.7320508075688772}, "opendal.exceptions.IsSameFile": {"tf": 1.7320508075688772}, "opendal.exceptions.ConditionNotMatch": {"tf": 1.7320508075688772}, "opendal.exceptions.ContentTruncated": {"tf": 1.7320508075688772}, "opendal.exceptions.ContentIncomplete": {"tf": 1.7320508075688772}, "opendal.exceptions.InvalidInput": {"tf": 1.7320508075688772}}, "df": 123, "a": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 2}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 2}, "opendal.File": {"tf": 1.4142135623730951}, "opendal.AsyncFile": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 10, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {"opendal": {"tf": 1}}, "df": 1, "s": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}}, "df": 2}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability.write_can_append": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {"opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 4, "y": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {"opendal": {"tf": 1.4142135623730951}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncFile": {"tf": 1.4142135623730951}}, "df": 3, "i": {"docs": {}, "df": 0, "o": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1.4142135623730951}}, "df": 2}}}}}}}}}}}}, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}}, "s": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}}, "df": 2}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 4}, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1.7320508075688772}}, "df": 1}}}}, "n": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}}, "df": 4, "d": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 4}}, "d": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}}, "df": 2}}, "t": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 3}, "f": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 4}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Capability": {"tf": 1}}, "df": 3}}, "b": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {"opendal": {"tf": 2.6457513110645907}}, "df": 1, "e": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}}, "df": 2, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal": {"tf": 2.23606797749979}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 3}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal": {"tf": 1}, "opendal.Operator": {"tf": 1.4142135623730951}, "opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.Entry.path": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 38}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3, "s": {"docs": {"opendal.Capability": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 2}}}}}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}}, "df": 2}}}}}}, "r": {"docs": {"opendal": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.seek": {"tf": 2}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 2}}, "df": 5}, "n": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 4, "e": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}, "b": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File": {"tf": 1}}, "df": 1}}}}}, "f": {"docs": {"opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}, "opendal.Entry.path": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 10, "f": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File.seek": {"tf": 2.23606797749979}, "opendal.AsyncFile.seek": {"tf": 2.23606797749979}}, "df": 2}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}}}}}}, "p": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2, "y": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "p": {"docs": {"opendal": {"tf": 1}}, "df": 1}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1.7320508075688772}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}}, "df": 7}}}}}}, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}}, "df": 2}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1.7320508075688772}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.Entry.path": {"tf": 1.4142135623730951}}, "df": 15}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.File.seek": {"tf": 2}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 2}, "opendal.AsyncFile.tell": {"tf": 1}}, "df": 4}}, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}}}, "b": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Operator": {"tf": 1.4142135623730951}, "opendal.Capability.blocking": {"tf": 1}}, "df": 2}}}}}}}, "y": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}}, "df": 6, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2, "s": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}}, "df": 8}}}}, "e": {"docs": {"opendal.File": {"tf": 1}, "opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}, "opendal.Capability.write_can_multi": {"tf": 1}}, "df": 5, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.batch": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 3}}}, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 3}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.create_dir": {"tf": 1.4142135623730951}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1.4142135623730951}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1.4142135623730951}, "opendal.Capability.write_total_max_size": {"tf": 1.4142135623730951}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1.4142135623730951}, "opendal.exceptions.Error": {"tf": 1}}, "df": 11, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}}}}}}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}}, "df": 6}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2, "d": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}}, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "s": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1.7320508075688772}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.7320508075688772}, "opendal.File.read": {"tf": 1}, "opendal.File.seek": {"tf": 1.7320508075688772}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1.7320508075688772}, "opendal.Entry.path": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 16}, "t": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}, "f": {"docs": {"opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1.4142135623730951}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1.4142135623730951}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1.4142135623730951}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1.4142135623730951}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 38}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.Capability": {"tf": 1}}, "df": 3}}, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}}, "df": 2}}}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {"opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 2}}}}, "r": {"docs": {}, "df": 0, "l": {"docs": {"opendal.PresignedRequest.url": {"tf": 1}}, "df": 1}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 4.69041575982343}}, "df": 1}}}}, "f": {"docs": {}, "df": 0, "s": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.exceptions.Error": {"tf": 1}}, "df": 14}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.File": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}}, "df": 9, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}}, "df": 2}}}}}}}, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 2}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1.4142135623730951}, "opendal.Entry.path": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"opendal": {"tf": 1.4142135623730951}, "opendal.Operator.read": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 14, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 5}}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}}, "df": 3}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 2}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 11, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}, "s": {"docs": {"opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 2}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 2}}}}}}}, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Entry.path": {"tf": 1}}, "df": 3}}}}}}, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Metadata.mode": {"tf": 1}}, "df": 1}}}}}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 3}}}, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 2}, "d": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}}}}}}}, "u": {"docs": {}, "df": 0, "n": {"docs": {"opendal": {"tf": 1}}, "df": 1}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_range": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 2, "m": {"docs": {}, "df": 0, "p": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 2.23606797749979}}, "df": 1}}}, "x": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 2.23606797749979}}, "df": 1}}, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal": {"tf": 1}, "opendal.Operator": {"tf": 1.4142135623730951}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.File.seek": {"tf": 2.8284271247461903}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 2.8284271247461903}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1.4142135623730951}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 23}, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 7}}, "i": {"docs": {}, "df": 0, "s": {"docs": {"opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}, "opendal.exceptions.Error": {"tf": 1}}, "df": 11}}}, "o": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.7320508075688772}, "opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}, "opendal.Entry.path": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 9, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1.7320508075688772}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}}, "df": 2}}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}, "u": {"docs": {}, "df": 0, "e": {"docs": {"opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 2}}}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.content_type": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Capability.write_can_multi": {"tf": 1}}, "df": 1}}}}}, "w": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal": {"tf": 1.4142135623730951}, "opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1.7320508075688772}}, "df": 18}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}, "k": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}, "n": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 2}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 16, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 3}}}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}}, "df": 2}}}, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1.7320508075688772}, "opendal.AsyncFile.seek": {"tf": 1.7320508075688772}}, "df": 2}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 2}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"opendal.PresignedRequest.headers": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "p": {"docs": {"opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 2}}}}, "s": {"3": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}}, "df": 2}, "docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.Entry.path": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}}, "df": 4, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}}, "df": 6}, "r": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 3}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {"opendal.File.seek": {"tf": 2}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 2}, "opendal.AsyncFile.tell": {"tf": 1}}, "df": 4}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}}, "df": 2}}}}}, "o": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}}, "df": 2}}}}}, "u": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 3, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability": {"tf": 1}}, "df": 1}}, "s": {"docs": {"opendal.Capability.list": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}}, "df": 37}}}}}}}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3, "s": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}}}, "e": {"docs": {}, "df": 0, "k": {"docs": {"opendal.File.seek": {"tf": 2}, "opendal.AsyncFile.seek": {"tf": 2}, "opendal.Capability.read_can_seek": {"tf": 1}}, "df": 3}}, "t": {"docs": {"opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}}, "df": 2}, "r": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 4}}}}}}}, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.read": {"tf": 1.4142135623730951}, "opendal.AsyncFile.read": {"tf": 1.4142135623730951}, "opendal.Capability.write_multi_min_size": {"tf": 1.4142135623730951}, "opendal.Capability.write_multi_max_size": {"tf": 1.4142135623730951}, "opendal.Capability.write_total_max_size": {"tf": 1.4142135623730951}, "opendal.Capability.write_multi_align_size": {"tf": 1.7320508075688772}}, "df": 6}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 9}}, "x": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}}, "df": 2}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 2}}}}}, "p": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}}, "df": 3}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1.7320508075688772}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.7320508075688772}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 5}}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.Capability": {"tf": 1}}, "df": 9}}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 4}}}, "n": {"docs": {"opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}}, "df": 3}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Capability": {"tf": 1}}, "df": 1}}}}}}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability.write_can_multi": {"tf": 1}}, "df": 1}}}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 1}}}}}}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}}, "df": 2}}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}}, "df": 2}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}}, "i": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}}, "df": 6}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 8}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.list_with_limit": {"tf": 1}}, "df": 1}}}}}, "d": {"1": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {"opendal": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}}, "df": 2}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.delete": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.delete": {"tf": 1.4142135623730951}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}}, "df": 4}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1.7320508075688772}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 7, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}}, "df": 2}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 3}}}}}}}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}}, "df": 2}}}}}}}}}}, "o": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}, "y": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 4}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}}, "df": 2}}}}}, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}}, "df": 4}}}, "x": {"docs": {"opendal.Capability.write_multi_max_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_total_max_size": {"tf": 1.7320508075688772}, "opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 3}}, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}}, "df": 2}}}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"opendal.PresignedRequest.method": {"tf": 1}}, "df": 1}}}}}, "k": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.mode": {"tf": 1.4142135623730951}}, "df": 1}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}, "d": {"5": {"docs": {"opendal.Metadata.content_md5": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_multi_align_size": {"tf": 1.7320508075688772}}, "df": 4}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1.4142135623730951}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.Entry.path": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}}, "df": 8}}}, "d": {"docs": {"opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}}, "df": 2}}, "x": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 6}}}}}}, "p": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3, "s": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 4}}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 4, "s": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 2}}}}}, "o": {"docs": {}, "df": 0, "f": {"docs": {"opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 2}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Metadata.etag": {"tf": 1}}, "df": 1}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Capability.write_can_empty": {"tf": 1}}, "df": 1}}}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "w": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 6}, "g": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}}, "df": 2}}}}}}, "x": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.read_can_next": {"tf": 1}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 4, "e": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 4}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}}}}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}}, "df": 2}}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 14}}}}, "e": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}}, "df": 2}}, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}}}}}, "c": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}}}, "k": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}}, "df": 2}}}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2, "s": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}, "z": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}}, "pipeline": ["trimmer"], "_isPrebuiltIndex": true}; + /** pdoc search index */const docs = {"version": "0.9.5", "fields": ["qualname", "fullname", "annotation", "default_value", "signature", "bases", "doc"], "ref": "fullname", "documentStore": {"docs": {"opendal": {"fullname": "opendal", "modulename": "opendal", "kind": "module", "doc": "

    Apache OpenDAL\u2122 Python binding

    \n\n

    Installation

    \n\n
    \n
    pip install opendal\n
    \n
    \n\n

    Usage

    \n\n
    \n
    import opendal\n\nop = opendal.Operator("fs", root="/tmp")\nop.write("test.txt", b"Hello World")\nprint(op.read("test.txt"))\nprint(op.stat("test.txt").content_length)\n
    \n
    \n\n

    Or using the async API:

    \n\n
    \n
    import asyncio\n\nasync def main():\nop = opendal.AsyncOperator("fs", root="/tmp")\nawait op.write("test.txt", b"Hello World")\nprint(await op.read("test.txt"))\n\nasyncio.run(main())\n
    \n
    \n"}, "opendal.Operator": {"fullname": "opendal.Operator", "modulename": "opendal", "qualname": "Operator", "kind": "class", "doc": "

    Operator is the entry for all public blocking APIs

    \n\n

    Create a new blocking Operator with the given scheme and options(**kwargs).

    \n"}, "opendal.Operator.__init__": {"fullname": "opendal.Operator.__init__", "modulename": "opendal", "qualname": "Operator.__init__", "kind": "function", "doc": "

    \n", "signature": "(scheme: str, **kwargs)"}, "opendal.Operator.layer": {"fullname": "opendal.Operator.layer", "modulename": "opendal", "qualname": "Operator.layer", "kind": "function", "doc": "

    Add new layers upon existing operator

    \n", "signature": "(self, layer: opendal.layers.Layer):", "funcdef": "def"}, "opendal.Operator.open": {"fullname": "opendal.Operator.open", "modulename": "opendal", "qualname": "Operator.open", "kind": "function", "doc": "

    Open a file-like reader for the given path.

    \n", "signature": "(self, path: str, mode: str) -> opendal.File:", "funcdef": "def"}, "opendal.Operator.read": {"fullname": "opendal.Operator.read", "modulename": "opendal", "qualname": "Operator.read", "kind": "function", "doc": "

    Read the whole path into bytes.

    \n", "signature": "(self, path: str) -> memoryview:", "funcdef": "def"}, "opendal.Operator.write": {"fullname": "opendal.Operator.write", "modulename": "opendal", "qualname": "Operator.write", "kind": "function", "doc": "

    Write bytes into given path.

    \n", "signature": "(\tself,\tpath: str,\tbs: bytes,\tappend: Optional[bool] = None,\tbuffer: Optional[int] = None,\tcontent_type: Optional[str] = None,\tcontent_disposition: Optional[str] = None,\tcache_control: Optional[str] = None):", "funcdef": "def"}, "opendal.Operator.stat": {"fullname": "opendal.Operator.stat", "modulename": "opendal", "qualname": "Operator.stat", "kind": "function", "doc": "

    Get current path's metadata without cache directly.

    \n", "signature": "(self, path: str) -> opendal.Metadata:", "funcdef": "def"}, "opendal.Operator.copy": {"fullname": "opendal.Operator.copy", "modulename": "opendal", "qualname": "Operator.copy", "kind": "function", "doc": "

    Copy source to target.

    \n", "signature": "(self, source: str, target: str):", "funcdef": "def"}, "opendal.Operator.rename": {"fullname": "opendal.Operator.rename", "modulename": "opendal", "qualname": "Operator.rename", "kind": "function", "doc": "

    Rename filename.

    \n", "signature": "(self, source: str, target: str):", "funcdef": "def"}, "opendal.Operator.remove_all": {"fullname": "opendal.Operator.remove_all", "modulename": "opendal", "qualname": "Operator.remove_all", "kind": "function", "doc": "

    Remove all file

    \n", "signature": "(self, path: str):", "funcdef": "def"}, "opendal.Operator.create_dir": {"fullname": "opendal.Operator.create_dir", "modulename": "opendal", "qualname": "Operator.create_dir", "kind": "function", "doc": "

    Create a dir at given path.

    \n\n

    Notes

    \n\n

    To indicate that a path is a directory, it is compulsory to include\na trailing / in the path. Failure to do so may result in\nNotADirectory error being returned by OpenDAL.

    \n\n

    Behavior

    \n\n
      \n
    • Create on existing dir will succeed.
    • \n
    • Create dir is always recursive, works like mkdir -p
    • \n
    \n", "signature": "(self, path: str):", "funcdef": "def"}, "opendal.Operator.delete": {"fullname": "opendal.Operator.delete", "modulename": "opendal", "qualname": "Operator.delete", "kind": "function", "doc": "

    Delete given path.

    \n\n

    Notes

    \n\n
      \n
    • Delete not existing error won't return errors.
    • \n
    \n", "signature": "(self, path: str):", "funcdef": "def"}, "opendal.Operator.list": {"fullname": "opendal.Operator.list", "modulename": "opendal", "qualname": "Operator.list", "kind": "function", "doc": "

    List current dir path.

    \n", "signature": "(self, path: str) -> Iterable[opendal.Entry]:", "funcdef": "def"}, "opendal.Operator.scan": {"fullname": "opendal.Operator.scan", "modulename": "opendal", "qualname": "Operator.scan", "kind": "function", "doc": "

    List dir in flat way.

    \n", "signature": "(self, path: str) -> Iterable[opendal.Entry]:", "funcdef": "def"}, "opendal.Operator.capability": {"fullname": "opendal.Operator.capability", "modulename": "opendal", "qualname": "Operator.capability", "kind": "function", "doc": "

    \n", "signature": "(self) -> opendal.Capability:", "funcdef": "def"}, "opendal.Operator.to_async_operator": {"fullname": "opendal.Operator.to_async_operator", "modulename": "opendal", "qualname": "Operator.to_async_operator", "kind": "function", "doc": "

    \n", "signature": "(self) -> opendal.AsyncOperator:", "funcdef": "def"}, "opendal.AsyncOperator": {"fullname": "opendal.AsyncOperator", "modulename": "opendal", "qualname": "AsyncOperator", "kind": "class", "doc": "

    AsyncOperator is the entry for all public async APIs

    \n\n

    Create a new AsyncOperator with the given scheme and options(**kwargs).

    \n"}, "opendal.AsyncOperator.__init__": {"fullname": "opendal.AsyncOperator.__init__", "modulename": "opendal", "qualname": "AsyncOperator.__init__", "kind": "function", "doc": "

    \n", "signature": "(scheme: str, **kwargs)"}, "opendal.AsyncOperator.layer": {"fullname": "opendal.AsyncOperator.layer", "modulename": "opendal", "qualname": "AsyncOperator.layer", "kind": "function", "doc": "

    Add new layers upon existing operator

    \n", "signature": "(self, layer: opendal.layers.Layer):", "funcdef": "def"}, "opendal.AsyncOperator.open": {"fullname": "opendal.AsyncOperator.open", "modulename": "opendal", "qualname": "AsyncOperator.open", "kind": "function", "doc": "

    Open a file-like reader for the given path.

    \n", "signature": "(self, path: str, mode: str) -> opendal.AsyncFile:", "funcdef": "async def"}, "opendal.AsyncOperator.read": {"fullname": "opendal.AsyncOperator.read", "modulename": "opendal", "qualname": "AsyncOperator.read", "kind": "function", "doc": "

    Read the whole path into bytes.

    \n", "signature": "(self, path: str) -> memoryview:", "funcdef": "async def"}, "opendal.AsyncOperator.write": {"fullname": "opendal.AsyncOperator.write", "modulename": "opendal", "qualname": "AsyncOperator.write", "kind": "function", "doc": "

    Write bytes into given path.

    \n", "signature": "(\tself,\tpath: str,\tbs: bytes,\tappend: Optional[bool] = None,\tbuffer: Optional[int] = None,\tcontent_type: Optional[str] = None,\tcontent_disposition: Optional[str] = None,\tcache_control: Optional[str] = None):", "funcdef": "async def"}, "opendal.AsyncOperator.stat": {"fullname": "opendal.AsyncOperator.stat", "modulename": "opendal", "qualname": "AsyncOperator.stat", "kind": "function", "doc": "

    Get current path's metadata without cache directly.

    \n", "signature": "(self, path: str) -> opendal.Metadata:", "funcdef": "async def"}, "opendal.AsyncOperator.copy": {"fullname": "opendal.AsyncOperator.copy", "modulename": "opendal", "qualname": "AsyncOperator.copy", "kind": "function", "doc": "

    Copy source to target.``

    \n", "signature": "(self, source: str, target: str):", "funcdef": "async def"}, "opendal.AsyncOperator.rename": {"fullname": "opendal.AsyncOperator.rename", "modulename": "opendal", "qualname": "AsyncOperator.rename", "kind": "function", "doc": "

    Rename filename

    \n", "signature": "(self, source: str, target: str):", "funcdef": "async def"}, "opendal.AsyncOperator.remove_all": {"fullname": "opendal.AsyncOperator.remove_all", "modulename": "opendal", "qualname": "AsyncOperator.remove_all", "kind": "function", "doc": "

    Remove all file

    \n", "signature": "(self, path: str):", "funcdef": "async def"}, "opendal.AsyncOperator.create_dir": {"fullname": "opendal.AsyncOperator.create_dir", "modulename": "opendal", "qualname": "AsyncOperator.create_dir", "kind": "function", "doc": "

    Create a dir at given path.

    \n\n

    Notes

    \n\n

    To indicate that a path is a directory, it is compulsory to include\na trailing / in the path. Failure to do so may result in\nNotADirectory error being returned by OpenDAL.

    \n\n

    Behavior

    \n\n
      \n
    • Create on existing dir will succeed.
    • \n
    • Create dir is always recursive, works like mkdir -p
    • \n
    \n", "signature": "(self, path: str):", "funcdef": "async def"}, "opendal.AsyncOperator.delete": {"fullname": "opendal.AsyncOperator.delete", "modulename": "opendal", "qualname": "AsyncOperator.delete", "kind": "function", "doc": "

    Delete given path.

    \n\n

    Notes

    \n\n
      \n
    • Delete not existing error won't return errors.
    • \n
    \n", "signature": "(self, path: str):", "funcdef": "async def"}, "opendal.AsyncOperator.list": {"fullname": "opendal.AsyncOperator.list", "modulename": "opendal", "qualname": "AsyncOperator.list", "kind": "function", "doc": "

    List current dir path.

    \n", "signature": "(self, path: str) -> AsyncIterable[opendal.Entry]:", "funcdef": "async def"}, "opendal.AsyncOperator.scan": {"fullname": "opendal.AsyncOperator.scan", "modulename": "opendal", "qualname": "AsyncOperator.scan", "kind": "function", "doc": "

    List dir in flat way.

    \n", "signature": "(self, path: str) -> AsyncIterable[opendal.Entry]:", "funcdef": "async def"}, "opendal.AsyncOperator.presign_stat": {"fullname": "opendal.AsyncOperator.presign_stat", "modulename": "opendal", "qualname": "AsyncOperator.presign_stat", "kind": "function", "doc": "

    Presign an operation for stat(head) which expires after expire_second seconds.

    \n", "signature": "(self, path: str, expire_second: int) -> opendal.PresignedRequest:", "funcdef": "async def"}, "opendal.AsyncOperator.presign_read": {"fullname": "opendal.AsyncOperator.presign_read", "modulename": "opendal", "qualname": "AsyncOperator.presign_read", "kind": "function", "doc": "

    Presign an operation for read which expires after expire_second seconds.

    \n", "signature": "(self, path: str, expire_second: int) -> opendal.PresignedRequest:", "funcdef": "async def"}, "opendal.AsyncOperator.presign_write": {"fullname": "opendal.AsyncOperator.presign_write", "modulename": "opendal", "qualname": "AsyncOperator.presign_write", "kind": "function", "doc": "

    Presign an operation for write which expires after expire_second seconds.

    \n", "signature": "(self, path: str, expire_second: int) -> opendal.PresignedRequest:", "funcdef": "async def"}, "opendal.AsyncOperator.capability": {"fullname": "opendal.AsyncOperator.capability", "modulename": "opendal", "qualname": "AsyncOperator.capability", "kind": "function", "doc": "

    \n", "signature": "(self) -> opendal.Capability:", "funcdef": "def"}, "opendal.AsyncOperator.to_operator": {"fullname": "opendal.AsyncOperator.to_operator", "modulename": "opendal", "qualname": "AsyncOperator.to_operator", "kind": "function", "doc": "

    \n", "signature": "(self) -> opendal.Operator:", "funcdef": "def"}, "opendal.File": {"fullname": "opendal.File", "modulename": "opendal", "qualname": "File", "kind": "class", "doc": "

    A file-like object.\nCan be used as a context manager.

    \n"}, "opendal.File.read": {"fullname": "opendal.File.read", "modulename": "opendal", "qualname": "File.read", "kind": "function", "doc": "

    Read and return size bytes, or if size is not given, until EOF.

    \n", "signature": "(self, size: Optional[int] = None) -> memoryview:", "funcdef": "def"}, "opendal.File.write": {"fullname": "opendal.File.write", "modulename": "opendal", "qualname": "File.write", "kind": "function", "doc": "

    Write bytes into the file.

    \n", "signature": "(self, bs: bytes):", "funcdef": "def"}, "opendal.File.seek": {"fullname": "opendal.File.seek", "modulename": "opendal", "qualname": "File.seek", "kind": "function", "doc": "

    Change the stream position to the given byte offset.\nOffset is interpreted relative to the position indicated by whence.\nThe default value for whence is SEEK_SET. Values for whence are:

    \n\n
      \n
    • SEEK_SET or 0 \u2013 start of the stream (the default); offset should be zero or positive
    • \n
    • SEEK_CUR or 1 \u2013 current stream position; offset may be negative
    • \n
    • SEEK_END or 2 \u2013 end of the stream; offset is usually negative
    • \n
    \n\n

    Return the new absolute position.

    \n", "signature": "(self, offset: int, whence: int = 0) -> int:", "funcdef": "def"}, "opendal.File.tell": {"fullname": "opendal.File.tell", "modulename": "opendal", "qualname": "File.tell", "kind": "function", "doc": "

    Return the current stream position.

    \n", "signature": "(self) -> int:", "funcdef": "def"}, "opendal.File.close": {"fullname": "opendal.File.close", "modulename": "opendal", "qualname": "File.close", "kind": "function", "doc": "

    \n", "signature": "(self):", "funcdef": "def"}, "opendal.AsyncFile": {"fullname": "opendal.AsyncFile", "modulename": "opendal", "qualname": "AsyncFile", "kind": "class", "doc": "

    A file-like async reader.\nCan be used as an async context manager.

    \n"}, "opendal.AsyncFile.read": {"fullname": "opendal.AsyncFile.read", "modulename": "opendal", "qualname": "AsyncFile.read", "kind": "function", "doc": "

    Read and return size bytes, or if size is not given, until EOF.

    \n", "signature": "(self, size: Optional[int] = None) -> memoryview:", "funcdef": "async def"}, "opendal.AsyncFile.write": {"fullname": "opendal.AsyncFile.write", "modulename": "opendal", "qualname": "AsyncFile.write", "kind": "function", "doc": "

    Write bytes into the file.

    \n", "signature": "(self, bs: bytes):", "funcdef": "async def"}, "opendal.AsyncFile.seek": {"fullname": "opendal.AsyncFile.seek", "modulename": "opendal", "qualname": "AsyncFile.seek", "kind": "function", "doc": "

    Change the stream position to the given byte offset.\noffset is interpreted relative to the position indicated by whence.\nThe default value for whence is SEEK_SET. Values for whence are:

    \n\n
      \n
    • SEEK_SET or 0 \u2013 start of the stream (the default); offset should be zero or positive
    • \n
    • SEEK_CUR or 1 \u2013 current stream position; offset may be negative
    • \n
    • SEEK_END or 2 \u2013 end of the stream; offset is usually negative
    • \n
    \n\n

    Return the new absolute position.

    \n", "signature": "(self, offset: int, whence: int = 0) -> int:", "funcdef": "async def"}, "opendal.AsyncFile.tell": {"fullname": "opendal.AsyncFile.tell", "modulename": "opendal", "qualname": "AsyncFile.tell", "kind": "function", "doc": "

    Return the current stream position.

    \n", "signature": "(self) -> int:", "funcdef": "async def"}, "opendal.AsyncFile.close": {"fullname": "opendal.AsyncFile.close", "modulename": "opendal", "qualname": "AsyncFile.close", "kind": "function", "doc": "

    \n", "signature": "(self):", "funcdef": "async def"}, "opendal.Entry": {"fullname": "opendal.Entry", "modulename": "opendal", "qualname": "Entry", "kind": "class", "doc": "

    \n"}, "opendal.Entry.path": {"fullname": "opendal.Entry.path", "modulename": "opendal", "qualname": "Entry.path", "kind": "variable", "doc": "

    Path of entry. Path is relative to operator's root.

    \n", "annotation": ": str"}, "opendal.EntryMode": {"fullname": "opendal.EntryMode", "modulename": "opendal", "qualname": "EntryMode", "kind": "class", "doc": "

    \n"}, "opendal.EntryMode.is_file": {"fullname": "opendal.EntryMode.is_file", "modulename": "opendal", "qualname": "EntryMode.is_file", "kind": "function", "doc": "

    Returns True if this is a file.

    \n", "signature": "(self) -> bool:", "funcdef": "def"}, "opendal.EntryMode.is_dir": {"fullname": "opendal.EntryMode.is_dir", "modulename": "opendal", "qualname": "EntryMode.is_dir", "kind": "function", "doc": "

    Returns True if this is a directory.

    \n", "signature": "(self) -> bool:", "funcdef": "def"}, "opendal.Metadata": {"fullname": "opendal.Metadata", "modulename": "opendal", "qualname": "Metadata", "kind": "class", "doc": "

    \n"}, "opendal.Metadata.content_disposition": {"fullname": "opendal.Metadata.content_disposition", "modulename": "opendal", "qualname": "Metadata.content_disposition", "kind": "variable", "doc": "

    \n", "annotation": ": Optional[str]"}, "opendal.Metadata.mode": {"fullname": "opendal.Metadata.mode", "modulename": "opendal", "qualname": "Metadata.mode", "kind": "variable", "doc": "

    mode represent this entry's mode.

    \n", "annotation": ": opendal.EntryMode"}, "opendal.Metadata.content_md5": {"fullname": "opendal.Metadata.content_md5", "modulename": "opendal", "qualname": "Metadata.content_md5", "kind": "variable", "doc": "

    Content MD5 of this entry.

    \n", "annotation": ": Optional[str]"}, "opendal.Metadata.content_length": {"fullname": "opendal.Metadata.content_length", "modulename": "opendal", "qualname": "Metadata.content_length", "kind": "variable", "doc": "

    Content length of this entry.

    \n", "annotation": ": int"}, "opendal.Metadata.etag": {"fullname": "opendal.Metadata.etag", "modulename": "opendal", "qualname": "Metadata.etag", "kind": "variable", "doc": "

    ETag of this entry.

    \n", "annotation": ": Optional[str]"}, "opendal.Metadata.content_type": {"fullname": "opendal.Metadata.content_type", "modulename": "opendal", "qualname": "Metadata.content_type", "kind": "variable", "doc": "

    Content Type of this entry.

    \n", "annotation": ": Optional[str]"}, "opendal.PresignedRequest": {"fullname": "opendal.PresignedRequest", "modulename": "opendal", "qualname": "PresignedRequest", "kind": "class", "doc": "

    \n"}, "opendal.PresignedRequest.method": {"fullname": "opendal.PresignedRequest.method", "modulename": "opendal", "qualname": "PresignedRequest.method", "kind": "variable", "doc": "

    Return the HTTP method of this request.

    \n", "annotation": ": str"}, "opendal.PresignedRequest.url": {"fullname": "opendal.PresignedRequest.url", "modulename": "opendal", "qualname": "PresignedRequest.url", "kind": "variable", "doc": "

    Return the URL of this request.

    \n", "annotation": ": str"}, "opendal.PresignedRequest.headers": {"fullname": "opendal.PresignedRequest.headers", "modulename": "opendal", "qualname": "PresignedRequest.headers", "kind": "variable", "doc": "

    Return the HTTP headers of this request.

    \n", "annotation": ": dict[str, str]"}, "opendal.Capability": {"fullname": "opendal.Capability", "modulename": "opendal", "qualname": "Capability", "kind": "class", "doc": "

    Capability is used to describe what operations are supported\nby current Operator.

    \n"}, "opendal.Capability.stat_with_if_match": {"fullname": "opendal.Capability.stat_with_if_match", "modulename": "opendal", "qualname": "Capability.stat_with_if_match", "kind": "variable", "doc": "

    If operator supports stat with if match.

    \n", "annotation": ": bool"}, "opendal.Capability.stat_with_if_none_match": {"fullname": "opendal.Capability.stat_with_if_none_match", "modulename": "opendal", "qualname": "Capability.stat_with_if_none_match", "kind": "variable", "doc": "

    If operator supports stat with if none match.

    \n", "annotation": ": bool"}, "opendal.Capability.write_can_empty": {"fullname": "opendal.Capability.write_can_empty", "modulename": "opendal", "qualname": "Capability.write_can_empty", "kind": "variable", "doc": "

    If operator supports write with empty content.

    \n", "annotation": ": bool"}, "opendal.Capability.list": {"fullname": "opendal.Capability.list", "modulename": "opendal", "qualname": "Capability.list", "kind": "variable", "doc": "

    If operator supports list.

    \n", "annotation": ": bool"}, "opendal.Capability.presign_read": {"fullname": "opendal.Capability.presign_read", "modulename": "opendal", "qualname": "Capability.presign_read", "kind": "variable", "doc": "

    If operator supports presign read.

    \n", "annotation": ": bool"}, "opendal.Capability.write_can_append": {"fullname": "opendal.Capability.write_can_append", "modulename": "opendal", "qualname": "Capability.write_can_append", "kind": "variable", "doc": "

    If operator supports write by append.

    \n", "annotation": ": bool"}, "opendal.Capability.create_dir": {"fullname": "opendal.Capability.create_dir", "modulename": "opendal", "qualname": "Capability.create_dir", "kind": "variable", "doc": "

    If operator supports create dir.

    \n", "annotation": ": bool"}, "opendal.Capability.presign": {"fullname": "opendal.Capability.presign", "modulename": "opendal", "qualname": "Capability.presign", "kind": "variable", "doc": "

    If operator supports presign.

    \n", "annotation": ": bool"}, "opendal.Capability.write_multi_align_size": {"fullname": "opendal.Capability.write_multi_align_size", "modulename": "opendal", "qualname": "Capability.write_multi_align_size", "kind": "variable", "doc": "

    write_multi_align_size is the align size that services required in write_multi.

    \n\n

    For example, Google GCS requires align size to 256KiB in write_multi.

    \n", "annotation": ": Optional[int]"}, "opendal.Capability.write_with_cache_control": {"fullname": "opendal.Capability.write_with_cache_control", "modulename": "opendal", "qualname": "Capability.write_with_cache_control", "kind": "variable", "doc": "

    If operator supports write with cache control.

    \n", "annotation": ": bool"}, "opendal.Capability.list_with_limit": {"fullname": "opendal.Capability.list_with_limit", "modulename": "opendal", "qualname": "Capability.list_with_limit", "kind": "variable", "doc": "

    If backend supports list with limit.

    \n", "annotation": ": bool"}, "opendal.Capability.batch": {"fullname": "opendal.Capability.batch", "modulename": "opendal", "qualname": "Capability.batch", "kind": "variable", "doc": "

    If operator supports batch.

    \n", "annotation": ": bool"}, "opendal.Capability.write_can_multi": {"fullname": "opendal.Capability.write_can_multi", "modulename": "opendal", "qualname": "Capability.write_can_multi", "kind": "variable", "doc": "

    If operator supports write can be called in multi times.

    \n", "annotation": ": bool"}, "opendal.Capability.batch_max_operations": {"fullname": "opendal.Capability.batch_max_operations", "modulename": "opendal", "qualname": "Capability.batch_max_operations", "kind": "variable", "doc": "

    The max operations that operator supports in batch.

    \n", "annotation": ": Optional[int]"}, "opendal.Capability.stat": {"fullname": "opendal.Capability.stat", "modulename": "opendal", "qualname": "Capability.stat", "kind": "variable", "doc": "

    If operator supports stat.

    \n", "annotation": ": bool"}, "opendal.Capability.read": {"fullname": "opendal.Capability.read", "modulename": "opendal", "qualname": "Capability.read", "kind": "variable", "doc": "

    If operator supports read.

    \n", "annotation": ": bool"}, "opendal.Capability.write_with_content_type": {"fullname": "opendal.Capability.write_with_content_type", "modulename": "opendal", "qualname": "Capability.write_with_content_type", "kind": "variable", "doc": "

    If operator supports write with content type.

    \n", "annotation": ": bool"}, "opendal.Capability.read_with_override_cache_control": {"fullname": "opendal.Capability.read_with_override_cache_control", "modulename": "opendal", "qualname": "Capability.read_with_override_cache_control", "kind": "variable", "doc": "

    if operator supports read with override cache control.

    \n", "annotation": ": bool"}, "opendal.Capability.read_with_override_content_disposition": {"fullname": "opendal.Capability.read_with_override_content_disposition", "modulename": "opendal", "qualname": "Capability.read_with_override_content_disposition", "kind": "variable", "doc": "

    if operator supports read with override content disposition.

    \n", "annotation": ": bool"}, "opendal.Capability.read_with_override_content_type": {"fullname": "opendal.Capability.read_with_override_content_type", "modulename": "opendal", "qualname": "Capability.read_with_override_content_type", "kind": "variable", "doc": "

    if operator supports read with override content type.

    \n", "annotation": ": bool"}, "opendal.Capability.rename": {"fullname": "opendal.Capability.rename", "modulename": "opendal", "qualname": "Capability.rename", "kind": "variable", "doc": "

    If operator supports rename.

    \n", "annotation": ": bool"}, "opendal.Capability.read_can_next": {"fullname": "opendal.Capability.read_can_next", "modulename": "opendal", "qualname": "Capability.read_can_next", "kind": "variable", "doc": "

    If operator supports next on returning reader.

    \n", "annotation": ": bool"}, "opendal.Capability.presign_stat": {"fullname": "opendal.Capability.presign_stat", "modulename": "opendal", "qualname": "Capability.presign_stat", "kind": "variable", "doc": "

    If operator supports presign stat.

    \n", "annotation": ": bool"}, "opendal.Capability.write_total_max_size": {"fullname": "opendal.Capability.write_total_max_size", "modulename": "opendal", "qualname": "Capability.write_total_max_size", "kind": "variable", "doc": "

    write_total_max_size is the max size that services support in write_total.

    \n\n

    For example, Cloudflare D1 supports 1MB as max in write_total.

    \n", "annotation": ": Optional[int]"}, "opendal.Capability.list_with_start_after": {"fullname": "opendal.Capability.list_with_start_after", "modulename": "opendal", "qualname": "Capability.list_with_start_after", "kind": "variable", "doc": "

    If backend supports list with start after.

    \n", "annotation": ": bool"}, "opendal.Capability.write": {"fullname": "opendal.Capability.write", "modulename": "opendal", "qualname": "Capability.write", "kind": "variable", "doc": "

    If operator supports write.

    \n", "annotation": ": bool"}, "opendal.Capability.write_with_content_disposition": {"fullname": "opendal.Capability.write_with_content_disposition", "modulename": "opendal", "qualname": "Capability.write_with_content_disposition", "kind": "variable", "doc": "

    If operator supports write with content disposition.

    \n", "annotation": ": bool"}, "opendal.Capability.read_with_range": {"fullname": "opendal.Capability.read_with_range", "modulename": "opendal", "qualname": "Capability.read_with_range", "kind": "variable", "doc": "

    If operator supports read with range.

    \n", "annotation": ": bool"}, "opendal.Capability.read_can_seek": {"fullname": "opendal.Capability.read_can_seek", "modulename": "opendal", "qualname": "Capability.read_can_seek", "kind": "variable", "doc": "

    If operator supports seek on returning reader.

    \n", "annotation": ": bool"}, "opendal.Capability.read_with_if_match": {"fullname": "opendal.Capability.read_with_if_match", "modulename": "opendal", "qualname": "Capability.read_with_if_match", "kind": "variable", "doc": "

    If operator supports read with if match.

    \n", "annotation": ": bool"}, "opendal.Capability.write_multi_max_size": {"fullname": "opendal.Capability.write_multi_max_size", "modulename": "opendal", "qualname": "Capability.write_multi_max_size", "kind": "variable", "doc": "

    write_multi_max_size is the max size that services support in write_multi.

    \n\n

    For example, AWS S3 supports 5GiB as max in write_multi.

    \n", "annotation": ": Optional[int]"}, "opendal.Capability.delete": {"fullname": "opendal.Capability.delete", "modulename": "opendal", "qualname": "Capability.delete", "kind": "variable", "doc": "

    If operator supports delete.

    \n", "annotation": ": bool"}, "opendal.Capability.list_with_recursive": {"fullname": "opendal.Capability.list_with_recursive", "modulename": "opendal", "qualname": "Capability.list_with_recursive", "kind": "variable", "doc": "

    If backend supports list without delimiter.

    \n", "annotation": ": bool"}, "opendal.Capability.copy": {"fullname": "opendal.Capability.copy", "modulename": "opendal", "qualname": "Capability.copy", "kind": "variable", "doc": "

    If operator supports copy.

    \n", "annotation": ": bool"}, "opendal.Capability.write_multi_min_size": {"fullname": "opendal.Capability.write_multi_min_size", "modulename": "opendal", "qualname": "Capability.write_multi_min_size", "kind": "variable", "doc": "

    write_multi_min_size is the min size that services support in write_multi.

    \n\n

    For example, AWS S3 requires at least 5MiB in write_multi expect the last one.

    \n", "annotation": ": Optional[int]"}, "opendal.Capability.presign_write": {"fullname": "opendal.Capability.presign_write", "modulename": "opendal", "qualname": "Capability.presign_write", "kind": "variable", "doc": "

    If operator supports presign write.

    \n", "annotation": ": bool"}, "opendal.Capability.read_with_if_none_match": {"fullname": "opendal.Capability.read_with_if_none_match", "modulename": "opendal", "qualname": "Capability.read_with_if_none_match", "kind": "variable", "doc": "

    If operator supports read with if none match.

    \n", "annotation": ": bool"}, "opendal.Capability.batch_delete": {"fullname": "opendal.Capability.batch_delete", "modulename": "opendal", "qualname": "Capability.batch_delete", "kind": "variable", "doc": "

    If operator supports batch delete.

    \n", "annotation": ": bool"}, "opendal.Capability.blocking": {"fullname": "opendal.Capability.blocking", "modulename": "opendal", "qualname": "Capability.blocking", "kind": "variable", "doc": "

    If operator supports blocking.

    \n", "annotation": ": bool"}, "opendal.layers": {"fullname": "opendal.layers", "modulename": "opendal.layers", "kind": "module", "doc": "

    \n"}, "opendal.layers.Layer": {"fullname": "opendal.layers.Layer", "modulename": "opendal.layers", "qualname": "Layer", "kind": "class", "doc": "

    \n"}, "opendal.layers.RetryLayer": {"fullname": "opendal.layers.RetryLayer", "modulename": "opendal.layers", "qualname": "RetryLayer", "kind": "class", "doc": "

    \n", "bases": "Layer"}, "opendal.layers.RetryLayer.__init__": {"fullname": "opendal.layers.RetryLayer.__init__", "modulename": "opendal.layers", "qualname": "RetryLayer.__init__", "kind": "function", "doc": "

    \n", "signature": "(\tmax_times: Optional[int] = None,\tfactor: Optional[float] = None,\tjitter: bool = False,\tmax_delay: Optional[float] = None,\tmin_delay: Optional[float] = None)"}, "opendal.exceptions": {"fullname": "opendal.exceptions", "modulename": "opendal.exceptions", "kind": "module", "doc": "

    \n"}, "opendal.exceptions.Error": {"fullname": "opendal.exceptions.Error", "modulename": "opendal.exceptions", "qualname": "Error", "kind": "class", "doc": "

    Base class for exceptions in this module.

    \n", "bases": "builtins.Exception"}, "opendal.exceptions.Unexpected": {"fullname": "opendal.exceptions.Unexpected", "modulename": "opendal.exceptions", "qualname": "Unexpected", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.UnexpectedError'>"}, "opendal.exceptions.Unsupported": {"fullname": "opendal.exceptions.Unsupported", "modulename": "opendal.exceptions", "qualname": "Unsupported", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.UnsupportedError'>"}, "opendal.exceptions.ConfigInvalid": {"fullname": "opendal.exceptions.ConfigInvalid", "modulename": "opendal.exceptions", "qualname": "ConfigInvalid", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.ConfigInvalidError'>"}, "opendal.exceptions.NotFound": {"fullname": "opendal.exceptions.NotFound", "modulename": "opendal.exceptions", "qualname": "NotFound", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.NotFoundError'>"}, "opendal.exceptions.PermissionDenied": {"fullname": "opendal.exceptions.PermissionDenied", "modulename": "opendal.exceptions", "qualname": "PermissionDenied", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.PermissionDeniedError'>"}, "opendal.exceptions.IsADirectory": {"fullname": "opendal.exceptions.IsADirectory", "modulename": "opendal.exceptions", "qualname": "IsADirectory", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.IsADirectoryError'>"}, "opendal.exceptions.NotADirectory": {"fullname": "opendal.exceptions.NotADirectory", "modulename": "opendal.exceptions", "qualname": "NotADirectory", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.NotADirectoryError'>"}, "opendal.exceptions.AlreadyExists": {"fullname": "opendal.exceptions.AlreadyExists", "modulename": "opendal.exceptions", "qualname": "AlreadyExists", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.AlreadyExistsError'>"}, "opendal.exceptions.IsSameFile": {"fullname": "opendal.exceptions.IsSameFile", "modulename": "opendal.exceptions", "qualname": "IsSameFile", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.IsSameFileError'>"}, "opendal.exceptions.ConditionNotMatch": {"fullname": "opendal.exceptions.ConditionNotMatch", "modulename": "opendal.exceptions", "qualname": "ConditionNotMatch", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.ConditionNotMatchError'>"}, "opendal.exceptions.ContentTruncated": {"fullname": "opendal.exceptions.ContentTruncated", "modulename": "opendal.exceptions", "qualname": "ContentTruncated", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.ContentTruncatedError'>"}, "opendal.exceptions.ContentIncomplete": {"fullname": "opendal.exceptions.ContentIncomplete", "modulename": "opendal.exceptions", "qualname": "ContentIncomplete", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.ContentIncompleteError'>"}, "opendal.exceptions.InvalidInput": {"fullname": "opendal.exceptions.InvalidInput", "modulename": "opendal.exceptions", "qualname": "InvalidInput", "kind": "variable", "doc": "

    \n", "default_value": "<class 'opendal.InvalidInputError'>"}}, "docInfo": {"opendal": {"qualname": 0, "fullname": 1, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 344}, "opendal.Operator": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 34}, "opendal.Operator.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 3}, "opendal.Operator.layer": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 8}, "opendal.Operator.open": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 39, "bases": 0, "doc": 12}, "opendal.Operator.read": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 9}, "opendal.Operator.write": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 157, "bases": 0, "doc": 8}, "opendal.Operator.stat": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 29, "bases": 0, "doc": 13}, "opendal.Operator.copy": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 7}, "opendal.Operator.rename": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 5}, "opendal.Operator.remove_all": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 5}, "opendal.Operator.create_dir": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 78}, "opendal.Operator.delete": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 24}, "opendal.Operator.list": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 7}, "opendal.Operator.scan": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 8}, "opendal.Operator.capability": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 19, "bases": 0, "doc": 3}, "opendal.Operator.to_async_operator": {"qualname": 4, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 19, "bases": 0, "doc": 3}, "opendal.AsyncOperator": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 33}, "opendal.AsyncOperator.__init__": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 3}, "opendal.AsyncOperator.layer": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 8}, "opendal.AsyncOperator.open": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 39, "bases": 0, "doc": 12}, "opendal.AsyncOperator.read": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 9}, "opendal.AsyncOperator.write": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 157, "bases": 0, "doc": 8}, "opendal.AsyncOperator.stat": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 29, "bases": 0, "doc": 13}, "opendal.AsyncOperator.copy": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 7}, "opendal.AsyncOperator.rename": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 31, "bases": 0, "doc": 4}, "opendal.AsyncOperator.remove_all": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 5}, "opendal.AsyncOperator.create_dir": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 78}, "opendal.AsyncOperator.delete": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 24}, "opendal.AsyncOperator.list": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 7}, "opendal.AsyncOperator.scan": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 35, "bases": 0, "doc": 8}, "opendal.AsyncOperator.presign_stat": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 17}, "opendal.AsyncOperator.presign_read": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 16}, "opendal.AsyncOperator.presign_write": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 16}, "opendal.AsyncOperator.capability": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 19, "bases": 0, "doc": 3}, "opendal.AsyncOperator.to_operator": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 19, "bases": 0, "doc": 3}, "opendal.File": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 14}, "opendal.File.read": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 16}, "opendal.File.write": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 8}, "opendal.File.seek": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 41, "bases": 0, "doc": 111}, "opendal.File.tell": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 8}, "opendal.File.close": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 11, "bases": 0, "doc": 3}, "opendal.AsyncFile": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 16}, "opendal.AsyncFile.read": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 37, "bases": 0, "doc": 16}, "opendal.AsyncFile.write": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 21, "bases": 0, "doc": 8}, "opendal.AsyncFile.seek": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 41, "bases": 0, "doc": 111}, "opendal.AsyncFile.tell": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 8}, "opendal.AsyncFile.close": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 11, "bases": 0, "doc": 3}, "opendal.Entry": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.Entry.path": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 13}, "opendal.EntryMode": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.EntryMode.is_file": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 12}, "opendal.EntryMode.is_dir": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 12}, "opendal.Metadata": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.Metadata.content_disposition": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.Metadata.mode": {"qualname": 2, "fullname": 3, "annotation": 3, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.Metadata.content_md5": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Metadata.content_length": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Metadata.etag": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Metadata.content_type": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.PresignedRequest": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.PresignedRequest.method": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.PresignedRequest.url": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.PresignedRequest.headers": {"qualname": 2, "fullname": 3, "annotation": 3, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability": {"qualname": 1, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 15}, "opendal.Capability.stat_with_if_match": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.stat_with_if_none_match": {"qualname": 6, "fullname": 7, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.write_can_empty": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.list": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.presign_read": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Capability.write_can_append": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.Capability.create_dir": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Capability.presign": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.write_multi_align_size": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 32}, "opendal.Capability.write_with_cache_control": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.list_with_limit": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.Capability.batch": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.write_can_multi": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 13}, "opendal.Capability.batch_max_operations": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.stat": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.read": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.write_with_content_type": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.read_with_override_cache_control": {"qualname": 6, "fullname": 7, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.read_with_override_content_disposition": {"qualname": 6, "fullname": 7, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.read_with_override_content_type": {"qualname": 6, "fullname": 7, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.rename": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.read_can_next": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.presign_stat": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Capability.write_total_max_size": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 31}, "opendal.Capability.list_with_start_after": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.write": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.write_with_content_disposition": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.read_with_range": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.Capability.read_can_seek": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.read_with_if_match": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 10}, "opendal.Capability.write_multi_max_size": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 31}, "opendal.Capability.delete": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.list_with_recursive": {"qualname": 4, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 9}, "opendal.Capability.copy": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.Capability.write_multi_min_size": {"qualname": 5, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 35}, "opendal.Capability.presign_write": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Capability.read_with_if_none_match": {"qualname": 6, "fullname": 7, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 11}, "opendal.Capability.batch_delete": {"qualname": 3, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 8}, "opendal.Capability.blocking": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 7}, "opendal.layers": {"qualname": 0, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.layers.Layer": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.layers.RetryLayer": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 1, "doc": 3}, "opendal.layers.RetryLayer.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 121, "bases": 0, "doc": 3}, "opendal.exceptions": {"qualname": 0, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.Error": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 2, "doc": 10}, "opendal.exceptions.Unexpected": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.Unsupported": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.ConfigInvalid": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.NotFound": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.PermissionDenied": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.IsADirectory": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.NotADirectory": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.AlreadyExists": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.IsSameFile": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.ConditionNotMatch": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.ContentTruncated": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.ContentIncomplete": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}, "opendal.exceptions.InvalidInput": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 9, "signature": 0, "bases": 0, "doc": 3}}, "length": 123, "save": true}, "index": {"qualname": {"root": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 3, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.__init__": {"tf": 1}, "opendal.Operator.layer": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.Operator.capability": {"tf": 1}, "opendal.Operator.to_async_operator": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 17}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 1}}}}}}}, "n": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}}, "df": 2}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 3}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 1}}}}}}}}}}}, "s": {"docs": {"opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 2, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.exceptions.IsADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.IsSameFile": {"tf": 1}}, "df": 1}}}}}}}}}, "f": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 4}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.layers.Layer": {"tf": 1}}, "df": 3}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.list": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 6}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.list_with_limit": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Metadata.content_length": {"tf": 1}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 15}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}}, "df": 3}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 2}}}}, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.layers.RetryLayer": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 2}}}}}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_range": {"tf": 1}}, "df": 1}}}}}, "w": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}}, "df": 17}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 14}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}}, "df": 7}, "r": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "k": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}}, "df": 3}}}, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 4}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}}, "df": 3}}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}}, "df": 8, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.ContentTruncated": {"tf": 1}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.ContentIncomplete": {"tf": 1}}, "df": 1}}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 2}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.ConfigInvalid": {"tf": 1}}, "df": 1}}}}}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.exceptions.ConditionNotMatch": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 3}}}}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.capability": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}}, "df": 42}}}}}}}}, "n": {"docs": {"opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}}, "df": 5}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 2}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.close": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}}, "df": 2}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 2}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.AlreadyExists": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "s": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {"opendal.Operator.to_async_operator": {"tf": 1}}, "df": 1, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 19}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncFile": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}}, "df": 6}}}}}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability.write_can_append": {"tf": 1}}, "df": 1}}}}}, "f": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 4}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}}, "df": 3}}}}}}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}}, "df": 4}}}}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {"opendal.Operator.to_async_operator": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 2, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}}, "df": 2}}}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.content_type": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}}, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}}, "df": 7, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.PresignedRequest": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 4}}}}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Entry.path": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.PermissionDenied": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.File.close": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}}, "df": 7}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Entry": {"tf": 1}, "opendal.Entry.path": {"tf": 1}}, "df": 2, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.EntryMode": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 3}}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Metadata.etag": {"tf": 1}}, "df": 1}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Capability.write_can_empty": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"opendal.Metadata": {"tf": 1}, "opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}}, "df": 7}}}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"opendal.PresignedRequest.method": {"tf": 1}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.mode": {"tf": 1}}, "df": 1}}}, "d": {"5": {"docs": {"opendal.Metadata.content_md5": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 4}}}, "x": {"docs": {"opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}}, "df": 3}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 4}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "l": {"docs": {"opendal.PresignedRequest.url": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}}, "df": 1}}}}}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.Unsupported": {"tf": 1}}, "df": 1}}}}}}}}}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"opendal.PresignedRequest.headers": {"tf": 1}}, "df": 1}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 2}}, "t": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.NotFound": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.exceptions.NotADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.read_can_next": {"tf": 1}}, "df": 1}}}}, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.batch": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}}, "df": 3}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Capability.blocking": {"tf": 1}}, "df": 1}}}}}}}}}}, "fullname": {"root": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 3, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}}, "df": 2, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal": {"tf": 1}, "opendal.Operator": {"tf": 1}, "opendal.Operator.__init__": {"tf": 1}, "opendal.Operator.layer": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.Operator.capability": {"tf": 1}, "opendal.Operator.to_async_operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}, "opendal.File": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.File.close": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}, "opendal.Entry": {"tf": 1}, "opendal.Entry.path": {"tf": 1}, "opendal.EntryMode": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Metadata": {"tf": 1}, "opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.PresignedRequest": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}, "opendal.layers": {"tf": 1}, "opendal.layers.Layer": {"tf": 1}, "opendal.layers.RetryLayer": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}, "opendal.exceptions": {"tf": 1}, "opendal.exceptions.Error": {"tf": 1}, "opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 123}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.__init__": {"tf": 1}, "opendal.Operator.layer": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.Operator.capability": {"tf": 1}, "opendal.Operator.to_async_operator": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 17}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 1}}}}}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 3}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 1}}}}}}}}}}}, "s": {"docs": {"opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 2, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.exceptions.IsADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.IsSameFile": {"tf": 1}}, "df": 1}}}}}}}}}, "f": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 4}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.layers.Layer": {"tf": 1}}, "df": 3, "s": {"docs": {"opendal.layers": {"tf": 1}, "opendal.layers.Layer": {"tf": 1}, "opendal.layers.RetryLayer": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 4}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.list": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 6}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.list_with_limit": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Metadata.content_length": {"tf": 1}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 15}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}}, "df": 3}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 2}}}}, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.layers.RetryLayer": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 2}}}}}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_range": {"tf": 1}}, "df": 1}}}}}, "w": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}}, "df": 17}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 14}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}}, "df": 7}, "r": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "k": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}}, "df": 3}}}, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 4}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}}, "df": 3}}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}}, "df": 8, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.ContentTruncated": {"tf": 1}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.ContentIncomplete": {"tf": 1}}, "df": 1}}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 2}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.ConfigInvalid": {"tf": 1}}, "df": 1}}}}}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.exceptions.ConditionNotMatch": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 3}}}}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.capability": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}}, "df": 42}}}}}}}}, "n": {"docs": {"opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}}, "df": 5}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 2}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.close": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}}, "df": 2}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 2}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.AlreadyExists": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "s": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {"opendal.Operator.to_async_operator": {"tf": 1}}, "df": 1, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 19}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncFile": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}}, "df": 6}}}}}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability.write_can_append": {"tf": 1}}, "df": 1}}}}}, "f": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 4}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}}, "df": 3}}}}}}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}}, "df": 4}}}}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {"opendal.Operator.to_async_operator": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 2, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}}, "df": 2}}}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.content_type": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}}, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}}, "df": 7, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.PresignedRequest": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 4}}}}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Entry.path": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.PermissionDenied": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.File.close": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}}, "df": 7}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Entry": {"tf": 1}, "opendal.Entry.path": {"tf": 1}}, "df": 2, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.EntryMode": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 3}}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Metadata.etag": {"tf": 1}}, "df": 1}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Capability.write_can_empty": {"tf": 1}}, "df": 1}}}}, "x": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions": {"tf": 1}, "opendal.exceptions.Error": {"tf": 1}, "opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 15}}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"opendal.Metadata": {"tf": 1}, "opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}}, "df": 7}}}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"opendal.PresignedRequest.method": {"tf": 1}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.mode": {"tf": 1}}, "df": 1}}}, "d": {"5": {"docs": {"opendal.Metadata.content_md5": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 4}}}, "x": {"docs": {"opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}}, "df": 3}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 4}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "l": {"docs": {"opendal.PresignedRequest.url": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}}, "df": 1}}}}}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.Unsupported": {"tf": 1}}, "df": 1}}}}}}}}}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"opendal.PresignedRequest.headers": {"tf": 1}}, "df": 1}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 2}}, "t": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.exceptions.NotFound": {"tf": 1}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.exceptions.NotADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.read_can_next": {"tf": 1}}, "df": 1}}}}, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.batch": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}}, "df": 3}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Capability.blocking": {"tf": 1}}, "df": 1}}}}}}}}}}, "annotation": {"root": {"docs": {"opendal.Entry.path": {"tf": 1}, "opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}}, "df": 49, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Entry.path": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 4}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "[": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Metadata.content_disposition": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}}, "df": 4}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 5}}}}}}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Metadata.mode": {"tf": 1}}, "df": 1}}}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.mode": {"tf": 1}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Metadata.content_length": {"tf": 1}}, "df": 1}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "[": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"opendal.PresignedRequest.headers": {"tf": 1}}, "df": 1}}}}}}}}, "b": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}}, "df": 34}}}}}}, "default_value": {"root": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1.4142135623730951}, "opendal.exceptions.Unsupported": {"tf": 1.4142135623730951}, "opendal.exceptions.ConfigInvalid": {"tf": 1.4142135623730951}, "opendal.exceptions.NotFound": {"tf": 1.4142135623730951}, "opendal.exceptions.PermissionDenied": {"tf": 1.4142135623730951}, "opendal.exceptions.IsADirectory": {"tf": 1.4142135623730951}, "opendal.exceptions.NotADirectory": {"tf": 1.4142135623730951}, "opendal.exceptions.AlreadyExists": {"tf": 1.4142135623730951}, "opendal.exceptions.IsSameFile": {"tf": 1.4142135623730951}, "opendal.exceptions.ConditionNotMatch": {"tf": 1.4142135623730951}, "opendal.exceptions.ContentTruncated": {"tf": 1.4142135623730951}, "opendal.exceptions.ContentIncomplete": {"tf": 1.4142135623730951}, "opendal.exceptions.InvalidInput": {"tf": 1.4142135623730951}}, "df": 13, "l": {"docs": {}, "df": 0, "t": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 13}}, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 13}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.ConfigInvalid": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.ConditionNotMatch": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.ContentTruncated": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.ContentIncomplete": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}}}}}, "x": {"2": {"7": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1.4142135623730951}, "opendal.exceptions.Unsupported": {"tf": 1.4142135623730951}, "opendal.exceptions.ConfigInvalid": {"tf": 1.4142135623730951}, "opendal.exceptions.NotFound": {"tf": 1.4142135623730951}, "opendal.exceptions.PermissionDenied": {"tf": 1.4142135623730951}, "opendal.exceptions.IsADirectory": {"tf": 1.4142135623730951}, "opendal.exceptions.NotADirectory": {"tf": 1.4142135623730951}, "opendal.exceptions.AlreadyExists": {"tf": 1.4142135623730951}, "opendal.exceptions.IsSameFile": {"tf": 1.4142135623730951}, "opendal.exceptions.ConditionNotMatch": {"tf": 1.4142135623730951}, "opendal.exceptions.ContentTruncated": {"tf": 1.4142135623730951}, "opendal.exceptions.ContentIncomplete": {"tf": 1.4142135623730951}, "opendal.exceptions.InvalidInput": {"tf": 1.4142135623730951}}, "df": 13}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 13}}}}}}}, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}}, "df": 1}}}}}}}}}}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.Unsupported": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "g": {"docs": {}, "df": 0, "t": {"docs": {"opendal.exceptions.Unexpected": {"tf": 1}, "opendal.exceptions.Unsupported": {"tf": 1}, "opendal.exceptions.ConfigInvalid": {"tf": 1}, "opendal.exceptions.NotFound": {"tf": 1}, "opendal.exceptions.PermissionDenied": {"tf": 1}, "opendal.exceptions.IsADirectory": {"tf": 1}, "opendal.exceptions.NotADirectory": {"tf": 1}, "opendal.exceptions.AlreadyExists": {"tf": 1}, "opendal.exceptions.IsSameFile": {"tf": 1}, "opendal.exceptions.ConditionNotMatch": {"tf": 1}, "opendal.exceptions.ContentTruncated": {"tf": 1}, "opendal.exceptions.ContentIncomplete": {"tf": 1}, "opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 13}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.NotFound": {"tf": 1}}, "df": 1}}}}}}}}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.NotADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.PermissionDenied": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.IsADirectory": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.IsSameFile": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}, "n": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.InvalidInput": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.exceptions.AlreadyExists": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}}}, "signature": {"root": {"0": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}, "docs": {"opendal.Operator.__init__": {"tf": 4.242640687119285}, "opendal.Operator.layer": {"tf": 5.0990195135927845}, "opendal.Operator.open": {"tf": 5.656854249492381}, "opendal.Operator.read": {"tf": 4.47213595499958}, "opendal.Operator.write": {"tf": 11.357816691600547}, "opendal.Operator.stat": {"tf": 4.898979485566356}, "opendal.Operator.copy": {"tf": 5.0990195135927845}, "opendal.Operator.rename": {"tf": 5.0990195135927845}, "opendal.Operator.remove_all": {"tf": 4.242640687119285}, "opendal.Operator.create_dir": {"tf": 4.242640687119285}, "opendal.Operator.delete": {"tf": 4.242640687119285}, "opendal.Operator.list": {"tf": 5.385164807134504}, "opendal.Operator.scan": {"tf": 5.385164807134504}, "opendal.Operator.capability": {"tf": 4}, "opendal.Operator.to_async_operator": {"tf": 4}, "opendal.AsyncOperator.__init__": {"tf": 4.242640687119285}, "opendal.AsyncOperator.layer": {"tf": 5.0990195135927845}, "opendal.AsyncOperator.open": {"tf": 5.656854249492381}, "opendal.AsyncOperator.read": {"tf": 4.47213595499958}, "opendal.AsyncOperator.write": {"tf": 11.357816691600547}, "opendal.AsyncOperator.stat": {"tf": 4.898979485566356}, "opendal.AsyncOperator.copy": {"tf": 5.0990195135927845}, "opendal.AsyncOperator.rename": {"tf": 5.0990195135927845}, "opendal.AsyncOperator.remove_all": {"tf": 4.242640687119285}, "opendal.AsyncOperator.create_dir": {"tf": 4.242640687119285}, "opendal.AsyncOperator.delete": {"tf": 4.242640687119285}, "opendal.AsyncOperator.list": {"tf": 5.385164807134504}, "opendal.AsyncOperator.scan": {"tf": 5.385164807134504}, "opendal.AsyncOperator.presign_stat": {"tf": 5.656854249492381}, "opendal.AsyncOperator.presign_read": {"tf": 5.656854249492381}, "opendal.AsyncOperator.presign_write": {"tf": 5.656854249492381}, "opendal.AsyncOperator.capability": {"tf": 4}, "opendal.AsyncOperator.to_operator": {"tf": 4}, "opendal.File.read": {"tf": 5.5677643628300215}, "opendal.File.write": {"tf": 4.242640687119285}, "opendal.File.seek": {"tf": 5.830951894845301}, "opendal.File.tell": {"tf": 3.4641016151377544}, "opendal.File.close": {"tf": 3.1622776601683795}, "opendal.AsyncFile.read": {"tf": 5.5677643628300215}, "opendal.AsyncFile.write": {"tf": 4.242640687119285}, "opendal.AsyncFile.seek": {"tf": 5.830951894845301}, "opendal.AsyncFile.tell": {"tf": 3.4641016151377544}, "opendal.AsyncFile.close": {"tf": 3.1622776601683795}, "opendal.EntryMode.is_file": {"tf": 3.4641016151377544}, "opendal.EntryMode.is_dir": {"tf": 3.4641016151377544}, "opendal.layers.RetryLayer.__init__": {"tf": 9.9498743710662}}, "df": 46, "s": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}}, "df": 2}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.Operator.open": {"tf": 1.4142135623730951}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 2}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.copy": {"tf": 1.4142135623730951}, "opendal.Operator.rename": {"tf": 1.4142135623730951}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 2}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.rename": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 27}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "f": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.Operator.capability": {"tf": 1}, "opendal.Operator.to_async_operator": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.File.close": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.AsyncFile.close": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 43}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}}}, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}}, "df": 4}}}}}, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 2}}}}, "k": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.__init__": {"tf": 1}, "opendal.AsyncOperator.__init__": {"tf": 1}}, "df": 2}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.layer": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.layer": {"tf": 1.4142135623730951}}, "df": 2, "s": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}}, "df": 2}}}}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.Operator.capability": {"tf": 1}, "opendal.Operator.to_async_operator": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}, "opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 17}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.AsyncOperator.to_operator": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.write": {"tf": 2.23606797749979}, "opendal.AsyncOperator.write": {"tf": 2.23606797749979}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 2}}, "df": 5}}}}}}}, "f": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 21}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}}}}}}}}}}}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "w": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 4}}}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}}, "df": 2}}}}}}}, "a": {"docs": {}, "df": 0, "x": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1.4142135623730951}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 1}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.open": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 1}}}}, "l": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 1}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1.7320508075688772}}, "df": 1}}}}}, "b": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}}, "df": 4}, "y": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}}, "df": 4}}}}, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 5}}}, "u": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}}}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}}}, "s": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.to_async_operator": {"tf": 1}}, "df": 1}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncOperator.open": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 2}}}}}}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.write": {"tf": 2.23606797749979}, "opendal.AsyncOperator.write": {"tf": 2.23606797749979}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 2}}, "df": 5}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.seek": {"tf": 1.7320508075688772}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1.7320508075688772}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 12}}, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}}, "df": 2}}}}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.write": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.write": {"tf": 1.4142135623730951}}, "df": 2}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.capability": {"tf": 1}, "opendal.AsyncOperator.capability": {"tf": 1}}, "df": 2}}}}}}}}}}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}}, "df": 4}}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}}, "df": 2}}}}}}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 4}}}}, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}}}}, "w": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}, "j": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.layers.RetryLayer.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "bases": {"root": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.layers.RetryLayer": {"tf": 1}}, "df": 1}}}}}, "b": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}}}}}}}, "doc": {"root": {"0": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}, "1": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2, "m": {"docs": {}, "df": 0, "b": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 1}}}, "2": {"5": {"6": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}}}}, "docs": {}, "df": 0}, "docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}, "5": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {"opendal.Capability.write_multi_max_size": {"tf": 1}}, "df": 1}}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}}}, "docs": {"opendal": {"tf": 15.905973720586866}, "opendal.Operator": {"tf": 3.605551275463989}, "opendal.Operator.__init__": {"tf": 1.7320508075688772}, "opendal.Operator.layer": {"tf": 1.4142135623730951}, "opendal.Operator.open": {"tf": 1.7320508075688772}, "opendal.Operator.read": {"tf": 1.7320508075688772}, "opendal.Operator.write": {"tf": 1.7320508075688772}, "opendal.Operator.stat": {"tf": 2.23606797749979}, "opendal.Operator.copy": {"tf": 1.7320508075688772}, "opendal.Operator.rename": {"tf": 1.7320508075688772}, "opendal.Operator.remove_all": {"tf": 1.4142135623730951}, "opendal.Operator.create_dir": {"tf": 4.898979485566356}, "opendal.Operator.delete": {"tf": 3.4641016151377544}, "opendal.Operator.list": {"tf": 1.7320508075688772}, "opendal.Operator.scan": {"tf": 1.7320508075688772}, "opendal.Operator.capability": {"tf": 1.7320508075688772}, "opendal.Operator.to_async_operator": {"tf": 1.7320508075688772}, "opendal.AsyncOperator": {"tf": 3.605551275463989}, "opendal.AsyncOperator.__init__": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.layer": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.open": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.read": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.write": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.stat": {"tf": 2.23606797749979}, "opendal.AsyncOperator.copy": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.rename": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.remove_all": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.create_dir": {"tf": 4.898979485566356}, "opendal.AsyncOperator.delete": {"tf": 3.4641016151377544}, "opendal.AsyncOperator.list": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.scan": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.presign_stat": {"tf": 2.23606797749979}, "opendal.AsyncOperator.presign_read": {"tf": 2.23606797749979}, "opendal.AsyncOperator.presign_write": {"tf": 2.23606797749979}, "opendal.AsyncOperator.capability": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.to_operator": {"tf": 1.7320508075688772}, "opendal.File": {"tf": 1.7320508075688772}, "opendal.File.read": {"tf": 1.7320508075688772}, "opendal.File.write": {"tf": 1.7320508075688772}, "opendal.File.seek": {"tf": 6}, "opendal.File.tell": {"tf": 1.7320508075688772}, "opendal.File.close": {"tf": 1.7320508075688772}, "opendal.AsyncFile": {"tf": 1.7320508075688772}, "opendal.AsyncFile.read": {"tf": 1.7320508075688772}, "opendal.AsyncFile.write": {"tf": 1.7320508075688772}, "opendal.AsyncFile.seek": {"tf": 6}, "opendal.AsyncFile.tell": {"tf": 1.7320508075688772}, "opendal.AsyncFile.close": {"tf": 1.7320508075688772}, "opendal.Entry": {"tf": 1.7320508075688772}, "opendal.Entry.path": {"tf": 1.7320508075688772}, "opendal.EntryMode": {"tf": 1.7320508075688772}, "opendal.EntryMode.is_file": {"tf": 2.23606797749979}, "opendal.EntryMode.is_dir": {"tf": 2.23606797749979}, "opendal.Metadata": {"tf": 1.7320508075688772}, "opendal.Metadata.content_disposition": {"tf": 1.7320508075688772}, "opendal.Metadata.mode": {"tf": 1.7320508075688772}, "opendal.Metadata.content_md5": {"tf": 1.7320508075688772}, "opendal.Metadata.content_length": {"tf": 1.7320508075688772}, "opendal.Metadata.etag": {"tf": 1.7320508075688772}, "opendal.Metadata.content_type": {"tf": 1.7320508075688772}, "opendal.PresignedRequest": {"tf": 1.7320508075688772}, "opendal.PresignedRequest.method": {"tf": 1.7320508075688772}, "opendal.PresignedRequest.url": {"tf": 1.7320508075688772}, "opendal.PresignedRequest.headers": {"tf": 1.7320508075688772}, "opendal.Capability": {"tf": 1.7320508075688772}, "opendal.Capability.stat_with_if_match": {"tf": 1.7320508075688772}, "opendal.Capability.stat_with_if_none_match": {"tf": 1.7320508075688772}, "opendal.Capability.write_can_empty": {"tf": 1.7320508075688772}, "opendal.Capability.list": {"tf": 1.7320508075688772}, "opendal.Capability.presign_read": {"tf": 1.7320508075688772}, "opendal.Capability.write_can_append": {"tf": 1.7320508075688772}, "opendal.Capability.create_dir": {"tf": 1.7320508075688772}, "opendal.Capability.presign": {"tf": 1.7320508075688772}, "opendal.Capability.write_multi_align_size": {"tf": 2.449489742783178}, "opendal.Capability.write_with_cache_control": {"tf": 1.7320508075688772}, "opendal.Capability.list_with_limit": {"tf": 1.7320508075688772}, "opendal.Capability.batch": {"tf": 1.7320508075688772}, "opendal.Capability.write_can_multi": {"tf": 1.7320508075688772}, "opendal.Capability.batch_max_operations": {"tf": 1.7320508075688772}, "opendal.Capability.stat": {"tf": 1.7320508075688772}, "opendal.Capability.read": {"tf": 1.7320508075688772}, "opendal.Capability.write_with_content_type": {"tf": 1.7320508075688772}, "opendal.Capability.read_with_override_cache_control": {"tf": 1.7320508075688772}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1.7320508075688772}, "opendal.Capability.read_with_override_content_type": {"tf": 1.7320508075688772}, "opendal.Capability.rename": {"tf": 1.7320508075688772}, "opendal.Capability.read_can_next": {"tf": 1.7320508075688772}, "opendal.Capability.presign_stat": {"tf": 1.7320508075688772}, "opendal.Capability.write_total_max_size": {"tf": 2.449489742783178}, "opendal.Capability.list_with_start_after": {"tf": 1.7320508075688772}, "opendal.Capability.write": {"tf": 1.7320508075688772}, "opendal.Capability.write_with_content_disposition": {"tf": 1.7320508075688772}, "opendal.Capability.read_with_range": {"tf": 1.7320508075688772}, "opendal.Capability.read_can_seek": {"tf": 1.7320508075688772}, "opendal.Capability.read_with_if_match": {"tf": 1.7320508075688772}, "opendal.Capability.write_multi_max_size": {"tf": 2.449489742783178}, "opendal.Capability.delete": {"tf": 1.7320508075688772}, "opendal.Capability.list_with_recursive": {"tf": 1.7320508075688772}, "opendal.Capability.copy": {"tf": 1.7320508075688772}, "opendal.Capability.write_multi_min_size": {"tf": 2.449489742783178}, "opendal.Capability.presign_write": {"tf": 1.7320508075688772}, "opendal.Capability.read_with_if_none_match": {"tf": 1.7320508075688772}, "opendal.Capability.batch_delete": {"tf": 1.7320508075688772}, "opendal.Capability.blocking": {"tf": 1.7320508075688772}, "opendal.layers": {"tf": 1.7320508075688772}, "opendal.layers.Layer": {"tf": 1.7320508075688772}, "opendal.layers.RetryLayer": {"tf": 1.7320508075688772}, "opendal.layers.RetryLayer.__init__": {"tf": 1.7320508075688772}, "opendal.exceptions": {"tf": 1.7320508075688772}, "opendal.exceptions.Error": {"tf": 1.7320508075688772}, "opendal.exceptions.Unexpected": {"tf": 1.7320508075688772}, "opendal.exceptions.Unsupported": {"tf": 1.7320508075688772}, "opendal.exceptions.ConfigInvalid": {"tf": 1.7320508075688772}, "opendal.exceptions.NotFound": {"tf": 1.7320508075688772}, "opendal.exceptions.PermissionDenied": {"tf": 1.7320508075688772}, "opendal.exceptions.IsADirectory": {"tf": 1.7320508075688772}, "opendal.exceptions.NotADirectory": {"tf": 1.7320508075688772}, "opendal.exceptions.AlreadyExists": {"tf": 1.7320508075688772}, "opendal.exceptions.IsSameFile": {"tf": 1.7320508075688772}, "opendal.exceptions.ConditionNotMatch": {"tf": 1.7320508075688772}, "opendal.exceptions.ContentTruncated": {"tf": 1.7320508075688772}, "opendal.exceptions.ContentIncomplete": {"tf": 1.7320508075688772}, "opendal.exceptions.InvalidInput": {"tf": 1.7320508075688772}}, "df": 123, "a": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 2}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 2}, "opendal.File": {"tf": 1.4142135623730951}, "opendal.AsyncFile": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 10, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {"opendal": {"tf": 1}}, "df": 1, "s": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}}, "df": 2}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability.write_can_append": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {"opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}}, "df": 4, "y": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {"opendal": {"tf": 1.4142135623730951}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncFile": {"tf": 1.4142135623730951}}, "df": 3, "i": {"docs": {}, "df": 0, "o": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1.4142135623730951}}, "df": 2}}}}}}}}}}}}, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}}, "s": {"docs": {"opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 2}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 4}, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1.7320508075688772}}, "df": 1}}}}, "n": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}}, "df": 4, "d": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 4}}, "d": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}}, "df": 2}}, "t": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 3}, "f": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 4}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Capability": {"tf": 1}}, "df": 3}}, "b": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}}}, "o": {"docs": {}, "df": 0, "p": {"docs": {"opendal": {"tf": 2.6457513110645907}}, "df": 1, "e": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}}, "df": 2, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal": {"tf": 2.23606797749979}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 3}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal": {"tf": 1}, "opendal.Operator": {"tf": 1.4142135623730951}, "opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.Entry.path": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}}, "df": 38}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3, "s": {"docs": {"opendal.Capability": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}}, "df": 2}}}}}}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}}, "df": 2}}}}}}, "r": {"docs": {"opendal": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.seek": {"tf": 2}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 2}}, "df": 5}, "n": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}}, "df": 4, "e": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}, "b": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File": {"tf": 1}}, "df": 1}}}}}, "f": {"docs": {"opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}, "opendal.Entry.path": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 10, "f": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File.seek": {"tf": 2.23606797749979}, "opendal.AsyncFile.seek": {"tf": 2.23606797749979}}, "df": 2}}}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}}}}}}, "p": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2, "y": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "p": {"docs": {"opendal": {"tf": 1}}, "df": 1}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1.7320508075688772}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}}, "df": 7}}}}}}, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}}, "df": 2}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.stat": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1.7320508075688772}, "opendal.Operator.delete": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.Entry.path": {"tf": 1.4142135623730951}}, "df": 15}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.File.seek": {"tf": 2}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 2}, "opendal.AsyncFile.tell": {"tf": 1}}, "df": 4}}, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}}}, "b": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Operator": {"tf": 1.4142135623730951}, "opendal.Capability.blocking": {"tf": 1}}, "df": 2}}}}}}}, "y": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}}, "df": 6, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2, "s": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}}, "df": 8}}}}, "e": {"docs": {"opendal.File": {"tf": 1}, "opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}, "opendal.Capability.write_can_multi": {"tf": 1}}, "df": 5, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 3}}}}}, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.batch": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}}, "df": 3}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.create_dir": {"tf": 1.4142135623730951}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1.4142135623730951}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1.4142135623730951}, "opendal.Capability.write_multi_max_size": {"tf": 1.4142135623730951}, "opendal.Capability.write_multi_min_size": {"tf": 1.4142135623730951}, "opendal.exceptions.Error": {"tf": 1}}, "df": 11, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}}}}}}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}}, "df": 6}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2, "d": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}}, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "s": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1.7320508075688772}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.7320508075688772}, "opendal.File.read": {"tf": 1}, "opendal.File.seek": {"tf": 1.7320508075688772}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1.7320508075688772}, "opendal.Entry.path": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 16}, "t": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}, "f": {"docs": {"opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1.4142135623730951}, "opendal.Capability.stat_with_if_none_match": {"tf": 1.4142135623730951}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1.4142135623730951}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1.4142135623730951}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}}, "df": 38}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.Capability": {"tf": 1}}, "df": 3}}, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}}, "df": 2}}}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {"opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 2}}}}, "r": {"docs": {}, "df": 0, "l": {"docs": {"opendal.PresignedRequest.url": {"tf": 1}}, "df": 1}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 4.69041575982343}}, "df": 1}}}}, "f": {"docs": {}, "df": 0, "s": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}, "opendal.exceptions.Error": {"tf": 1}}, "df": 14}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}, "opendal.File": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.EntryMode.is_file": {"tf": 1}}, "df": 9, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}}, "df": 2}}}}}}}, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 2}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1.4142135623730951}, "opendal.Entry.path": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"opendal": {"tf": 1.4142135623730951}, "opendal.Operator.read": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 14, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}}, "df": 5}}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.rename": {"tf": 1}, "opendal.AsyncOperator.rename": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}}, "df": 3}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.remove_all": {"tf": 1}, "opendal.AsyncOperator.remove_all": {"tf": 1}}, "df": 2}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 11, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}, "s": {"docs": {"opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 2}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}}, "df": 2}}}}}}}, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Entry.path": {"tf": 1}}, "df": 3}}}}}}, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Metadata.mode": {"tf": 1}}, "df": 1}}}}}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 3}}}, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}, "s": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 2}}}}}}}, "u": {"docs": {}, "df": 0, "n": {"docs": {"opendal": {"tf": 1}}, "df": 1}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.read_with_range": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 2, "m": {"docs": {}, "df": 0, "p": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 2.23606797749979}}, "df": 1}}}, "x": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 2.23606797749979}}, "df": 1}}, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal": {"tf": 1}, "opendal.Operator": {"tf": 1.4142135623730951}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.read": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.File.seek": {"tf": 2.8284271247461903}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 2.8284271247461903}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1.4142135623730951}}, "df": 23}, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 7}}, "i": {"docs": {}, "df": 0, "s": {"docs": {"opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.url": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}, "opendal.exceptions.Error": {"tf": 1}}, "df": 11}}}, "o": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.7320508075688772}, "opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}, "opendal.Entry.path": {"tf": 1}, "opendal.Capability": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 9, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1.7320508075688772}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}}, "df": 2}}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}, "u": {"docs": {}, "df": 0, "e": {"docs": {"opendal.EntryMode.is_file": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 2}}}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.content_type": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}}, "df": 3}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Capability.write_can_multi": {"tf": 1}}, "df": 1}}}}}, "w": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal": {"tf": 1.4142135623730951}, "opendal.Operator.write": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}, "opendal.File.write": {"tf": 1}, "opendal.AsyncFile.write": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.write_multi_align_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1.7320508075688772}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_multi_min_size": {"tf": 1.7320508075688772}, "opendal.Capability.presign_write": {"tf": 1}}, "df": 18}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}, "k": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}, "n": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 2}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 16, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 3}}}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.read": {"tf": 1}, "opendal.AsyncOperator.read": {"tf": 1}}, "df": 2}}}, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1.7320508075688772}, "opendal.AsyncFile.seek": {"tf": 1.7320508075688772}}, "df": 2}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}}, "df": 2}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "d": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"opendal.PresignedRequest.headers": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "p": {"docs": {"opendal.PresignedRequest.method": {"tf": 1}, "opendal.PresignedRequest.headers": {"tf": 1}}, "df": 2}}}}, "s": {"3": {"docs": {"opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 2}, "docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.Entry.path": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}}, "df": 4, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1}, "opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}}, "df": 6}, "r": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}}, "df": 3}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {"opendal.File.seek": {"tf": 2}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 2}, "opendal.AsyncFile.tell": {"tf": 1}}, "df": 4}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}}, "df": 2}}}}}, "o": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}}, "df": 2}}}}}, "u": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 3, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability": {"tf": 1}}, "df": 1}}, "s": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.presign_read": {"tf": 1}, "opendal.Capability.write_can_append": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}, "opendal.Capability.presign": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.batch": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.stat": {"tf": 1}, "opendal.Capability.read": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.rename": {"tf": 1}, "opendal.Capability.read_can_next": {"tf": 1}, "opendal.Capability.presign_stat": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.write": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}, "opendal.Capability.read_with_range": {"tf": 1}, "opendal.Capability.read_can_seek": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}, "opendal.Capability.presign_write": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}, "opendal.Capability.blocking": {"tf": 1}}, "df": 37}}}}}}}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3, "s": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}}}, "e": {"docs": {}, "df": 0, "k": {"docs": {"opendal.File.seek": {"tf": 2}, "opendal.AsyncFile.seek": {"tf": 2}, "opendal.Capability.read_can_seek": {"tf": 1}}, "df": 3}}, "t": {"docs": {"opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}}, "df": 2}, "r": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 4}}}}}}}, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.read": {"tf": 1.4142135623730951}, "opendal.AsyncFile.read": {"tf": 1.4142135623730951}, "opendal.Capability.write_multi_align_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_total_max_size": {"tf": 1.4142135623730951}, "opendal.Capability.write_multi_max_size": {"tf": 1.4142135623730951}, "opendal.Capability.write_multi_min_size": {"tf": 1.4142135623730951}}, "df": 6}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}, "opendal.Capability.write_can_empty": {"tf": 1}, "opendal.Capability.write_with_content_type": {"tf": 1}, "opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.read_with_override_content_type": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}}, "df": 9}}, "x": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}}, "df": 2}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 2}}}}}, "p": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.copy": {"tf": 1}, "opendal.AsyncOperator.copy": {"tf": 1}, "opendal.Capability.copy": {"tf": 1}}, "df": 3}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1.7320508075688772}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.7320508075688772}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 5}}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.Operator.list": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.File.tell": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}, "opendal.AsyncFile.tell": {"tf": 1}, "opendal.Capability": {"tf": 1}}, "df": 9}}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}, "opendal.Capability.write_with_cache_control": {"tf": 1}, "opendal.Capability.read_with_override_cache_control": {"tf": 1}}, "df": 4}}}, "n": {"docs": {"opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}, "opendal.Capability.write_can_multi": {"tf": 1}}, "df": 3}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Capability": {"tf": 1}}, "df": 1}}}}}}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"opendal.Capability.write_can_multi": {"tf": 1}}, "df": 1}}}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 1}}}}}}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"opendal": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}}, "df": 2}}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}}, "df": 2}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}}, "i": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.open": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}}, "df": 6}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.Capability.list": {"tf": 1}, "opendal.Capability.list_with_limit": {"tf": 1}, "opendal.Capability.list_with_start_after": {"tf": 1}, "opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 8}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.list_with_limit": {"tf": 1}}, "df": 1}}}}}, "d": {"1": {"docs": {"opendal.Capability.write_total_max_size": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {"opendal": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}}, "df": 2}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Operator.delete": {"tf": 1.4142135623730951}, "opendal.AsyncOperator.delete": {"tf": 1.4142135623730951}, "opendal.Capability.delete": {"tf": 1}, "opendal.Capability.batch_delete": {"tf": 1}}, "df": 4}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Capability.list_with_recursive": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1.7320508075688772}, "opendal.Operator.list": {"tf": 1}, "opendal.Operator.scan": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1.7320508075688772}, "opendal.AsyncOperator.list": {"tf": 1}, "opendal.AsyncOperator.scan": {"tf": 1}, "opendal.Capability.create_dir": {"tf": 1}}, "df": 7, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}}, "df": 2}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.EntryMode.is_dir": {"tf": 1}}, "df": 3}}}}}}}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.read_with_override_content_disposition": {"tf": 1}, "opendal.Capability.write_with_content_disposition": {"tf": 1}}, "df": 2}}}}}}}}}}, "o": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal": {"tf": 1.4142135623730951}}, "df": 1}}, "y": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 4}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"opendal.File": {"tf": 1}, "opendal.AsyncFile": {"tf": 1}}, "df": 2}}}}}, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"opendal.Capability.stat_with_if_match": {"tf": 1}, "opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 4}}}, "x": {"docs": {"opendal.Capability.batch_max_operations": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_multi_max_size": {"tf": 1.7320508075688772}}, "df": 3}}, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}}, "df": 2}}}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"opendal.PresignedRequest.method": {"tf": 1}}, "df": 1}}}}}, "k": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Metadata.mode": {"tf": 1.4142135623730951}}, "df": 1}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}, "d": {"5": {"docs": {"opendal.Metadata.content_md5": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_can_multi": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1.7320508075688772}, "opendal.Capability.write_multi_min_size": {"tf": 1.7320508075688772}}, "df": 4}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1.4142135623730951}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.Entry.path": {"tf": 1}, "opendal.Metadata.mode": {"tf": 1}, "opendal.Metadata.content_md5": {"tf": 1}, "opendal.Metadata.content_length": {"tf": 1}, "opendal.Metadata.etag": {"tf": 1}, "opendal.Metadata.content_type": {"tf": 1}}, "df": 8}}}, "d": {"docs": {"opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}}, "df": 2}}, "x": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Operator.layer": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 6}}}}}}, "p": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3, "s": {"docs": {"opendal.AsyncOperator.presign_stat": {"tf": 1}, "opendal.AsyncOperator.presign_read": {"tf": 1}, "opendal.AsyncOperator.presign_write": {"tf": 1}}, "df": 3}}}}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}, "opendal.Capability.write_total_max_size": {"tf": 1}, "opendal.Capability.write_multi_max_size": {"tf": 1}, "opendal.Capability.write_multi_min_size": {"tf": 1}}, "df": 4}}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"opendal.exceptions.Error": {"tf": 1}}, "df": 1}}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 4, "s": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 2}}}}}, "o": {"docs": {}, "df": 0, "f": {"docs": {"opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 2}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {"opendal.Metadata.etag": {"tf": 1}}, "df": 1}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Capability.write_can_empty": {"tf": 1}}, "df": 1}}}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "w": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.layer": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.layer": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 6}, "g": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1.4142135623730951}, "opendal.AsyncFile.seek": {"tf": 1.4142135623730951}}, "df": 2}}}}}}, "x": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Capability.read_can_next": {"tf": 1}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}}, "df": 4, "e": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}}, "df": 4}}, "a": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"opendal.Operator.create_dir": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}}, "df": 2}}}}}}}}}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.stat_with_if_none_match": {"tf": 1}, "opendal.Capability.read_with_if_none_match": {"tf": 1}}, "df": 2}}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.Operator.open": {"tf": 1}, "opendal.Operator.write": {"tf": 1}, "opendal.Operator.create_dir": {"tf": 1}, "opendal.Operator.delete": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}, "opendal.AsyncOperator.open": {"tf": 1}, "opendal.AsyncOperator.write": {"tf": 1}, "opendal.AsyncOperator.create_dir": {"tf": 1}, "opendal.AsyncOperator.delete": {"tf": 1}, "opendal.File.read": {"tf": 1}, "opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.read": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 14}}}}, "e": {"docs": {}, "df": 0, "t": {"docs": {"opendal.Operator.stat": {"tf": 1}, "opendal.AsyncOperator.stat": {"tf": 1}}, "df": 2}}, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}}}}}, "c": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Capability.write_multi_align_size": {"tf": 1}}, "df": 1}}}, "k": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "s": {"docs": {"opendal.Operator": {"tf": 1}, "opendal.AsyncOperator": {"tf": 1}}, "df": 2}}}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2, "s": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}, "z": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {"opendal.File.seek": {"tf": 1}, "opendal.AsyncFile.seek": {"tf": 1}}, "df": 2}}}}}}}, "pipeline": ["trimmer"], "_isPrebuiltIndex": true}; // mirrored in build-search-index.js (part 1) // Also split on html tags. this is a cheap heuristic, but good enough. diff --git a/docs/quickstart/index.html b/docs/quickstart/index.html index c0483ee21603..dab4d6ba7e63 100644 --- a/docs/quickstart/index.html +++ b/docs/quickstart/index.html @@ -5,13 +5,13 @@ Quickstart | Apache OpenDAL™ - +
    -

    Quickstart

    Apache OpenDAL™ can be easily integrated into different software with its Rust core and multilingual bindings.

    Rust core

    OpenDAL's core is implemented in Rust programming language. The most convenient way to use OpenDAL in your Rust program add the OpenDAL Cargo crate as a dependency.

    Install

    Run the following Cargo command in your project directory:

    cargo add opendal

    Or add the following line to your Cargo.toml:

    opendal = "0.40.0"

    Demo

    Try it out:

    use opendal::Result;
    use opendal::layers::LoggingLayer;
    use opendal::services;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Pick a builder and configure it.
    let mut builder = services::S3::default();
    builder.bucket("test");

    // Init an operator
    let op = Operator::new(builder)?
    // Init with logging layer enabled.
    .layer(LoggingLayer::default())
    .finish();

    // Write data
    op.write("hello.txt", "Hello, World!").await?;

    // Read data
    let bs = op.read("hello.txt").await?;

    // Fetch metadata
    let meta = op.stat("hello.txt").await?;
    let mode = meta.mode();
    let length = meta.content_length();

    // Delete
    op.delete("hello.txt").await?;

    Ok(())
    }

    Java binding

    OpenDAL's Java binding is released to Maven central as org.apache.opendal:opendal-java:${version}.

    Install

    Maven

    Generally, you can first add the os-maven-plugin for automatically detect the classifier based on your platform:

    <build>
    <extensions>
    <extension>
    <groupId>kr.motd.maven</groupId>
    <artifactId>os-maven-plugin</artifactId>
    <version>1.7.0</version>
    </extension>
    </extensions>
    </build>

    Then add the dependency to opendal-java as following:

    <dependencies>
    <dependency>
    <groupId>org.apache.opendal</groupId>
    <artifactId>opendal-java</artifactId>
    <version>${opendal.version}</version>
    </dependency>
    <dependency>
    <groupId>org.apache.opendal</groupId>
    <artifactId>opendal-java</artifactId>
    <version>${opendal.version}</version>
    <classifier>${os.detected.classifier}</classifier>
    </dependency>
    </dependencies>

    Gradle

    For Gradle, you can first add the com.google.osdetector for automatically detect the classifier based on your platform:

    plugins {
    id "com.google.osdetector" version "1.7.3"
    }

    Then add the dependency to opendal-java as following:

    dependencies {
    implementation "org.apache.opendal:opendal-java:$opendal.version"
    implementation "org.apache.opendal:opendal-java:$opendal.version:$osdetector.classifier"
    }

    Classified library

    For details in specifying classified library, read the dedicated explanation.

    Demo

    Try it out:

    // Configure service
    final Map<String, String> conf = new HashMap<>();
    conf.put("root", "/tmp");
    // Construct operator
    final Operator op = Operator.of("fs", conf);
    // Write data
    op.write("hello.txt", "Hello, World!").join();
    // Read data
    final byte[] bs = op.read("hello.txt").join();
    // Delete
    op.delete("hello.txt").join();

    Python binding

    OpenDAL's Python binding is released to PyPI repository as opendal.

    Install

    Run the following command to install opendal:

    pip install opendal

    Demo

    Try it out:

    import opendal
    import asyncio

    async def main():
    op = opendal.AsyncOperator("fs", root="/tmp")
    await op.write("test.txt", b"Hello World")
    print(await op.read("test.txt"))

    asyncio.run(main())

    Node.js binding

    OpenDAL's Python binding is released to npm registry as opendal.

    Install

    Run the following command to install opendal:

    npm install opendal

    Demo

    Try it out:

    import { Operator } from "opendal";

    async function main() {
    const op = new Operator("fs", { root: "/tmp" });
    await op.write("test", "Hello, World!");
    const bs = await op.read("test");
    console.log(new TextDecoder().decode(bs));
    const meta = await op.stat("test");
    console.log(`contentLength: ${meta.contentLength}`);
    }
    - +

    Quickstart

    Apache OpenDAL™ can be easily integrated into different software with its Rust core and multilingual bindings.

    Rust core

    OpenDAL's core is implemented in Rust programming language. The most convenient way to use OpenDAL in your Rust program add the OpenDAL Cargo crate as a dependency.

    Install

    Run the following Cargo command in your project directory:

    cargo add opendal

    Or add the following line to your Cargo.toml:

    opendal = "0.40.0"

    Demo

    Try it out:

    use opendal::Result;
    use opendal::layers::LoggingLayer;
    use opendal::services;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Pick a builder and configure it.
    let mut builder = services::S3::default();
    builder.bucket("test");

    // Init an operator
    let op = Operator::new(builder)?
    // Init with logging layer enabled.
    .layer(LoggingLayer::default())
    .finish();

    // Write data
    op.write("hello.txt", "Hello, World!").await?;

    // Read data
    let bs = op.read("hello.txt").await?;

    // Fetch metadata
    let meta = op.stat("hello.txt").await?;
    let mode = meta.mode();
    let length = meta.content_length();

    // Delete
    op.delete("hello.txt").await?;

    Ok(())
    }

    Java binding

    OpenDAL's Java binding is released to Maven central as org.apache.opendal:opendal-java:${version}.

    Install

    Maven

    Generally, you can first add the os-maven-plugin for automatically detect the classifier based on your platform:

    <build>
    <extensions>
    <extension>
    <groupId>kr.motd.maven</groupId>
    <artifactId>os-maven-plugin</artifactId>
    <version>1.7.0</version>
    </extension>
    </extensions>
    </build>

    Then add the dependency to opendal-java as following:

    <dependencies>
    <dependency>
    <groupId>org.apache.opendal</groupId>
    <artifactId>opendal-java</artifactId>
    <version>${opendal.version}</version>
    </dependency>
    <dependency>
    <groupId>org.apache.opendal</groupId>
    <artifactId>opendal-java</artifactId>
    <version>${opendal.version}</version>
    <classifier>${os.detected.classifier}</classifier>
    </dependency>
    </dependencies>

    Gradle

    For Gradle, you can first add the com.google.osdetector for automatically detect the classifier based on your platform:

    plugins {
    id "com.google.osdetector" version "1.7.3"
    }

    Then add the dependency to opendal-java as following:

    dependencies {
    implementation "org.apache.opendal:opendal-java:$opendal.version"
    implementation "org.apache.opendal:opendal-java:$opendal.version:$osdetector.classifier"
    }

    Classified library

    For details in specifying classified library, read the dedicated explanation.

    Demo

    Try it out:

    // Configure service
    final Map<String, String> conf = new HashMap<>();
    conf.put("root", "/tmp");
    // Construct operator
    final Operator op = Operator.of("fs", conf);
    // Write data
    op.write("hello.txt", "Hello, World!").join();
    // Read data
    final byte[] bs = op.read("hello.txt").join();
    // Delete
    op.delete("hello.txt").join();

    Python binding

    OpenDAL's Python binding is released to PyPI repository as opendal.

    Install

    Run the following command to install opendal:

    pip install opendal

    Demo

    Try it out:

    import opendal
    import asyncio

    async def main():
    op = opendal.AsyncOperator("fs", root="/tmp")
    await op.write("test.txt", b"Hello World")
    print(await op.read("test.txt"))

    asyncio.run(main())

    Node.js binding

    OpenDAL's Python binding is released to npm registry as opendal.

    Install

    Run the following command to install opendal:

    npm install opendal

    Demo

    Try it out:

    import { Operator } from "opendal";

    async function main() {
    const op = new Operator("fs", { root: "/tmp" });
    await op.write("test", "Hello, World!");
    const bs = await op.read("test");
    console.log(new TextDecoder().decode(bs));
    const meta = await op.stat("test");
    console.log(`contentLength: ${meta.contentLength}`);
    }
    + \ No newline at end of file diff --git a/docs/rust/opendal/services/index.html b/docs/rust/opendal/services/index.html index 965f76f1e135..6fcacb2309d0 100644 --- a/docs/rust/opendal/services/index.html +++ b/docs/rust/opendal/services/index.html @@ -5,7 +5,8 @@ Config for Atomicserver services support
  • Azblobservices-azblob
    Capabilities
  • AzblobConfigservices-azblob
    Azure Storage Blob services support.
  • Azdlsservices-azdls
    Azure Data Lake Storage Gen2 Support. As known as abfs, azdls or azdls.
  • Azfileservices-azfile
    Azure File services support.
  • B2services-b2
    b2 services support.
  • B2Configservices-b2
    Config for backblaze b2 services support.
  • Cacacheservices-cacache
    cacache service support.
  • Chainsafeservices-chainsafe
    chainsafe services support.
  • ChainsafeConfigservices-chainsafe
    Config for backblaze Chainsafe services support.
  • CloudflareKvservices-cloudflare-kv
    Capabilities
  • Cosservices-cos
    Tencent-Cloud COS services support.
  • D1services-d1
    Capabilities
  • D1Configservices-d1
    Config for Cloudflare D1 backend support.
  • Dashmapservices-dashmap
    dashmap backend support.
  • Dbfsservices-dbfs
    Dbfs’s REST API support. This service will visit the DBFS API supported by Databricks File System.
  • Dropboxservices-dropbox
    Dropbox backend support.
  • DropboxConfigservices-dropbox
    Config for Dropbox backend support.
  • Etcdservices-etcd
    Etcd services support.
  • EtcdConfigservices-etcd
    Config for Etcd services support.
  • Foundationdbservices-foundationdb
    foundationdb service support.
  • Fsservices-fs
    POSIX file system support.
  • Ftpservices-ftp
    FTP and FTPS services support.
  • FtpConfigservices-ftp
    Config for Ftpservices support.
  • Gcsservices-gcs
    Google Cloud Storage services support.
  • GcsConfigservices-gcs
    Google Cloud Storage services support.
  • Gdriveservices-gdrive
    GoogleDrive backend support.
  • Ghacservices-ghac
    GitHub Action Cache Services support.
  • Gridfsservices-gridfs
    Capabilities
  • Hdfsservices-hdfs
    A distributed file system that provides high-throughput access to application data.
  • HdfsConfigservices-hdfs
    Hadoop Distributed File System (HDFS™) support. -Config for Hdfs services support.
  • HdfsNativeservices-hdfs-native
    A distributed file system that provides high-throughput access to application data.
  • HdfsNativeConfigservices-hdfs-native
    Hadoop Distributed File System (HDFS™) support. +Config for Hdfs services support.
  • HdfsNativeservices-hdfs-native
    A distributed file system that provides high-throughput access to application data. +Using Native Rust HDFS client.
  • HdfsNativeConfigservices-hdfs-native
    Hadoop Distributed File System (HDFS™) support. Using Native Rust HDFS client. Config for HdfsNative services support.
  • Httpservices-http
    HTTP Read-only service support like Nginx and Caddy.
  • HttpConfigservices-http
    Config for Http service support.
  • Huggingfaceservices-huggingface
    Huggingface’s API support. This service will visit the Huggingface API to access the Huggingface File System. diff --git a/docs/rust/opendal/services/struct.HdfsNative.html b/docs/rust/opendal/services/struct.HdfsNative.html index 8ac3245295ef..423874b36153 100644 --- a/docs/rust/opendal/services/struct.HdfsNative.html +++ b/docs/rust/opendal/services/struct.HdfsNative.html @@ -1,5 +1,40 @@ -HdfsNative in opendal::services - Rust -
    pub struct HdfsNative { /* private fields */ }
    Available on crate feature services-hdfs-native only.
    Expand description

    A distributed file system that provides high-throughput access to application data.

    +HdfsNative in opendal::services - Rust +
    pub struct HdfsNative { /* private fields */ }
    Available on crate feature services-hdfs-native only.
    Expand description

    A distributed file system that provides high-throughput access to application data. +Using Native Rust HDFS client.

    +

    Capabilities

    +

    This service can be used to:

    +
      +
    • +stat
    • +
    • +read
    • +
    • +write
    • +
    • +create_dir
    • +
    • +delete
    • +
    • +rename
    • +
    • +list
    • +
    • +blocking
    • +
    • +append
    • +
    +

    Differences with webhdfs

    +

    Webhdfs is powered by hdfs’s RESTful HTTP API.

    +

    Differences with hdfs

    +

    hdfs is powered by libhdfs and require the Java dependencies

    +

    Features

    +

    HDFS-native support needs to enable feature services-hdfs-native.

    +

    Configuration

    +
      +
    • root: Set the work dir for backend.
    • +
    • url: Set the url for backend.
    • +
    • enable_append: enable the append capacity. Default is false.
    • +

    Implementations§

    source§

    impl HdfsNativeBuilder

    source

    pub fn root(&mut self, root: &str) -> &mut Self

    Set root of this backend.

    All operations will happen under this root.

    source

    pub fn url(&mut self, url: &str) -> &mut Self

    Set url of this backend.

    diff --git a/docs/rust/src/opendal/services/hdfs_native/backend.rs.html b/docs/rust/src/opendal/services/hdfs_native/backend.rs.html index bbf8253ca784..16da5dfe5a0c 100644 --- a/docs/rust/src/opendal/services/hdfs_native/backend.rs.html +++ b/docs/rust/src/opendal/services/hdfs_native/backend.rs.html @@ -242,6 +242,61 @@

    Files

    240 241 242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297
    // 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
    @@ -375,7 +430,7 @@ 

    Files

    Some(v) => v, None => { return Err(Error::new(ErrorKind::ConfigInvalid, "url is empty") - .with_context("service", Scheme::HdfsNative)) + .with_context("service", Scheme::HdfsNative)); } }; @@ -425,7 +480,30 @@

    Files

    type BlockingLister = (); fn info(&self) -> AccessorInfo { - todo!() + let mut am = AccessorInfo::default(); + am.set_scheme(Scheme::HdfsNative) + .set_root(&self.root) + .set_native_capability(Capability { + stat: true, + + read: true, + read_can_seek: true, + + write: true, + write_can_append: self._enable_append, + + create_dir: true, + delete: true, + + list: true, + + rename: true, + blocking: true, + + ..Default::default() + }); + + am } async fn create_dir(&self, path: &str, _args: OpCreateDir) -> Result<RpCreateDir> { @@ -462,20 +540,52 @@

    Files

    Ok((RpWrite::new(), w)) } - async fn copy(&self, _from: &str, _to: &str, _args: OpCopy) -> Result<RpCopy> { - todo!() - } + async fn rename(&self, from: &str, to: &str, _args: OpRename) -> Result<RpRename> { + let from_path = build_rooted_abs_path(&self.root, from); + let to_path = build_rooted_abs_path(&self.root, to); - async fn rename(&self, _from: &str, _to: &str, _args: OpRename) -> Result<RpRename> { - todo!() + self.client + .rename(&from_path, &to_path, false) + .await + .map_err(parse_hdfs_error)?; + + Ok(RpRename::default()) } - async fn stat(&self, _path: &str, _args: OpStat) -> Result<RpStat> { - todo!() + async fn stat(&self, path: &str, _args: OpStat) -> Result<RpStat> { + let p = build_rooted_abs_path(&self.root, path); + + let status: hdfs_native::client::FileStatus = self + .client + .get_file_info(&p) + .await + .map_err(parse_hdfs_error)?; + + let mode = if status.isdir { + EntryMode::DIR + } else { + EntryMode::FILE + }; + + let mut metadata = Metadata::new(mode); + metadata + .set_last_modified(parse_datetime_from_from_timestamp_millis( + status.modification_time as i64, + )?) + .set_content_length(status.length as u64); + + Ok(RpStat::new(metadata)) } - async fn delete(&self, _path: &str, _args: OpDelete) -> Result<RpDelete> { - todo!() + async fn delete(&self, path: &str, _args: OpDelete) -> Result<RpDelete> { + let p = build_rooted_abs_path(&self.root, path); + + self.client + .delete(&p, true) + .await + .map_err(parse_hdfs_error)?; + + Ok(RpDelete::default()) } async fn list(&self, path: &str, _args: OpList) -> Result<(RpList, Self::Lister)> { diff --git a/docs/services/atomicserver/index.html b/docs/services/atomicserver/index.html index c8997972a8ae..d4c492299568 100644 --- a/docs/services/atomicserver/index.html +++ b/docs/services/atomicserver/index.html @@ -5,13 +5,13 @@ AtomicServer | Apache OpenDAL™ - +
    -

    AtomicServer

    Atomic-Server services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • endpoint: Set the server address for Atomicserver
    • private_key: Set the private key for agent used for Atomicserver
    • public_key: Set the public key for agent used for Atomicserver
    • parent_resource_id: Set the parent resource id (url) that Atomicserver uses to store resources under

    You can refer to [AtomicserverBuilder]'s docs for more information.

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Atomicserver;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Atomicserver::default();

    // Set the server address for Atomicserver
    builder.endpoint("http://localhost:9883");
    // Set the public/private key for agent for Atomicserver
    builder.private_key("<private_key>");
    builder.public_key("<public_key>");
    // Set the parent resource id for Atomicserver. In this case
    // We are using the root resource (Drive)
    builder.parent_resource_id("http://localhost:9883");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    AtomicServer

    Atomic-Server services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • endpoint: Set the server address for Atomicserver
    • private_key: Set the private key for agent used for Atomicserver
    • public_key: Set the public key for agent used for Atomicserver
    • parent_resource_id: Set the parent resource id (url) that Atomicserver uses to store resources under

    You can refer to [AtomicserverBuilder]'s docs for more information.

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Atomicserver;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Atomicserver::default();

    // Set the server address for Atomicserver
    builder.endpoint("http://localhost:9883");
    // Set the public/private key for agent for Atomicserver
    builder.private_key("<private_key>");
    builder.public_key("<public_key>");
    // Set the parent resource id for Atomicserver. In this case
    // We are using the root resource (Drive)
    builder.parent_resource_id("http://localhost:9883");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/azblob/index.html b/docs/services/azblob/index.html index c5bfb8ec2314..5baf8593b62f 100644 --- a/docs/services/azblob/index.html +++ b/docs/services/azblob/index.html @@ -5,13 +5,13 @@ Azblob | Apache OpenDAL™ - +
    -

    Azblob

    Azure Storage Blob services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • append
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work dir for backend.
    • container: Set the container name for backend.
    • endpoint: Set the endpoint for backend.
    • account_name: Set the account_name for backend.
    • account_key: Set the account_key for backend.

    Refer to public API docs for more information.

    Examples

    This example works on Azurite for local developments.

    Start local blob service

    docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite
    az storage container create --name test --connection-string "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"

    Init OpenDAL Operator

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Azblob;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create azblob backend builder.
    let mut builder = Azblob::default();
    // Set the root for azblob, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/path/to/dir");
    // Set the container name, this is required.
    builder.container("test");
    // Set the endpoint, this is required.
    //
    // For examples:
    // - "http://127.0.0.1:10000/devstoreaccount1"
    // - "https://accountname.blob.core.windows.net"
    builder.endpoint("http://127.0.0.1:10000/devstoreaccount1");
    // Set the account_name and account_key.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.account_name("devstoreaccount1");
    builder.account_key("Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==");

    // `Accessor` provides the low level APIs, we will use `Operator` normally.
    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Azblob

    Azure Storage Blob services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • append
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work dir for backend.
    • container: Set the container name for backend.
    • endpoint: Set the endpoint for backend.
    • account_name: Set the account_name for backend.
    • account_key: Set the account_key for backend.

    Refer to public API docs for more information.

    Examples

    This example works on Azurite for local developments.

    Start local blob service

    docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite
    az storage container create --name test --connection-string "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"

    Init OpenDAL Operator

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Azblob;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create azblob backend builder.
    let mut builder = Azblob::default();
    // Set the root for azblob, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/path/to/dir");
    // Set the container name, this is required.
    builder.container("test");
    // Set the endpoint, this is required.
    //
    // For examples:
    // - "http://127.0.0.1:10000/devstoreaccount1"
    // - "https://accountname.blob.core.windows.net"
    builder.endpoint("http://127.0.0.1:10000/devstoreaccount1");
    // Set the account_name and account_key.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.account_name("devstoreaccount1");
    builder.account_key("Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==");

    // `Accessor` provides the low level APIs, we will use `Operator` normally.
    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/azdls/index.html b/docs/services/azdls/index.html index 6bec020cb349..7b719264b9f6 100644 --- a/docs/services/azdls/index.html +++ b/docs/services/azdls/index.html @@ -5,13 +5,13 @@ Azdls | Apache OpenDAL™ - +
    -

    Azdls

    Azure Data Lake Storage Gen2 Support.

    As known as abfs, azdls or azdls.

    This service will visit the ABFS URI supported by Azure Data Lake Storage Gen2.

    Notes

    azdls is different from azfile service which used to visit Azure File Storage.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work dir for backend.
    • filesystem: Set the filesystem name for backend.
    • endpoint: Set the endpoint for backend.
    • account_name: Set the account_name for backend.
    • account_key: Set the account_key for backend.

    Refer to public API docs for more information.

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Azdls;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create azdls backend builder.
    let mut builder = Azdls::default();
    // Set the root for azdls, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/path/to/dir");
    // Set the filesystem name, this is required.
    builder.filesystem("test");
    // Set the endpoint, this is required.
    //
    // For examples:
    // - "https://accountname.dfs.core.windows.net"
    builder.endpoint("https://accountname.dfs.core.windows.net");
    // Set the account_name and account_key.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.account_name("account_name");
    builder.account_key("account_key");

    // `Accessor` provides the low level APIs, we will use `Operator` normally.
    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Azdls

    Azure Data Lake Storage Gen2 Support.

    As known as abfs, azdls or azdls.

    This service will visit the ABFS URI supported by Azure Data Lake Storage Gen2.

    Notes

    azdls is different from azfile service which used to visit Azure File Storage.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work dir for backend.
    • filesystem: Set the filesystem name for backend.
    • endpoint: Set the endpoint for backend.
    • account_name: Set the account_name for backend.
    • account_key: Set the account_key for backend.

    Refer to public API docs for more information.

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Azdls;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create azdls backend builder.
    let mut builder = Azdls::default();
    // Set the root for azdls, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/path/to/dir");
    // Set the filesystem name, this is required.
    builder.filesystem("test");
    // Set the endpoint, this is required.
    //
    // For examples:
    // - "https://accountname.dfs.core.windows.net"
    builder.endpoint("https://accountname.dfs.core.windows.net");
    // Set the account_name and account_key.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.account_name("account_name");
    builder.account_key("account_key");

    // `Accessor` provides the low level APIs, we will use `Operator` normally.
    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
  • + \ No newline at end of file diff --git a/docs/services/cacache/index.html b/docs/services/cacache/index.html index 511939a1c3c4..3c9ed5c1b23c 100644 --- a/docs/services/cacache/index.html +++ b/docs/services/cacache/index.html @@ -5,13 +5,13 @@ Cacache | Apache OpenDAL™ - +
    -

    Cacache

    Cacache services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • datadir: Set the path to the cacache data directory

    You can refer to [CacacheBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Cacache;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Cacache::default();
    builder.datadir("/tmp/opendal/cacache");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Cacache

    Cacache services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • datadir: Set the path to the cacache data directory

    You can refer to [CacacheBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Cacache;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Cacache::default();
    builder.datadir("/tmp/opendal/cacache");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/cos/index.html b/docs/services/cos/index.html index 615801aa81cc..ea46d22ed0c3 100644 --- a/docs/services/cos/index.html +++ b/docs/services/cos/index.html @@ -5,13 +5,13 @@ COS | Apache OpenDAL™ - +
    -

    COS

    Huawei Cloud COS services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work directory for backend
    • bucket: Set the container name for backend
    • endpoint: Customizable endpoint setting
    • access_key_id: Set the access_key_id for backend.
    • secret_access_key: Set the secret_access_key for backend.

    You can refer to [CosBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Cos;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Cos::default();

    // set the storage bucket for OpenDAL
    builder.bucket("test");
    // set the endpoint for OpenDAL
    builder.endpoint("https://cos.ap-singapore.myqcloud.com");
    // Set the access_key_id and secret_access_key.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.secret_id("secret_id");
    builder.secret_key("secret_access_key");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +

    COS

    Huawei Cloud COS services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work directory for backend
    • bucket: Set the container name for backend
    • endpoint: Customizable endpoint setting
    • access_key_id: Set the access_key_id for backend.
    • secret_access_key: Set the secret_access_key for backend.

    You can refer to [CosBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Cos;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Cos::default();

    // set the storage bucket for OpenDAL
    builder.bucket("test");
    // set the endpoint for OpenDAL
    builder.endpoint("https://cos.ap-singapore.myqcloud.com");
    // Set the access_key_id and secret_access_key.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.secret_id("secret_id");
    builder.secret_key("secret_access_key");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/d1/index.html b/docs/services/d1/index.html index 4353a3d0de8e..5cc3c3ecfc2b 100644 --- a/docs/services/d1/index.html +++ b/docs/services/d1/index.html @@ -5,13 +5,13 @@ D1 | Apache OpenDAL™ - +
    -

    D1

    D1 services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • token: Set the token of cloudflare api
    • account_id: Set the account id of cloudflare api
    • database_id: Set the database id of cloudflare api
    • table: Set the table of D1 Database
    • key_field: Set the key field of D1 Database
    • value_field: Set the value field of D1 Database

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::D1;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = D1::default();
    builder
    .token("token")
    .account_id("account_id")
    .database_id("database_id")
    .table("table")
    .key_field("key_field")
    .value_field("value_field");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    D1

    D1 services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • token: Set the token of cloudflare api
    • account_id: Set the account id of cloudflare api
    • database_id: Set the database id of cloudflare api
    • table: Set the table of D1 Database
    • key_field: Set the key field of D1 Database
    • value_field: Set the value field of D1 Database

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::D1;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = D1::default();
    builder
    .token("token")
    .account_id("account_id")
    .database_id("database_id")
    .table("table")
    .key_field("key_field")
    .value_field("value_field");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/dashmap/index.html b/docs/services/dashmap/index.html index 35de005a0922..5a92bb6c527d 100644 --- a/docs/services/dashmap/index.html +++ b/docs/services/dashmap/index.html @@ -5,13 +5,13 @@ DashMap | Apache OpenDAL™ - +
    -
    - +
    + \ No newline at end of file diff --git a/docs/services/dropbox/index.html b/docs/services/dropbox/index.html index 4a5605a1a3c9..12abc8e19026 100644 --- a/docs/services/dropbox/index.html +++ b/docs/services/dropbox/index.html @@ -5,7 +5,7 @@ Dropbox | Apache OpenDAL™ - + @@ -15,8 +15,8 @@ please provide the following fields:

    • refresh_token: set the refresh_token for dropbox api
    • client_id: set the client_id for dropbox api
    • client_secret: set the client_secret for dropbox api

    OpenDAL is a library, it cannot do the first step of OAuth2 for you. You need to get authorization code from user by calling Dropbox's authorize url and exchange it for refresh token.

    Please refer to Dropbox OAuth2 Guide -for more information.

    You can refer to [DropboxBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::raw::OpWrite;
    use opendal::services::Dropbox;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Dropbox::default();
    builder.root("/opendal");
    builder.access_token("<token>");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +for more information.

    You can refer to [DropboxBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::raw::OpWrite;
    use opendal::services::Dropbox;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Dropbox::default();
    builder.root("/opendal");
    builder.access_token("<token>");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/etcd/index.html b/docs/services/etcd/index.html index e35249e61b45..c3d68ce33748 100644 --- a/docs/services/etcd/index.html +++ b/docs/services/etcd/index.html @@ -5,13 +5,13 @@ Etcd | Apache OpenDAL™ - +
    -

    Etcd

    Etcd services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • endpoints: Set the network address of etcd servers
    • username: Set the username of Etcd
    • password: Set the password for authentication
    • ca_path: Set the ca path to the etcd connection
    • cert_path: Set the cert path to the etcd connection
    • key_path: Set the key path to the etcd connection

    You can refer to [EtcdBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Etcd;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Etcd::default();

    // this will build a Operator accessing etcd which runs on http://127.0.0.1:2379
    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Etcd

    Etcd services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • endpoints: Set the network address of etcd servers
    • username: Set the username of Etcd
    • password: Set the password for authentication
    • ca_path: Set the ca path to the etcd connection
    • cert_path: Set the cert path to the etcd connection
    • key_path: Set the key path to the etcd connection

    You can refer to [EtcdBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Etcd;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Etcd::default();

    // this will build a Operator accessing etcd which runs on http://127.0.0.1:2379
    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/foundationdb/index.html b/docs/services/foundationdb/index.html index 7cc0dd613265..54c65bd5b798 100644 --- a/docs/services/foundationdb/index.html +++ b/docs/services/foundationdb/index.html @@ -5,13 +5,13 @@ FoundationDB | Apache OpenDAL™ - +
    -

    FoundationDB

    FoundationDB services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Note: As for Known Limitations - FoundationDB, keys cannot exceed 10,000 bytes in size, and values cannot exceed 100,000 bytes in size. Errors will be raised by OpenDAL if these limits are exceeded.

    Configuration

    • root: Set the work directory for this backend.
    • config_path: Set the configuration path for foundationdb. If not provided, the default configuration path will be used.

    You can refer to [FoundationdbBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Foundationdb;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Foundationdb::default();
    builder.config_path("/etc/foundationdb/foundationdb.conf");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    FoundationDB

    FoundationDB services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Note: As for Known Limitations - FoundationDB, keys cannot exceed 10,000 bytes in size, and values cannot exceed 100,000 bytes in size. Errors will be raised by OpenDAL if these limits are exceeded.

    Configuration

    • root: Set the work directory for this backend.
    • config_path: Set the configuration path for foundationdb. If not provided, the default configuration path will be used.

    You can refer to [FoundationdbBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Foundationdb;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Foundationdb::default();
    builder.config_path("/etc/foundationdb/foundationdb.conf");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/fs/index.html b/docs/services/fs/index.html index 3ba32a0ae0e8..496ebf0b8565 100644 --- a/docs/services/fs/index.html +++ b/docs/services/fs/index.html @@ -5,13 +5,13 @@ Fs | Apache OpenDAL™ - +
    -

    Fs

    POSIX file system support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • append
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work dir for backend.
    • You can refer to [FsBuilder]'s docs for more information

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Fs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create fs backend builder.
    let mut builder = Fs::default();
    // Set the root for fs, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/tmp");

    // `Accessor` provides the low level APIs, we will use `Operator` normally.
    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Fs

    POSIX file system support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • append
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work dir for backend.
    • You can refer to [FsBuilder]'s docs for more information

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Fs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create fs backend builder.
    let mut builder = Fs::default();
    // Set the root for fs, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/tmp");

    // `Accessor` provides the low level APIs, we will use `Operator` normally.
    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/ftp/index.html b/docs/services/ftp/index.html index 6bfd0ca32809..69b0058401b2 100644 --- a/docs/services/ftp/index.html +++ b/docs/services/ftp/index.html @@ -5,13 +5,13 @@ FTP | Apache OpenDAL™ - +
    -

    FTP

    FTP and FTPS services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • endpoint: Set the endpoint for connection
    • root: Set the work directory for backend
    • user: Set the login user
    • password: Set the login password

    You can refer to [FtpBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Ftp;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Ftp::default();

    builder.endpoint("127.0.0.1");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    FTP

    FTP and FTPS services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • endpoint: Set the endpoint for connection
    • root: Set the work directory for backend
    • user: Set the login user
    • password: Set the login password

    You can refer to [FtpBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Ftp;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Ftp::default();

    builder.endpoint("127.0.0.1");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/gcs/index.html b/docs/services/gcs/index.html index bd8e9691ac2b..b84235b60681 100644 --- a/docs/services/gcs/index.html +++ b/docs/services/gcs/index.html @@ -5,13 +5,13 @@ Gcs | Apache OpenDAL™ - +
    -

    Gcs

    Google Cloud Storage Support

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work directory for backend
    • bucket: Set the container name for backend
    • endpoint: Customizable endpoint setting
    • credentials: Credential string for GCS OAuth2
    • predefined_acl: Predefined ACL for GCS
    • default_storage_class: Default storage class for GCS

    Refer to public API docs for more information.

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Gcs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Gcs::default();

    // set the storage bucket for OpenDAL
    builder.bucket("test");
    // set the working directory root for GCS
    // all operations will happen within it
    builder.root("/path/to/dir");
    // set the credential of service account.
    builder.credential("service account credential");
    // set the predefined ACL for GCS
    builder.predefined_acl("publicRead");
    // set the default storage class for GCS
    builder.default_storage_class("STANDARD");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Gcs

    Google Cloud Storage Support

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work directory for backend
    • bucket: Set the container name for backend
    • endpoint: Customizable endpoint setting
    • credentials: Credential string for GCS OAuth2
    • predefined_acl: Predefined ACL for GCS
    • default_storage_class: Default storage class for GCS

    Refer to public API docs for more information.

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Gcs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Gcs::default();

    // set the storage bucket for OpenDAL
    builder.bucket("test");
    // set the working directory root for GCS
    // all operations will happen within it
    builder.root("/path/to/dir");
    // set the credential of service account.
    builder.credential("service account credential");
    // set the predefined ACL for GCS
    builder.predefined_acl("publicRead");
    // set the default storage class for GCS
    builder.default_storage_class("STANDARD");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/gdrive/index.html b/docs/services/gdrive/index.html index dd5795e664ee..c61ee41ca8ed 100644 --- a/docs/services/gdrive/index.html +++ b/docs/services/gdrive/index.html @@ -5,7 +5,7 @@ Gdrive | Apache OpenDAL™ - + @@ -16,8 +16,8 @@ You need to get authorization code from user by calling GoogleDrive's authorize url and exchange it for refresh token.

    Make sure you have enabled Google Drive API in your Google Cloud Console. And your OAuth scope contains https://www.googleapis.com/auth/drive.

    Please refer to GoogleDrive OAuth2 Flow -for more information.

    You can refer to [GdriveBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Gdrive;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Gdrive::default();
    builder.root("/test");
    builder.access_token("<token>");

    Ok(())
    }

    Via Config

    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(())
    }
    - +for more information.

    You can refer to [GdriveBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Gdrive;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Gdrive::default();
    builder.root("/test");
    builder.access_token("<token>");

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/ghac/index.html b/docs/services/ghac/index.html index f29b71834112..7f4b86f55952 100644 --- a/docs/services/ghac/index.html +++ b/docs/services/ghac/index.html @@ -5,7 +5,7 @@ GHAC | Apache OpenDAL™ - + @@ -13,8 +13,8 @@

    GHAC

    GitHub Action Cache service support

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Notes

    This service is mainly provided by github actions.

    Refer to Caching dependencies to speed up workflows for more information.

    To make this service work as expected, please make sure to either call endpoint and token to configure the URL and credentials, or that the following environment has been setup correctly:

    • ACTIONS_CACHE_URL
    • ACTIONS_RUNTIME_TOKEN

    They can be exposed by following action:

    - name: Configure Cache Env
    uses: actions/github-script@v6
    with:
    script: |
    core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
    core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

    To make delete work as expected, GITHUB_TOKEN should also be set via:

    env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    Limitations

    Unlike other services, ghac doesn't support create empty files. We provide a enable_create_simulation() to support this operation but may result unexpected side effects.

    Also, ghac is a cache service which means the data store inside could -be automatically evicted at any time.

    Configuration

    • root: Set the work dir for backend.

    Refer to [GhacBuilder]'s public API docs for more information.

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Ghac;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create ghac backend builder.
    let mut builder = Ghac::default();
    // Set the root for ghac, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/path/to/dir");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +be automatically evicted at any time.

    Configuration

    • root: Set the work dir for backend.

    Refer to [GhacBuilder]'s public API docs for more information.

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Ghac;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create ghac backend builder.
    let mut builder = Ghac::default();
    // Set the root for ghac, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/path/to/dir");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/gridfs/index.html b/docs/services/gridfs/index.html index a9d95c579f42..821b2bbad33a 100644 --- a/docs/services/gridfs/index.html +++ b/docs/services/gridfs/index.html @@ -5,13 +5,13 @@ Gridfs | Apache OpenDAL™ - +
    -

    Gridfs

    Gridfs services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string of mongodb server
    • database: Set the database of mongodb
    • bucket: Set the bucket of mongodb gridfs
    • chunk_size: Set the chunk size of mongodb gridfs

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Gridfs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Gridfs::default();
    builder.root("/");
    builder.connection_string("mongodb://myUser:myPassword@localhost:27017/myAuthDB");
    builder.database("your_database");
    builder.bucket("your_bucket");
    // The chunk size in bytes used to break the user file into chunks.
    builder.chunk_size(255);

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Gridfs

    Gridfs services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string of mongodb server
    • database: Set the database of mongodb
    • bucket: Set the bucket of mongodb gridfs
    • chunk_size: Set the chunk size of mongodb gridfs

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Gridfs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Gridfs::default();
    builder.root("/");
    builder.connection_string("mongodb://myUser:myPassword@localhost:27017/myAuthDB");
    builder.database("your_database");
    builder.bucket("your_bucket");
    // The chunk size in bytes used to break the user file into chunks.
    builder.chunk_size(255);

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/hdfs/index.html b/docs/services/hdfs/index.html index 507c58eb55e6..c8495dafe810 100644 --- a/docs/services/hdfs/index.html +++ b/docs/services/hdfs/index.html @@ -5,13 +5,13 @@ HDFS | Apache OpenDAL™ - +
    -

    HDFS

    Hadoop Distributed File System (HDFS™) support.

    A distributed file system that provides high-throughput access to application data.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking
    • append

    Differences with webhdfs

    [Webhdfs][crate::services::Webhdfs] is powered by hdfs's RESTful HTTP API.

    Features

    HDFS support needs to enable feature services-hdfs.

    Configuration

    • root: Set the work dir for backend.
    • name_node: Set the name node for backend.
    • kerberos_ticket_cache_path: Set the kerberos ticket cache path for backend, this should be gotten by klist after kinit
    • user: Set the user for backend
    • enable_append: enable the append capacity. Default is false.

    Refer to [HdfsBuilder]'s public API docs for more information.

    Environment

    HDFS needs some environment set correctly.

    • JAVA_HOME: the path to java home, could be found via java -XshowSettings:properties -version
    • HADOOP_HOME: the path to hadoop home, opendal relays on this env to discover hadoop jars and set CLASSPATH automatically.

    Most of the time, setting JAVA_HOME and HADOOP_HOME is enough. But there are some edge cases:

    • If meeting errors like the following:
    error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory

    Java's lib are not including in pkg-config find path, please set LD_LIBRARY_PATH:

    export LD_LIBRARY_PATH=${JAVA_HOME}/lib/server:${LD_LIBRARY_PATH}

    The path of libjvm.so could be different, please keep an eye on it.

    • If meeting errors like the following:
    (unable to get stack trace for java.lang.NoClassDefFoundError exception: ExceptionUtils::getStackTrace error.)

    CLASSPATH is not set correctly or your hadoop installation is incorrect.

    To set CLASSPATH:

    export CLASSPATH=$(find $HADOOP_HOME -iname "*.jar" | xargs echo | tr ' ' ':'):${CLASSPATH}
    • If HDFS has High Availability (HA) enabled with multiple available NameNodes, some configuration is required:
    1. Obtain the entire HDFS config folder (usually located at HADOOP_HOME/etc/hadoop).
    2. Set the environment variable HADOOP_CONF_DIR to the path of this folder.
    export HADOOP_CONF_DIR=<path of the config folder>
    1. Append the HADOOP_CONF_DIR to the CLASSPATH
    export CLASSPATH=$HADOOP_CONF_DIR:$HADOOP_CLASSPATH:$CLASSPATH
    1. Use the cluster_name specified in the core-site.xml file (located in the HADOOP_CONF_DIR folder) to replace namenode:port.
    builder.name_node("hdfs://cluster_name");

    macOS Specific Note

    If you encounter an issue during the build process on macOS with an error message similar to:

    ld: unknown file type in $HADOOP_HOME/lib/native/libhdfs.so.0.0.0
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    This error is likely due to the fact that the official Hadoop build includes the libhdfs.so file for the x86-64 architecture, which is not compatible with aarch64 architecture required for MacOS.

    To resolve this issue, you can add hdrs as a dependency in your Rust application's Cargo.toml file, and enable the vendored feature:

    [dependencies]
    hdrs = { version = "<version_number>", features = ["vendored"] }

    Enabling the vendored feature ensures that hdrs includes the necessary libhdfs.so library built for the correct architecture.

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Hdfs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create fs backend builder.
    let mut builder = Hdfs::default();
    // Set the name node for hdfs.
    // If the string starts with a protocol type such as file://, hdfs://, or gs://, this protocol type will be used.
    builder.name_node("hdfs://127.0.0.1:9000");
    // Set the root for hdfs, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/tmp");

    // Enable the append capacity for hdfs.
    //
    // Note: HDFS run in non-distributed mode doesn't support append.
    builder.enable_append(true);

    // `Accessor` provides the low level APIs, we will use `Operator` normally.
    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +

    HDFS

    Hadoop Distributed File System (HDFS™) support.

    A distributed file system that provides high-throughput access to application data.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking
    • append

    Differences with webhdfs

    [Webhdfs][crate::services::Webhdfs] is powered by hdfs's RESTful HTTP API.

    Features

    HDFS support needs to enable feature services-hdfs.

    Configuration

    • root: Set the work dir for backend.
    • name_node: Set the name node for backend.
    • kerberos_ticket_cache_path: Set the kerberos ticket cache path for backend, this should be gotten by klist after kinit
    • user: Set the user for backend
    • enable_append: enable the append capacity. Default is false.

    Refer to [HdfsBuilder]'s public API docs for more information.

    Environment

    HDFS needs some environment set correctly.

    • JAVA_HOME: the path to java home, could be found via java -XshowSettings:properties -version
    • HADOOP_HOME: the path to hadoop home, opendal relays on this env to discover hadoop jars and set CLASSPATH automatically.

    Most of the time, setting JAVA_HOME and HADOOP_HOME is enough. But there are some edge cases:

    • If meeting errors like the following:
    error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory

    Java's lib are not including in pkg-config find path, please set LD_LIBRARY_PATH:

    export LD_LIBRARY_PATH=${JAVA_HOME}/lib/server:${LD_LIBRARY_PATH}

    The path of libjvm.so could be different, please keep an eye on it.

    • If meeting errors like the following:
    (unable to get stack trace for java.lang.NoClassDefFoundError exception: ExceptionUtils::getStackTrace error.)

    CLASSPATH is not set correctly or your hadoop installation is incorrect.

    To set CLASSPATH:

    export CLASSPATH=$(find $HADOOP_HOME -iname "*.jar" | xargs echo | tr ' ' ':'):${CLASSPATH}
    • If HDFS has High Availability (HA) enabled with multiple available NameNodes, some configuration is required:
    1. Obtain the entire HDFS config folder (usually located at HADOOP_HOME/etc/hadoop).
    2. Set the environment variable HADOOP_CONF_DIR to the path of this folder.
    export HADOOP_CONF_DIR=<path of the config folder>
    1. Append the HADOOP_CONF_DIR to the CLASSPATH
    export CLASSPATH=$HADOOP_CONF_DIR:$HADOOP_CLASSPATH:$CLASSPATH
    1. Use the cluster_name specified in the core-site.xml file (located in the HADOOP_CONF_DIR folder) to replace namenode:port.
    builder.name_node("hdfs://cluster_name");

    macOS Specific Note

    If you encounter an issue during the build process on macOS with an error message similar to:

    ld: unknown file type in $HADOOP_HOME/lib/native/libhdfs.so.0.0.0
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    This error is likely due to the fact that the official Hadoop build includes the libhdfs.so file for the x86-64 architecture, which is not compatible with aarch64 architecture required for MacOS.

    To resolve this issue, you can add hdrs as a dependency in your Rust application's Cargo.toml file, and enable the vendored feature:

    [dependencies]
    hdrs = { version = "<version_number>", features = ["vendored"] }

    Enabling the vendored feature ensures that hdrs includes the necessary libhdfs.so library built for the correct architecture.

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Hdfs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create fs backend builder.
    let mut builder = Hdfs::default();
    // Set the name node for hdfs.
    // If the string starts with a protocol type such as file://, hdfs://, or gs://, this protocol type will be used.
    builder.name_node("hdfs://127.0.0.1:9000");
    // Set the root for hdfs, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/tmp");

    // Enable the append capacity for hdfs.
    //
    // Note: HDFS run in non-distributed mode doesn't support append.
    builder.enable_append(true);

    // `Accessor` provides the low level APIs, we will use `Operator` normally.
    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/http/index.html b/docs/services/http/index.html index 78aec268a2db..3033049098ae 100644 --- a/docs/services/http/index.html +++ b/docs/services/http/index.html @@ -5,14 +5,14 @@ HTTP | Apache OpenDAL™ - +

    HTTP

    HTTP Read-only service support like Nginx and Caddy.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Notes

    Only read ans stat are supported. We can use this service to visit any -HTTP Server like nginx, caddy.

    Configuration

    • endpoint: set the endpoint for http
    • root: Set the work directory for backend

    You can refer to [HttpBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Http;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create http backend builder
    let mut builder = Http::default();

    builder.endpoint("127.0.0.1");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +HTTP Server like nginx, caddy.

    Configuration

    • endpoint: set the endpoint for http
    • root: Set the work directory for backend

    You can refer to [HttpBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Http;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create http backend builder
    let mut builder = Http::default();

    builder.endpoint("127.0.0.1");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/huggingface/index.html b/docs/services/huggingface/index.html index d58c04d8dae1..b437241171ed 100644 --- a/docs/services/huggingface/index.html +++ b/docs/services/huggingface/index.html @@ -5,14 +5,14 @@ Hugging Face | Apache OpenDAL™ - +

    Hugging Face

    Hugging Face services support.

    This service will visit the Huggingface API to access the Huggingface File System. -Currently, we only support the model and dataset types of repositories, and operations are limited to reading and listing/stating.

    Huggingface doesn't host official HTTP API docs. Detailed HTTP request API information can be found on the huggingface_hub Source Code.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configurations

    • repo_type: The type of the repository.
    • repo_id: The id of the repository.
    • revision: The revision of the repository.
    • root: Set the work directory for backend.
    • token: The token for accessing the repository.

    Refer to [HuggingfaceBuilder]'s public API docs for more information.

    Examples

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Huggingface;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create Huggingface backend builder
    let mut builder = Huggingface::default();

    // set the type of Huggingface repository
    builder.repo_type("dataset");
    // set the id of Huggingface repository
    builder.repo_id("databricks/databricks-dolly-15k");
    // set the revision of Huggingface repository
    builder.revision("main");
    // set the root for Huggingface, all operations will happen under this root
    builder.root("/path/to/dir");
    // set the token for accessing the repository
    builder.token("access_token");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +Currently, we only support the model and dataset types of repositories, and operations are limited to reading and listing/stating.

    Huggingface doesn't host official HTTP API docs. Detailed HTTP request API information can be found on the huggingface_hub Source Code.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configurations

    • repo_type: The type of the repository.
    • repo_id: The id of the repository.
    • revision: The revision of the repository.
    • root: Set the work directory for backend.
    • token: The token for accessing the repository.

    Refer to [HuggingfaceBuilder]'s public API docs for more information.

    Examples

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Huggingface;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create Huggingface backend builder
    let mut builder = Huggingface::default();

    // set the type of Huggingface repository
    builder.repo_type("dataset");
    // set the id of Huggingface repository
    builder.repo_id("databricks/databricks-dolly-15k");
    // set the revision of Huggingface repository
    builder.revision("main");
    // set the root for Huggingface, all operations will happen under this root
    builder.root("/path/to/dir");
    // set the token for accessing the repository
    builder.token("access_token");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/ipfs/index.html b/docs/services/ipfs/index.html index d85c35acd837..72f539a0f3c1 100644 --- a/docs/services/ipfs/index.html +++ b/docs/services/ipfs/index.html @@ -5,13 +5,13 @@ IPFS | Apache OpenDAL™ - +
    -

    IPFS

    IPFS file system support based on IPFS HTTP Gateway.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work directory for backend
    • endpoint: Customizable endpoint setting

    You can refer to [IpfsBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Ipfs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Ipfs::default();

    // set the endpoint for OpenDAL
    builder.endpoint("https://ipfs.io");
    // set the root for OpenDAL
    builder.root("/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +

    IPFS

    IPFS file system support based on IPFS HTTP Gateway.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work directory for backend
    • endpoint: Customizable endpoint setting

    You can refer to [IpfsBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Ipfs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Ipfs::default();

    // set the endpoint for OpenDAL
    builder.endpoint("https://ipfs.io");
    // set the root for OpenDAL
    builder.root("/ipfs/QmPpCt1aYGb9JWJRmXRUnmJtVgeFFTJGzWFYEEX7bo9zGJ");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/ipmfs/index.html b/docs/services/ipmfs/index.html index 3f9957e0ae4e..1634f02c68da 100644 --- a/docs/services/ipmfs/index.html +++ b/docs/services/ipmfs/index.html @@ -5,13 +5,13 @@ IPMFS | Apache OpenDAL™ - +
    -
    - +
    + \ No newline at end of file diff --git a/docs/services/libsql/index.html b/docs/services/libsql/index.html index c03e6934d0f3..91a10fbfccc7 100644 --- a/docs/services/libsql/index.html +++ b/docs/services/libsql/index.html @@ -5,13 +5,13 @@ LibSQL | Apache OpenDAL™ - +
    -

    LibSQL

    libSQL service support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string for libsql server
    • auth_token: Set the authentication token for libsql server
    • table: Set the table of libsql
    • key_field: Set the key field of libsql
    • value_field: Set the value field of libsql

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Libsql;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Libsql::default();
    builder.root("/");
    builder.connection_string("https://example.com/db");
    builder.auth_token("secret");
    builder.table("your_table");
    // key field type in the table should be compatible with Rust's &str like text
    builder.key_field("key");
    // value field type in the table should be compatible with Rust's Vec<u8> like bytea
    builder.value_field("value");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    LibSQL

    libSQL service support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string for libsql server
    • auth_token: Set the authentication token for libsql server
    • table: Set the table of libsql
    • key_field: Set the key field of libsql
    • value_field: Set the value field of libsql

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Libsql;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Libsql::default();
    builder.root("/");
    builder.connection_string("https://example.com/db");
    builder.auth_token("secret");
    builder.table("your_table");
    // key field type in the table should be compatible with Rust's &str like text
    builder.key_field("key");
    // value field type in the table should be compatible with Rust's Vec<u8> like bytea
    builder.value_field("value");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/memcached/index.html b/docs/services/memcached/index.html index c352e1d4ccca..779692014c6f 100644 --- a/docs/services/memcached/index.html +++ b/docs/services/memcached/index.html @@ -5,13 +5,13 @@ Memcached | Apache OpenDAL™ - +
    -

    Memcached

    Memcached service support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • endpoint: Set the network address of memcached server
    • default_ttl: Set the ttl for memcached service.

    You can refer to [MemcachedBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Memcached;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create memcached backend builder
    let mut builder = Memcached::default();

    builder.endpoint("tcp://127.0.0.1:11211");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Memcached

    Memcached service support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • endpoint: Set the network address of memcached server
    • default_ttl: Set the ttl for memcached service.

    You can refer to [MemcachedBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Memcached;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create memcached backend builder
    let mut builder = Memcached::default();

    builder.endpoint("tcp://127.0.0.1:11211");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/memory/index.html b/docs/services/memory/index.html index bdcee5a2f14f..4c2bcc0d348f 100644 --- a/docs/services/memory/index.html +++ b/docs/services/memory/index.html @@ -5,13 +5,13 @@ Memory | Apache OpenDAL™ - +
    -

    Memory

    In memory service support. (BTreeMap Based)

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Memory;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Memory::default();
    builder.root("/tmp");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Memory

    In memory service support. (BTreeMap Based)

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Memory;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Memory::default();
    builder.root("/tmp");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/moka/index.html b/docs/services/moka/index.html index 544fd2bc1ab3..c9ca96ce0386 100644 --- a/docs/services/moka/index.html +++ b/docs/services/moka/index.html @@ -5,13 +5,13 @@ Moka | Apache OpenDAL™ - +
    -

    Moka

    Moka services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • name: Set the name for this cache instance.
    • max_capacity: Set the max capacity of the cache.
    • time_to_live: Set the time to live of the cache.
    • time_to_idle: Set the time to idle of the cache.
    • num_segments: Set the segments number of the cache.

    You can refer to [MokaBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Moka;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Moka::default();
    builder.name("opendal");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Moka

    Moka services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • name: Set the name for this cache instance.
    • max_capacity: Set the max capacity of the cache.
    • time_to_live: Set the time to live of the cache.
    • time_to_idle: Set the time to idle of the cache.
    • num_segments: Set the segments number of the cache.

    You can refer to [MokaBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Moka;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Moka::default();
    builder.name("opendal");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/mongodb/index.html b/docs/services/mongodb/index.html index 8962bbac10fc..99a4e05e7636 100644 --- a/docs/services/mongodb/index.html +++ b/docs/services/mongodb/index.html @@ -5,13 +5,13 @@ MongoDB | Apache OpenDAL™ - +
    -

    MongoDB

    MongoDB services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string of mongodb server
    • database: Set the database of mongodb
    • collection: Set the collection of mongodb
    • key_field: Set the key field of mongodb
    • value_field: Set the value field of mongodb

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Mongodb;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Mongodb::default();
    builder.root("/");
    builder.connection_string("mongodb://myUser:myPassword@localhost:27017/myAuthDB");
    builder.database("your_database");
    builder.collection("your_collection");
    // key field type in the table should be compatible with Rust's &str like text
    builder.key_field("key");
    // value field type in the table should be compatible with Rust's Vec<u8> like bytea
    builder.value_field("value");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    MongoDB

    MongoDB services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string of mongodb server
    • database: Set the database of mongodb
    • collection: Set the collection of mongodb
    • key_field: Set the key field of mongodb
    • value_field: Set the value field of mongodb

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Mongodb;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Mongodb::default();
    builder.root("/");
    builder.connection_string("mongodb://myUser:myPassword@localhost:27017/myAuthDB");
    builder.database("your_database");
    builder.collection("your_collection");
    // key field type in the table should be compatible with Rust's &str like text
    builder.key_field("key");
    // value field type in the table should be compatible with Rust's Vec<u8> like bytea
    builder.value_field("value");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/mysql/index.html b/docs/services/mysql/index.html index 222bbde9c493..e30fa7360995 100644 --- a/docs/services/mysql/index.html +++ b/docs/services/mysql/index.html @@ -5,13 +5,13 @@ MySQL | Apache OpenDAL™ - +
    -

    MySQL

    MySQL services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string of mysql server
    • table: Set the table of mysql
    • key_field: Set the key field of mysql
    • value_field: Set the value field of mysql

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Mysql;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Mysql::default();
    builder.root("/");
    builder.connection_string("mysql://you_username:your_password@127.0.0.1:5432/your_database");
    builder.table("your_table");
    // key field type in the table should be compatible with Rust's &str like text
    builder.key_field("key");
    // value field type in the table should be compatible with Rust's Vec<u8> like bytea
    builder.value_field("value");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    MySQL

    MySQL services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string of mysql server
    • table: Set the table of mysql
    • key_field: Set the key field of mysql
    • value_field: Set the value field of mysql

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Mysql;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Mysql::default();
    builder.root("/");
    builder.connection_string("mysql://you_username:your_password@127.0.0.1:5432/your_database");
    builder.table("your_table");
    // key field type in the table should be compatible with Rust's &str like text
    builder.key_field("key");
    // value field type in the table should be compatible with Rust's Vec<u8> like bytea
    builder.value_field("value");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/obs/index.html b/docs/services/obs/index.html index 332599e2deaf..794d2394880a 100644 --- a/docs/services/obs/index.html +++ b/docs/services/obs/index.html @@ -5,13 +5,13 @@ Obs | Apache OpenDAL™ - +
    -

    Obs

    Huawei-Cloud Object Storage Service (OBS) support

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work directory for backend
    • bucket: Set the container name for backend
    • endpoint: Customizable endpoint setting
    • access_key_id: Set the access_key_id for backend.
    • secret_access_key: Set the secret_access_key for backend.

    You can refer to [ObsBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Obs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Obs::default();

    // set the storage bucket for OpenDAL
    builder.bucket("test");
    builder.endpoint("obs.cn-north-1.myhuaweicloud.com");
    // Set the access_key_id and secret_access_key.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Obs

    Huawei-Cloud Object Storage Service (OBS) support

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work directory for backend
    • bucket: Set the container name for backend
    • endpoint: Customizable endpoint setting
    • access_key_id: Set the access_key_id for backend.
    • secret_access_key: Set the secret_access_key for backend.

    You can refer to [ObsBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Obs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Obs::default();

    // set the storage bucket for OpenDAL
    builder.bucket("test");
    builder.endpoint("obs.cn-north-1.myhuaweicloud.com");
    // Set the access_key_id and secret_access_key.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/onedrive/index.html b/docs/services/onedrive/index.html index 173fe02fe59e..c76417750651 100644 --- a/docs/services/onedrive/index.html +++ b/docs/services/onedrive/index.html @@ -5,13 +5,13 @@ OneDrive | Apache OpenDAL™ - +
    -

    OneDrive

    OneDrive services support.

    Capabilities

    This service can be used to:

    • read
    • write
    • list
    • copy
    • rename
    • scan
    • presign
    • blocking

    Notes

    Currently, only OneDrive Personal is supported.

    Configuration

    • access_token: set the access_token for Graph API
    • root: Set the work directory for backend

    You can refer to [OnedriveBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Onedrive;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Onedrive::default();

    builder.access_token("xxx").root("/path/to/root");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    OneDrive

    OneDrive services support.

    Capabilities

    This service can be used to:

    • read
    • write
    • list
    • copy
    • rename
    • scan
    • presign
    • blocking

    Notes

    Currently, only OneDrive Personal is supported.

    Configuration

    • access_token: set the access_token for Graph API
    • root: Set the work directory for backend

    You can refer to [OnedriveBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Onedrive;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Onedrive::default();

    builder.access_token("xxx").root("/path/to/root");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/oss/index.html b/docs/services/oss/index.html index 75cbf57a726a..b7d4a1f175ad 100644 --- a/docs/services/oss/index.html +++ b/docs/services/oss/index.html @@ -5,13 +5,13 @@ OSS | Apache OpenDAL™ - +
    -

    OSS

    Aliyun Object Storage Service (OSS) support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • append
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work dir for backend.
    • bucket: Set the container name for backend.
    • endpoint: Set the endpoint for backend.
    • presign_endpoint: Set the endpoint for presign.
    • access_key_id: Set the access_key_id for backend.
    • access_key_secret: Set the access_key_secret for backend.
    • role_arn: Set the role of backend.
    • oidc_token: Set the oidc_token for backend.
    • allow_anonymous: Set the backend access OSS in anonymous way.

    Refer to [OssBuilder]'s public API docs for more information.

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Oss;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create OSS backend builder.
    let mut builder = Oss::default();
    // Set the root for oss, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/path/to/dir");
    // Set the bucket name, this is required.
    builder.bucket("test");
    // Set the endpoint.
    //
    // For example:
    // - "https://oss-ap-northeast-1.aliyuncs.com"
    // - "https://oss-hangzhou.aliyuncs.com"
    builder.endpoint("https://oss-cn-beijing.aliyuncs.com");
    // Set the access_key_id and access_key_secret.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.access_key_id("access_key_id");
    builder.access_key_secret("access_key_secret");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +

    OSS

    Aliyun Object Storage Service (OSS) support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • append
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work dir for backend.
    • bucket: Set the container name for backend.
    • endpoint: Set the endpoint for backend.
    • presign_endpoint: Set the endpoint for presign.
    • access_key_id: Set the access_key_id for backend.
    • access_key_secret: Set the access_key_secret for backend.
    • role_arn: Set the role of backend.
    • oidc_token: Set the oidc_token for backend.
    • allow_anonymous: Set the backend access OSS in anonymous way.

    Refer to [OssBuilder]'s public API docs for more information.

    Example

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Oss;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create OSS backend builder.
    let mut builder = Oss::default();
    // Set the root for oss, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/path/to/dir");
    // Set the bucket name, this is required.
    builder.bucket("test");
    // Set the endpoint.
    //
    // For example:
    // - "https://oss-ap-northeast-1.aliyuncs.com"
    // - "https://oss-hangzhou.aliyuncs.com"
    builder.endpoint("https://oss-cn-beijing.aliyuncs.com");
    // Set the access_key_id and access_key_secret.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.access_key_id("access_key_id");
    builder.access_key_secret("access_key_secret");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/persy/index.html b/docs/services/persy/index.html index 37f97db13da0..617b3042196f 100644 --- a/docs/services/persy/index.html +++ b/docs/services/persy/index.html @@ -5,13 +5,13 @@ Persy | Apache OpenDAL™ - +
    -

    Persy

    Persy service support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • datafile: Set the path to the persy data file. The directory in the path must already exist.
    • segment: Set the name of the persy segment.
    • index: Set the name of the persy index.

    You can refer to [PersyBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Persy;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Persy::default();
    builder.datafile("./test.persy");
    builder.segment("data");
    builder.index("index");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Persy

    Persy service support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • datafile: Set the path to the persy data file. The directory in the path must already exist.
    • segment: Set the name of the persy segment.
    • index: Set the name of the persy index.

    You can refer to [PersyBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Persy;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Persy::default();
    builder.datafile("./test.persy");
    builder.segment("data");
    builder.index("index");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/postgresql/index.html b/docs/services/postgresql/index.html index b6da1aead311..7d62ef350292 100644 --- a/docs/services/postgresql/index.html +++ b/docs/services/postgresql/index.html @@ -5,13 +5,13 @@ PostgreSQL | Apache OpenDAL™ - +
    -

    PostgreSQL

    PostgreSQL services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string of postgres server
    • table: Set the table of postgresql
    • key_field: Set the key field of postgresql
    • value_field: Set the value field of postgresql

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Postgresql;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Postgresql::default();
    builder.root("/");
    builder.connection_string("postgresql://you_username:your_password@127.0.0.1:5432/your_database");
    builder.table("your_table");
    // key field type in the table should be compatible with Rust's &str like text
    builder.key_field("key");
    // value field type in the table should be compatible with Rust's Vec<u8> like bytea
    builder.value_field("value");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    PostgreSQL

    PostgreSQL services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string of postgres server
    • table: Set the table of postgresql
    • key_field: Set the key field of postgresql
    • value_field: Set the value field of postgresql

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Postgresql;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Postgresql::default();
    builder.root("/");
    builder.connection_string("postgresql://you_username:your_password@127.0.0.1:5432/your_database");
    builder.table("your_table");
    // key field type in the table should be compatible with Rust's &str like text
    builder.key_field("key");
    // value field type in the table should be compatible with Rust's Vec<u8> like bytea
    builder.value_field("value");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/redb/index.html b/docs/services/redb/index.html index 72f9cdb9ad90..0b1957c381b5 100644 --- a/docs/services/redb/index.html +++ b/docs/services/redb/index.html @@ -5,13 +5,13 @@ Redb | Apache OpenDAL™ - +
    -

    Redb

    Redb services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • datadir: Set the path to the redb data directory

    You can refer to [RedbBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Redb;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Redb::default();
    builder.datadir("/tmp/opendal/redb");
    builder.table("opendal-redb");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Redb

    Redb services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • datadir: Set the path to the redb data directory

    You can refer to [RedbBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Redb;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Redb::default();
    builder.datadir("/tmp/opendal/redb");
    builder.table("opendal-redb");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/redis/index.html b/docs/services/redis/index.html index c776c115b9fc..d0d299d78504 100644 --- a/docs/services/redis/index.html +++ b/docs/services/redis/index.html @@ -5,13 +5,13 @@ Redis | Apache OpenDAL™ - +
    -

    Redis

    Redis services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • endpoint: Set the network address of redis server
    • cluster_endpoints: Set the network address of redis cluster server. This parameter is mutually exclusive with the endponit parameter.
    • username: Set the username of Redis
    • password: Set the password for authentication
    • db: Set the DB of redis

    You can refer to [RedisBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Redis;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Redis::default();

    // this will build a Operator accessing Redis which runs on tcp://localhost:6379
    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Redis

    Redis services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • endpoint: Set the network address of redis server
    • cluster_endpoints: Set the network address of redis cluster server. This parameter is mutually exclusive with the endponit parameter.
    • username: Set the username of Redis
    • password: Set the password for authentication
    • db: Set the DB of redis

    You can refer to [RedisBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Redis;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Redis::default();

    // this will build a Operator accessing Redis which runs on tcp://localhost:6379
    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/rocksdb/index.html b/docs/services/rocksdb/index.html index 0969cbe5a5d7..d8418cee13f6 100644 --- a/docs/services/rocksdb/index.html +++ b/docs/services/rocksdb/index.html @@ -5,7 +5,7 @@ RocksDB | Apache OpenDAL™ - + @@ -13,8 +13,8 @@

    RocksDB

    RocksDB service support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Note

    OpenDAL will build rocksdb from source by default.

    To link with existing rocksdb lib, please set one of the following:

    • ROCKSDB_LIB_DIR to the dir that contains librocksdb.so
    • ROCKSDB_STATIC to the dir that contains librocksdb.a

    If the version of RocksDB is below 6.0, you may encounter compatibility issues. It is advisable to follow the steps provided in the INSTALL file to build rocksdb, rather than relying on system libraries that -may be outdated and incompatible.

    Configuration

    • root: Set the working directory of OpenDAL
    • datadir: Set the path to the rocksdb data directory

    You can refer to [RocksdbBuilder]'s docs for more information.

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Rocksdb;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Rocksdb::default();
    builder.datadir("/tmp/opendal/rocksdb");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +may be outdated and incompatible.

    Configuration

    • root: Set the working directory of OpenDAL
    • datadir: Set the path to the rocksdb data directory

    You can refer to [RocksdbBuilder]'s docs for more information.

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Rocksdb;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Rocksdb::default();
    builder.datadir("/tmp/opendal/rocksdb");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/s3/index.html b/docs/services/s3/index.html index 9611af8bbbc4..7bbceb9878f1 100644 --- a/docs/services/s3/index.html +++ b/docs/services/s3/index.html @@ -5,13 +5,13 @@ S3 | Apache OpenDAL™ - +
    -

    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.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work dir for backend.
    • bucket: Set the container name for backend.
    • endpoint: Set the endpoint for backend.
    • region: Set the region for backend.
    • access_key_id: Set the access_key_id for backend.
    • secret_access_key: Set the secret_access_key for backend.
    • security_token: Set the security_token for backend.
    • default_storage_class: Set the default storage_class for backend.
    • server_side_encryption: Set the server_side_encryption for backend.
    • server_side_encryption_aws_kms_key_id: Set the server_side_encryption_aws_kms_key_id for backend.
    • server_side_encryption_customer_algorithm: Set the server_side_encryption_customer_algorithm for backend.
    • server_side_encryption_customer_key: Set the server_side_encryption_customer_key for backend.
    • server_side_encryption_customer_key_md5: Set the server_side_encryption_customer_key_md5 for backend.
    • disable_config_load: Disable aws config load from env
    • enable_virtual_host_style: Enable virtual host style.

    Refer to [S3Builder]'s public API docs for more information.

    Temporary security credentials

    OpenDAL now provides support for S3 temporary security credentials in IAM.

    The way to take advantage of this feature is to build your S3 backend with Builder::security_token.

    But OpenDAL will not refresh the temporary security credentials, please keep in mind to refresh those credentials in time.

    Server Side Encryption

    OpenDAL provides full support of S3 Server Side Encryption(SSE) features.

    The easiest way to configure them is to use helper functions like

    • SSE-KMS: server_side_encryption_with_aws_managed_kms_key
    • SSE-KMS: server_side_encryption_with_customer_managed_kms_key
    • SSE-S3: server_side_encryption_with_s3_key
    • SSE-C: server_side_encryption_with_customer_key

    If those functions don't fulfill need, low-level options are also provided:

    • Use service managed kms key
      • server_side_encryption="aws:kms"
    • Use customer provided kms key
      • server_side_encryption="aws:kms"
      • server_side_encryption_aws_kms_key_id="your-kms-key"
    • Use S3 managed key
      • server_side_encryption="AES256"
    • Use customer key
      • server_side_encryption_customer_algorithm="AES256"
      • server_side_encryption_customer_key="base64-of-your-aes256-key"
      • server_side_encryption_customer_key_md5="base64-of-your-aes256-key-md5"

    After SSE have been configured, all requests send by this backed will attach those headers.

    Reference: Protecting data using server-side encryption

    Example

    Via Builder

    Basic Setup

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::S3;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create s3 backend builder.
    let mut builder = S3::default();
    // Set the root for s3, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/path/to/dir");
    // Set the bucket name. This is required.
    builder.bucket("test");
    // Set the region. This is required for some services, if you don't care about it, for example Minio service, just set it to "auto", it will be ignored.
    builder.region("us-east-1");
    // Set the endpoint.
    //
    // For examples:
    // - "https://s3.amazonaws.com"
    // - "http://127.0.0.1:9000"
    // - "https://oss-ap-northeast-1.aliyuncs.com"
    // - "https://cos.ap-seoul.myqcloud.com"
    //
    // Default to "https://s3.amazonaws.com"
    builder.endpoint("https://s3.amazonaws.com");
    // Set the access_key_id and secret_access_key.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    S3 with SSE-C

    use anyhow::Result;
    use log::info;
    use opendal::services::S3;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = S3::default();

    // Setup builders
    builder.root("/path/to/dir");
    builder.bucket("test");
    builder.region("us-east-1");
    builder.endpoint("https://s3.amazonaws.com");
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    // Enable SSE-C
    builder.server_side_encryption_with_customer_key("AES256", "customer_key".as_bytes());

    let op = Operator::new(builder)?.finish();
    info!("operator: {:?}", op);

    // Writing your testing code here.

    Ok(())
    }

    S3 with SSE-KMS and aws managed kms key

    use anyhow::Result;
    use log::info;
    use opendal::services::S3;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = S3::default();

    // Setup builders
    builder.root("/path/to/dir");
    builder.bucket("test");
    builder.region("us-east-1");
    builder.endpoint("https://s3.amazonaws.com");
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    // Enable SSE-KMS with aws managed kms key
    builder.server_side_encryption_with_aws_managed_kms_key();

    let op = Operator::new(builder)?.finish();
    info!("operator: {:?}", op);

    // Writing your testing code here.

    Ok(())
    }

    S3 with SSE-KMS and customer managed kms key

    use anyhow::Result;
    use log::info;
    use opendal::services::S3;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = S3::default();

    // Setup builders
    builder.root("/path/to/dir");
    builder.bucket("test");
    builder.region("us-east-1");
    builder.endpoint("https://s3.amazonaws.com");
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    // Enable SSE-KMS with customer managed kms key
    builder.server_side_encryption_with_customer_managed_kms_key("aws_kms_key_id");

    let op = Operator::new(builder)?.finish();
    info!("operator: {:?}", op);

    // Writing your testing code here.

    Ok(())
    }

    S3 with SSE-S3

    use anyhow::Result;
    use log::info;
    use opendal::services::S3;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = S3::default();

    // Setup builders
    builder.root("/path/to/dir");
    builder.bucket("test");
    builder.region("us-east-1");
    builder.endpoint("https://s3.amazonaws.com");
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    // Enable SSE-S3
    builder.server_side_encryption_with_s3_key();

    let op = Operator::new(builder)?.finish();
    info!("operator: {:?}", op);

    // Writing your testing code here.

    Ok(())
    }

    Via Config

    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(())
    }

    Compatible Services

    AWS S3

    AWS S3 is the default implementations of s3 services. Only bucket is required.

    builder.bucket("<bucket_name>");

    Alibaba Object Storage Service (OSS)

    OSS is a s3 compatible service provided by Alibaba Cloud.

    To connect to OSS, we need to set:

    • endpoint: The endpoint of oss, for example: https://oss-cn-hangzhou.aliyuncs.com
    • bucket: The bucket name of oss.

    OSS provide internal endpoint for used at alibabacloud internally, please visit OSS Regions and endpoints for more details.

    OSS only supports the virtual host style, users could meet errors like:

    <?xml version="1.0" encoding="UTF-8"?>
    <Error>
    <Code>SecondLevelDomainForbidden</Code>
    <Message>The bucket you are attempting to access must be addressed using OSS third level domain.</Message>
    <RequestId>62A1C265292C0632377F021F</RequestId>
    <HostId>oss-cn-hangzhou.aliyuncs.com</HostId>
    </Error>

    In that case, please enable virtual host style for requesting.

    builder.endpoint("https://oss-cn-hangzhou.aliyuncs.com");
    builder.region("<region>");
    builder.bucket("<bucket_name>");
    builder.enable_virtual_host_style();

    Minio

    minio is an open-source s3 compatible services.

    To connect to minio, we need to set:

    • endpoint: The endpoint of minio, for example: http://127.0.0.1:9000
    • region: The region of minio. If you don't care about it, just set it to "auto", it will be ignored.
    • bucket: The bucket name of minio.
    builder.endpoint("http://127.0.0.1:9000");
    builder.region("<region>");
    builder.bucket("<bucket_name>");

    QingStor Object Storage

    QingStor Object Storage is a S3-compatible service provided by QingCloud.

    To connect to QingStor Object Storage, we need to set:

    • endpoint: The endpoint of QingStor s3 compatible endpoint, for example: https://s3.pek3b.qingstor.com
    • bucket: The bucket name.

    Scaleway Object Storage

    Scaleway Object Storage is a S3-compatible and multi-AZ redundant object storage service.

    To connect to Scaleway Object Storage, we need to set:

    • endpoint: The endpoint of scaleway, for example: https://s3.nl-ams.scw.cloud
    • region: The region of scaleway.
    • bucket: The bucket name of scaleway.

    Tencent Cloud Object Storage (COS)

    COS is a s3 compatible service provided by Tencent Cloud.

    To connect to COS, we need to set:

    • endpoint: The endpoint of cos, for example: https://cos.ap-beijing.myqcloud.com
    • bucket: The bucket name of cos.

    Wasabi Object Storage

    Wasabi is a s3 compatible service.

    Cloud storage pricing that is 80% less than Amazon S3.

    To connect to wasabi, we need to set:

    • endpoint: The endpoint of wasabi, for example: https://s3.us-east-2.wasabisys.com
    • bucket: The bucket name of wasabi.

    Refer to What are the service URLs for Wasabi's different storage regions? for more details.

    Cloudflare R2

    Cloudflare R2 provides s3 compatible API.

    Cloudflare R2 Storage allows developers to store large amounts of unstructured data without the costly egress bandwidth fees associated with typical cloud storage services.

    To connect to r2, we need to set:

    • endpoint: The endpoint of r2, for example: https://<account_id>.r2.cloudflarestorage.com
    • bucket: The bucket name of r2.
    • region: When you create a new bucket, the data location is set to Automatic by default. So please use auto for region.
    • batch_max_operations: R2's delete objects will return Internal Error if the batch is larger than 700. Please set this value <= 700 to make sure batch delete work as expected.
    • enable_exact_buf_write: R2 requires the non-tailing parts size to be exactly the same. Please enable this option to avoid the error All non-trailing parts must have the same length.

    Google Cloud Storage XML API

    Google Cloud Storage XML API provides s3 compatible API.

    • endpoint: The endpoint of Google Cloud Storage XML API, for example: https://storage.googleapis.com
    • bucket: The bucket name.
    • To access GCS via S3 API, please enable features = ["native-tls"] in your Cargo.toml to avoid connection being reset when using rustls. Tracking in https://github.com/seanmonstar/reqwest/issues/1809
    - +

    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.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work dir for backend.
    • bucket: Set the container name for backend.
    • endpoint: Set the endpoint for backend.
    • region: Set the region for backend.
    • access_key_id: Set the access_key_id for backend.
    • secret_access_key: Set the secret_access_key for backend.
    • security_token: Set the security_token for backend.
    • default_storage_class: Set the default storage_class for backend.
    • server_side_encryption: Set the server_side_encryption for backend.
    • server_side_encryption_aws_kms_key_id: Set the server_side_encryption_aws_kms_key_id for backend.
    • server_side_encryption_customer_algorithm: Set the server_side_encryption_customer_algorithm for backend.
    • server_side_encryption_customer_key: Set the server_side_encryption_customer_key for backend.
    • server_side_encryption_customer_key_md5: Set the server_side_encryption_customer_key_md5 for backend.
    • disable_config_load: Disable aws config load from env
    • enable_virtual_host_style: Enable virtual host style.

    Refer to [S3Builder]'s public API docs for more information.

    Temporary security credentials

    OpenDAL now provides support for S3 temporary security credentials in IAM.

    The way to take advantage of this feature is to build your S3 backend with Builder::security_token.

    But OpenDAL will not refresh the temporary security credentials, please keep in mind to refresh those credentials in time.

    Server Side Encryption

    OpenDAL provides full support of S3 Server Side Encryption(SSE) features.

    The easiest way to configure them is to use helper functions like

    • SSE-KMS: server_side_encryption_with_aws_managed_kms_key
    • SSE-KMS: server_side_encryption_with_customer_managed_kms_key
    • SSE-S3: server_side_encryption_with_s3_key
    • SSE-C: server_side_encryption_with_customer_key

    If those functions don't fulfill need, low-level options are also provided:

    • Use service managed kms key
      • server_side_encryption="aws:kms"
    • Use customer provided kms key
      • server_side_encryption="aws:kms"
      • server_side_encryption_aws_kms_key_id="your-kms-key"
    • Use S3 managed key
      • server_side_encryption="AES256"
    • Use customer key
      • server_side_encryption_customer_algorithm="AES256"
      • server_side_encryption_customer_key="base64-of-your-aes256-key"
      • server_side_encryption_customer_key_md5="base64-of-your-aes256-key-md5"

    After SSE have been configured, all requests send by this backed will attach those headers.

    Reference: Protecting data using server-side encryption

    Example

    Via Builder

    Basic Setup

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::S3;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create s3 backend builder.
    let mut builder = S3::default();
    // Set the root for s3, all operations will happen under this root.
    //
    // NOTE: the root must be absolute path.
    builder.root("/path/to/dir");
    // Set the bucket name. This is required.
    builder.bucket("test");
    // Set the region. This is required for some services, if you don't care about it, for example Minio service, just set it to "auto", it will be ignored.
    builder.region("us-east-1");
    // Set the endpoint.
    //
    // For examples:
    // - "https://s3.amazonaws.com"
    // - "http://127.0.0.1:9000"
    // - "https://oss-ap-northeast-1.aliyuncs.com"
    // - "https://cos.ap-seoul.myqcloud.com"
    //
    // Default to "https://s3.amazonaws.com"
    builder.endpoint("https://s3.amazonaws.com");
    // Set the access_key_id and secret_access_key.
    //
    // OpenDAL will try load credential from the env.
    // If credential not set and no valid credential in env, OpenDAL will
    // send request without signing like anonymous user.
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    S3 with SSE-C

    use anyhow::Result;
    use log::info;
    use opendal::services::S3;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = S3::default();

    // Setup builders
    builder.root("/path/to/dir");
    builder.bucket("test");
    builder.region("us-east-1");
    builder.endpoint("https://s3.amazonaws.com");
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    // Enable SSE-C
    builder.server_side_encryption_with_customer_key("AES256", "customer_key".as_bytes());

    let op = Operator::new(builder)?.finish();
    info!("operator: {:?}", op);

    // Writing your testing code here.

    Ok(())
    }

    S3 with SSE-KMS and aws managed kms key

    use anyhow::Result;
    use log::info;
    use opendal::services::S3;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = S3::default();

    // Setup builders
    builder.root("/path/to/dir");
    builder.bucket("test");
    builder.region("us-east-1");
    builder.endpoint("https://s3.amazonaws.com");
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    // Enable SSE-KMS with aws managed kms key
    builder.server_side_encryption_with_aws_managed_kms_key();

    let op = Operator::new(builder)?.finish();
    info!("operator: {:?}", op);

    // Writing your testing code here.

    Ok(())
    }

    S3 with SSE-KMS and customer managed kms key

    use anyhow::Result;
    use log::info;
    use opendal::services::S3;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = S3::default();

    // Setup builders
    builder.root("/path/to/dir");
    builder.bucket("test");
    builder.region("us-east-1");
    builder.endpoint("https://s3.amazonaws.com");
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    // Enable SSE-KMS with customer managed kms key
    builder.server_side_encryption_with_customer_managed_kms_key("aws_kms_key_id");

    let op = Operator::new(builder)?.finish();
    info!("operator: {:?}", op);

    // Writing your testing code here.

    Ok(())
    }

    S3 with SSE-S3

    use anyhow::Result;
    use log::info;
    use opendal::services::S3;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = S3::default();

    // Setup builders
    builder.root("/path/to/dir");
    builder.bucket("test");
    builder.region("us-east-1");
    builder.endpoint("https://s3.amazonaws.com");
    builder.access_key_id("access_key_id");
    builder.secret_access_key("secret_access_key");

    // Enable SSE-S3
    builder.server_side_encryption_with_s3_key();

    let op = Operator::new(builder)?.finish();
    info!("operator: {:?}", op);

    // Writing your testing code here.

    Ok(())
    }

    Via Config

    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(())
    }

    Compatible Services

    AWS S3

    AWS S3 is the default implementations of s3 services. Only bucket is required.

    builder.bucket("<bucket_name>");

    Alibaba Object Storage Service (OSS)

    OSS is a s3 compatible service provided by Alibaba Cloud.

    To connect to OSS, we need to set:

    • endpoint: The endpoint of oss, for example: https://oss-cn-hangzhou.aliyuncs.com
    • bucket: The bucket name of oss.

    OSS provide internal endpoint for used at alibabacloud internally, please visit OSS Regions and endpoints for more details.

    OSS only supports the virtual host style, users could meet errors like:

    <?xml version="1.0" encoding="UTF-8"?>
    <Error>
    <Code>SecondLevelDomainForbidden</Code>
    <Message>The bucket you are attempting to access must be addressed using OSS third level domain.</Message>
    <RequestId>62A1C265292C0632377F021F</RequestId>
    <HostId>oss-cn-hangzhou.aliyuncs.com</HostId>
    </Error>

    In that case, please enable virtual host style for requesting.

    builder.endpoint("https://oss-cn-hangzhou.aliyuncs.com");
    builder.region("<region>");
    builder.bucket("<bucket_name>");
    builder.enable_virtual_host_style();

    Minio

    minio is an open-source s3 compatible services.

    To connect to minio, we need to set:

    • endpoint: The endpoint of minio, for example: http://127.0.0.1:9000
    • region: The region of minio. If you don't care about it, just set it to "auto", it will be ignored.
    • bucket: The bucket name of minio.
    builder.endpoint("http://127.0.0.1:9000");
    builder.region("<region>");
    builder.bucket("<bucket_name>");

    QingStor Object Storage

    QingStor Object Storage is a S3-compatible service provided by QingCloud.

    To connect to QingStor Object Storage, we need to set:

    • endpoint: The endpoint of QingStor s3 compatible endpoint, for example: https://s3.pek3b.qingstor.com
    • bucket: The bucket name.

    Scaleway Object Storage

    Scaleway Object Storage is a S3-compatible and multi-AZ redundant object storage service.

    To connect to Scaleway Object Storage, we need to set:

    • endpoint: The endpoint of scaleway, for example: https://s3.nl-ams.scw.cloud
    • region: The region of scaleway.
    • bucket: The bucket name of scaleway.

    Tencent Cloud Object Storage (COS)

    COS is a s3 compatible service provided by Tencent Cloud.

    To connect to COS, we need to set:

    • endpoint: The endpoint of cos, for example: https://cos.ap-beijing.myqcloud.com
    • bucket: The bucket name of cos.

    Wasabi Object Storage

    Wasabi is a s3 compatible service.

    Cloud storage pricing that is 80% less than Amazon S3.

    To connect to wasabi, we need to set:

    • endpoint: The endpoint of wasabi, for example: https://s3.us-east-2.wasabisys.com
    • bucket: The bucket name of wasabi.

    Refer to What are the service URLs for Wasabi's different storage regions? for more details.

    Cloudflare R2

    Cloudflare R2 provides s3 compatible API.

    Cloudflare R2 Storage allows developers to store large amounts of unstructured data without the costly egress bandwidth fees associated with typical cloud storage services.

    To connect to r2, we need to set:

    • endpoint: The endpoint of r2, for example: https://<account_id>.r2.cloudflarestorage.com
    • bucket: The bucket name of r2.
    • region: When you create a new bucket, the data location is set to Automatic by default. So please use auto for region.
    • batch_max_operations: R2's delete objects will return Internal Error if the batch is larger than 700. Please set this value <= 700 to make sure batch delete work as expected.
    • enable_exact_buf_write: R2 requires the non-tailing parts size to be exactly the same. Please enable this option to avoid the error All non-trailing parts must have the same length.

    Google Cloud Storage XML API

    Google Cloud Storage XML API provides s3 compatible API.

    • endpoint: The endpoint of Google Cloud Storage XML API, for example: https://storage.googleapis.com
    • bucket: The bucket name.
    • To access GCS via S3 API, please enable features = ["native-tls"] in your Cargo.toml to avoid connection being reset when using rustls. Tracking in https://github.com/seanmonstar/reqwest/issues/1809
    + \ No newline at end of file diff --git a/docs/services/sftp/index.html b/docs/services/sftp/index.html index 9eea4b97eae5..bded341d46ea 100644 --- a/docs/services/sftp/index.html +++ b/docs/services/sftp/index.html @@ -5,14 +5,14 @@ SFTP | Apache OpenDAL™ - +

    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.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • append
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • endpoint: Set the endpoint for connection. The format is same as openssh, using either [user@]hostname or ssh://[user@]hostname[:port]. A username or port that is specified in the endpoint overrides the one set in the builder (but does not change the builder).
    • root: Set the work directory for backend. It uses the default directory set by the remote sftp-server as default
    • user: Set the login user
    • key: Set the public key for login
    • known_hosts_strategy: Set the strategy for known hosts, default to Strict
    • enable_copy: Set whether the remote server has copy-file extension

    For security reasons, it doesn't support password login, you can use public key or ssh-copy-id instead.

    You can refer to [SftpBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Sftp;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Sftp::default();

    builder.endpoint("127.0.0.1").user("test").key("test_key");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +lots of files, you should pay attention to close the file after using it.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • append
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • endpoint: Set the endpoint for connection. The format is same as openssh, using either [user@]hostname or ssh://[user@]hostname[:port]. A username or port that is specified in the endpoint overrides the one set in the builder (but does not change the builder).
    • root: Set the work directory for backend. It uses the default directory set by the remote sftp-server as default
    • user: Set the login user
    • key: Set the public key for login
    • known_hosts_strategy: Set the strategy for known hosts, default to Strict
    • enable_copy: Set whether the remote server has copy-file extension

    For security reasons, it doesn't support password login, you can use public key or ssh-copy-id instead.

    You can refer to [SftpBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Sftp;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Sftp::default();

    builder.endpoint("127.0.0.1").user("test").key("test_key");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/sled/index.html b/docs/services/sled/index.html index b68294428235..1243285ec6d8 100644 --- a/docs/services/sled/index.html +++ b/docs/services/sled/index.html @@ -5,13 +5,13 @@ Sled | Apache OpenDAL™ - +
    -

    Sled

    Sled service support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • datadir: Set the path to the sled data directory

    You can refer to [SledBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Sled;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Sled::default();
    builder.datadir("/tmp/opendal/sled");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Sled

    Sled service support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • datadir: Set the path to the sled data directory

    You can refer to [SledBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Sled;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Sled::default();
    builder.datadir("/tmp/opendal/sled");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/sqlite/index.html b/docs/services/sqlite/index.html index e59817324397..39c0afecde53 100644 --- a/docs/services/sqlite/index.html +++ b/docs/services/sqlite/index.html @@ -5,13 +5,13 @@ Sqlite | Apache OpenDAL™ - +
    -

    Sqlite

    Sqlite services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string of sqlite database
    • table: Set the table of sqlite
    • key_field: Set the key field of sqlite
    • value_field: Set the value field of sqlite

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Sqlite;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Sqlite::default();
    builder.root("/");
    builder.connection_string("file//abc.db");
    builder.table("your_table");
    // key field type in the table should be compatible with Rust's &str like text
    builder.key_field("key");
    // value field type in the table should be compatible with Rust's Vec<u8> like bytea
    builder.value_field("value");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Sqlite

    Sqlite services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the working directory of OpenDAL
    • connection_string: Set the connection string of sqlite database
    • table: Set the table of sqlite
    • key_field: Set the key field of sqlite
    • value_field: Set the value field of sqlite

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Sqlite;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Sqlite::default();
    builder.root("/");
    builder.connection_string("file//abc.db");
    builder.table("your_table");
    // key field type in the table should be compatible with Rust's &str like text
    builder.key_field("key");
    // value field type in the table should be compatible with Rust's Vec<u8> like bytea
    builder.value_field("value");

    let op = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/supabase/index.html b/docs/services/supabase/index.html index e81d75438e96..1e1b0f635c32 100644 --- a/docs/services/supabase/index.html +++ b/docs/services/supabase/index.html @@ -5,15 +5,15 @@ Supabase | Apache OpenDAL™ - +

    Supabase

    Supabase service support.

    Capabilities

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • root: Set the work dir for backend.
    • bucket: Set the container name for backend.
    • endpoint: Set the endpoint for backend.
    • key: Set the authorization key for the backend, do not set if you want to read public bucket

    Authorization keys

    There are two types of key in the Supabase, one is anon_key(Client key), another one is service_role_key(Secret key). The former one can only write public resources while the latter one -can access all resources. Note that if you want to read public resources, do not set the key.

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Supabase;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Supabase::default();

    builder.root("/");
    builder.bucket("test_bucket");
    builder.endpoint("http://127.0.0.1:54321");
    // this sets up the anon_key, which means this operator can only write public resource
    builder.key("some_anon_key");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +can access all resources. Note that if you want to read public resources, do not set the key.

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Supabase;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Supabase::default();

    builder.root("/");
    builder.bucket("test_bucket");
    builder.endpoint("http://127.0.0.1:54321");
    // this sets up the anon_key, which means this operator can only write public resource
    builder.key("some_anon_key");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/swift/index.html b/docs/services/swift/index.html index 9b8a6db49d3a..bc1783114bfd 100644 --- a/docs/services/swift/index.html +++ b/docs/services/swift/index.html @@ -5,13 +5,13 @@ Swift | Apache OpenDAL™ - +
    -

    Swift

    OpenStack Swift service support.

    This service will visit the Swift API supported by OpenStack Object Storage.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configurations

    • endpoint: Set the endpoint for backend.
    • account_name: Name of Swift account.
    • container: Swift container.
    • token: Swift personal access token.

    Refer to [SwiftBuilder]'s public API docs for more information.

    Examples

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Swift;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create Swift backend builder
    let mut builder = Swift::default();

    // Set the root for swift, all operations will happen under this root
    builder.root("/path/to/dir");
    // set the endpoint of Swift backend
    builder.endpoint("https://openstack-controller.example.com:8080");
    // set the account name of Swift workspace
    builder.account_name("account");
    // set the container name of Swift workspace
    builder.container("container");
    // set the auth token for builder
    builder.token("token");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Swift

    OpenStack Swift service support.

    This service will visit the Swift API supported by OpenStack Object Storage.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configurations

    • endpoint: Set the endpoint for backend.
    • account_name: Name of Swift account.
    • container: Swift container.
    • token: Swift personal access token.

    Refer to [SwiftBuilder]'s public API docs for more information.

    Examples

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Swift;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // Create Swift backend builder
    let mut builder = Swift::default();

    // Set the root for swift, all operations will happen under this root
    builder.root("/path/to/dir");
    // set the endpoint of Swift backend
    builder.endpoint("https://openstack-controller.example.com:8080");
    // set the account name of Swift workspace
    builder.account_name("account");
    // set the container name of Swift workspace
    builder.container("container");
    // set the auth token for builder
    builder.token("token");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/tikv/index.html b/docs/services/tikv/index.html index 9ce530924c3f..556b3e7dc44b 100644 --- a/docs/services/tikv/index.html +++ b/docs/services/tikv/index.html @@ -5,13 +5,13 @@ TiKV | Apache OpenDAL™ - +
    -

    TiKV

    TiKV services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • endpoints: Set the endpoints to the tikv cluster
    • insecure: Set the insecure flag to the tikv cluster
    • ca_path: Set the ca path to the tikv connection
    • cert_path: Set the cert path to the tikv connection
    • key_path: Set the key path to the tikv connection

    You can refer to [TiKVBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Tikv;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Tikv::default();
    builder.endpoints("127.0.0.1:2379");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    TiKV

    TiKV services support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • endpoints: Set the endpoints to the tikv cluster
    • insecure: Set the insecure flag to the tikv cluster
    • ca_path: Set the ca path to the tikv connection
    • cert_path: Set the cert path to the tikv connection
    • key_path: Set the key path to the tikv connection

    You can refer to [TiKVBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Tikv;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Tikv::default();
    builder.endpoints("127.0.0.1:2379");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/vercel_artifacts/index.html b/docs/services/vercel_artifacts/index.html index f9ac11187a6d..7f0ab93ec34e 100644 --- a/docs/services/vercel_artifacts/index.html +++ b/docs/services/vercel_artifacts/index.html @@ -5,13 +5,13 @@ Vercel Artifacts | Apache OpenDAL™ - +
    -

    Vercel Artifacts

    Vercel Cache service support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • access_token: set the access_token for Rest API

    You can refer to [VercelArtifactsBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::VercelArtifacts;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = VercelArtifacts::default();

    builder.access_token("xxx");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    - +

    Vercel Artifacts

    Vercel Cache service support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Configuration

    • access_token: set the access_token for Rest API

    You can refer to [VercelArtifactsBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::VercelArtifacts;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = VercelArtifacts::default();

    builder.access_token("xxx");

    let op: Operator = Operator::new(builder)?.finish();
    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/webdav/index.html b/docs/services/webdav/index.html index f776971cd591..89b0580c10dc 100644 --- a/docs/services/webdav/index.html +++ b/docs/services/webdav/index.html @@ -5,14 +5,14 @@ WebDAV | Apache OpenDAL™ - +

    WebDAV

    WebDAV backend support.

    Capabilities

    This service can be used to:

    • stat
    • read
    • write
    • create_dir
    • delete
    • copy
    • rename
    • list
    • scan
    • presign
    • blocking

    Notes

    Bazel Remote Caching and Ccache HTTP Storage is also part of this service. -Users can use webdav to connect those services.

    Configuration

    • endpoint: set the endpoint for webdav
    • root: Set the work directory for backend

    You can refer to [WebdavBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Webdav;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Webdav::default();

    builder.endpoint("127.0.0.1");
    builder.username("xxx");
    builder.password("xxx");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +Users can use webdav to connect those services.

    Configuration

    • endpoint: set the endpoint for webdav
    • root: Set the work directory for backend

    You can refer to [WebdavBuilder]'s docs for more information

    Example

    Via Builder

    use anyhow::Result;
    use opendal::services::Webdav;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    // create backend builder
    let mut builder = Webdav::default();

    builder.endpoint("127.0.0.1");
    builder.username("xxx");
    builder.password("xxx");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/docs/services/webhdfs/index.html b/docs/services/webhdfs/index.html index 300fc0678c00..da1d210a111a 100644 --- a/docs/services/webhdfs/index.html +++ b/docs/services/webhdfs/index.html @@ -5,7 +5,7 @@ WebHDFS | Apache OpenDAL™ - + @@ -18,8 +18,8 @@ The final concatenation of these temporary files occurs when the writer is closed. However, it's essential to be aware of HDFS concat restrictions for earlier versions, where the target file must not be empty, and its last block must be full. Due to these constraints, the concat operation might fail for HDFS 2.6. -This issue, identified as HDFS-6641, has been addressed in later versions of HDFS.

    In summary, OpenDAL WebHDFS is designed for optimal compatibility with HDFS, specifically versions 2.9 and later.

    Configurations

    • root: The root path of the WebHDFS service.
    • endpoint: The endpoint of the WebHDFS service.
    • delegation: The delegation token for WebHDFS.
    • atomic_write_dir: The tmp write dir of multi write for WebHDFS.Needs to be configured for multi write support.

    Refer to [Builder]'s public API docs for more information.

    Examples

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Webhdfs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Webhdfs::default();
    // set the root for WebHDFS, all operations will happen under this root
    //
    // Note:
    // if the root is not exists, the builder will automatically create the
    // root directory for you
    // if the root exists and is a directory, the builder will continue working
    // if the root exists and is a folder, the builder will fail on building backend
    builder.root("/path/to/dir");
    // set the endpoint of webhdfs namenode, controlled by dfs.namenode.http-address
    // default is http://127.0.0.1:9870
    builder.endpoint("http://127.0.0.1:9870");
    // set the delegation_token for builder
    builder.delegation("delegation_token");
    // set atomic_write_dir for builder
    builder.atomic_write_dir(".opendal_tmp/");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    - +This issue, identified as HDFS-6641, has been addressed in later versions of HDFS.

    In summary, OpenDAL WebHDFS is designed for optimal compatibility with HDFS, specifically versions 2.9 and later.

    Configurations

    • root: The root path of the WebHDFS service.
    • endpoint: The endpoint of the WebHDFS service.
    • delegation: The delegation token for WebHDFS.
    • atomic_write_dir: The tmp write dir of multi write for WebHDFS.Needs to be configured for multi write support.

    Refer to [Builder]'s public API docs for more information.

    Examples

    Via Builder

    use std::sync::Arc;

    use anyhow::Result;
    use opendal::services::Webhdfs;
    use opendal::Operator;

    #[tokio::main]
    async fn main() -> Result<()> {
    let mut builder = Webhdfs::default();
    // set the root for WebHDFS, all operations will happen under this root
    //
    // Note:
    // if the root is not exists, the builder will automatically create the
    // root directory for you
    // if the root exists and is a directory, the builder will continue working
    // if the root exists and is a folder, the builder will fail on building backend
    builder.root("/path/to/dir");
    // set the endpoint of webhdfs namenode, controlled by dfs.namenode.http-address
    // default is http://127.0.0.1:9870
    builder.endpoint("http://127.0.0.1:9870");
    // set the delegation_token for builder
    builder.delegation("delegation_token");
    // set atomic_write_dir for builder
    builder.atomic_write_dir(".opendal_tmp/");

    let op: Operator = Operator::new(builder)?.finish();

    Ok(())
    }

    Via Config

    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(())
    }
    + \ No newline at end of file diff --git a/download/index.html b/download/index.html index 6004d5f8b341..4a3ea92d5956 100644 --- a/download/index.html +++ b/download/index.html @@ -5,14 +5,14 @@ Apache OpenDAL™ Downloads | Apache OpenDAL™ - +

    Apache OpenDAL™ Downloads

    The official Apache OpenDAL releases are provided as source artifacts.

    Releases

    The latest source release is 0.45.0 (asc, sha512).

    For older releases, please check the archive.

    For even older releases during the incubating phase, please check the incubator archive.

    Notes

    • When downloading a release, please verify the OpenPGP compatible signature (or failing that, check the SHA-512); these should be fetched from the main Apache site.
    • The KEYS file contains the public keys used for signing release. It is recommended that (when possible) a web of trust is used to confirm the identity of these keys.
    • Please download the KEYS as well as the .asc signature files.

    To verify the signature of the release artifact

    You will need to download both the release artifact and the .asc signature file for that artifact. Then verify the signature by:

    • Download the KEYS file and the .asc signature files for the relevant release artifacts.

    • Import the KEYS file to your GPG keyring:

      gpg --import KEYS
    • Verify the signature of the release artifact using the following command:

      gpg --verify <artifact>.asc <artifact>

    To verify the checksum of the release artifact

    You will need to download both the release artifact and the .sha512 checksum file for that artifact. Then verify the checksum by:

    shasum -a 512 -c <artifact>.sha512
    - + \ No newline at end of file diff --git a/index.html b/index.html index 86f15f7f9750..f82fb90bbf86 100644 --- a/index.html +++ b/index.html @@ -5,13 +5,13 @@ Apache OpenDAL™ - +

    Apache OpenDAL™

    Open Data Access Layer: Access data freely

    Languages

    Apache OpenDAL provides a core implementation in Rust as well as multilingual bindings, such as Java, Python, and Node.js.

    Getting started with the Rust core or multilingual bindings with the Quickstart guide.

    Services

    Apache OpenDAL provides native support for all kinds for storage systems, including object storage services, file storage services, and many.

    Check the Services docs to access data stored in AWS S3, Apache HDFS, Redis, etc.

    Layers

    Apache OpenDAL offers native layer support, enabling users to implement middleware or intercept for all operations.

    By using layers, we can retry failed requests and resume from the point of failure with RetryLayer, provide native observability with TracingLayer, and so on.

    - + \ No newline at end of file