1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! A generic REST/HTTP-backed [`ObjectStore`](delta_kernel::object_store::ObjectStore).
//!
//! [`RestObjectStore`] implements [`ObjectStore`](delta_kernel::object_store::ObjectStore) over a
//! REST "file API" -- a service that exposes list/read/write of files behind authenticated HTTP
//! endpoints rather than as a plain blob store -- so the default engine can read and write Delta
//! tables through it with no service-specific logic in the kernel.
//!
//! The caller supplies everything service-specific through two pieces:
//!
//! - [`AuthHeaderProvider`] -- headers attached to every request (auth, identity). Consulted per
//! request, so an implementation can refresh short-lived credentials.
//! - [`RestEndpointConfig`] -- the REST dialect: path-to-URL mapping, list and write query
//! parameters, and list-response JSON field names. HTTP `404 -> NotFound` and `409 ->
//! AlreadyExists` are mapped in [`RestObjectStore`].
//!
//! Only the operations kernel needs are implemented (read, head, list, write, delete); the rest
//! return [`ObjectStoreError::NotSupported`].
use Error as ObjectStoreError;
pub use ;
pub use ;
pub use RestEndpointConfig;
// Re-exported so callers can name the header type in `AuthHeaderProvider`'s public API.
pub use HeaderMap;
pub use RestObjectStore;
/// Build a generic [`ObjectStoreError`] from a source error or message.
pub