objectstore_client/
lib.rs

1//! # Objectstore Client
2//!
3//! The client is used to interface with the objectstore backend. It handles responsibilities like
4//! transparent compression, and making sure that uploads and downloads are done as efficiently as
5//! possible.
6//!
7//! ## Usage
8//!
9//! ```no_run
10//! use objectstore_client::ClientBuilder;
11//!
12//! #[tokio::main]
13//! # async fn main() -> anyhow::Result<()> {
14//! let client = ClientBuilder::new("http://localhost:8888/", "my-usecase")?
15//!     .for_organization(42);
16//!
17//! let id = client.put("hello world").send().await?;
18//! let object = client.get(&id.key).send().await?.expect("object to exist");
19//! assert_eq!(object.payload().await?, "hello world");
20//! # Ok(())
21//! # }
22//! ```
23#![warn(missing_docs)]
24#![warn(missing_debug_implementations)]
25
26mod client;
27mod get;
28mod put;
29
30pub use objectstore_types::{Compression, ExpirationPolicy};
31
32pub use client::*;
33pub use get::*;
34pub use put::*;
35
36#[cfg(test)]
37mod tests;