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() -> objectstore_client::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 error;
28mod get;
29mod put;
30
31pub use objectstore_types::{Compression, ExpirationPolicy};
32
33pub use client::*;
34pub use error::*;
35pub use get::*;
36pub use put::*;
37
38#[cfg(test)]
39mod tests;