4 configuration options · available in Rust
use opendal::Operator;
let operator = Operator::via_iter("remotestorage", [
("endpoint".to_string(), "https://storage.example.com/alice".to_string()),
])?;
use opendal::Operator;
let operator = Operator::via_iter("remotestorage", [
// Storage root URL of the user's account, as published in the
// `href` of the user's WebFinger `remotestorage` link.
//
// For example: `https://storage.example.com/alice`
//
// This field is required.
("endpoint".to_string(), "https://storage.example.com/alice".to_string()),
// OAuth bearer token granted by the user's storage server.
// ("token".to_string(), "...".to_string()),
// Root path inside the storage, for example `/documents/`.
// ("root".to_string(), "...".to_string()),
// Origin of the application the token was granted to, sent as the
// `Origin` header on every request.
//
// Set this when the server binds tokens to the origin of the
// application's `redirect_uri`, as armadietto does. For example:
// `https://app.example.com`
// ("origin".to_string(), "...".to_string()),
])?;
Every option is passed as a string key; OpenDAL parses it into the right type. For a map option, pass a string containing a JSON object whose values are strings, such as {"key":"value"}. Some services may require building the binding with the matching services-* feature enabled.
| Key | Type | Required | Description |
|---|---|---|---|
endpointe.g. https://storage.example.com/alice | string | yes | Storage root URL of the user's account, as published in the
href of the user's WebFinger remotestorage link.
For example: https://storage.example.com/alice
This field is required. |
token | string | no | OAuth bearer token granted by the user's storage server. |
root | string | no | Root path inside the storage, for example /documents/. |
origin | string | no | Origin of the application the token was granted to, sent as the
Origin header on every request.
Set this when the server binds tokens to the origin of the
application's redirect_uri, as armadietto does. For example:
https://app.example.com |
Entries reflect native capabilities declared by the remotestorage backend. Language bindings expose different subsets of options and may simulate operations client-side, and protocol-compatible endpoints may support only a subset of the declared features.
| Capability | Support | Description |
|---|---|---|
stat | Native | Indicates if the operator supports metadata retrieval operations. |
| Capability | Support | Description |
|---|---|---|
read | Native | Indicates if the operator supports read operations. |
read_with_if_none_match | Native | Indicates if conditional read operations using If-None-Match are supported. |
read_with_suffix | Native | Indicates if suffix read operations are supported. |
| Capability | Support | Description |
|---|---|---|
list | Native | Indicates if list operations are supported. |
| Capability | Support | Description |
|---|---|---|
shared | Native | Indicate if the operator supports shared access. |