Skip to main content

objectstore_types/
lib.rs

1//! # Shared Types
2//!
3//! This crate defines the types shared between the objectstore server, service,
4//! and client libraries. It is the common vocabulary that ensures all components
5//! agree on how metadata is represented, how scopes work, what permissions exist,
6//! and how objects expire.
7//!
8//! ## Metadata
9//!
10//! The [`metadata`] module defines [`Metadata`](metadata::Metadata), the
11//! per-object metadata structure carried alongside every object. It travels
12//! through the entire system: clients set it via HTTP headers, the server parses
13//! and validates it, the service passes it to backends, and backends persist it.
14//! The module also defines [`ExpirationPolicy`](metadata::ExpirationPolicy) for
15//! automatic object cleanup and [`Compression`](metadata::Compression) for payload
16//! encoding.
17//!
18//! ## Scopes
19//!
20//! The [`scope`] module defines [`Scope`](scope::Scope) (a single key-value pair)
21//! and [`Scopes`](scope::Scopes) (an ordered collection). Scopes organize objects
22//! into hierarchical namespaces and double as the authorization boundary checked
23//! against JWT claims.
24//!
25//! ## Multipart
26//!
27//! The [`multipart`] module defines the request and response types for the
28//! multipart upload protocol, which splits large objects into independently
29//! uploaded parts that are assembled server-side on completion.
30//!
31//! ## Auth
32//!
33//! The [`auth`] module defines [`Permission`](auth::Permission), the set of
34//! operations that can be granted in a JWT token and checked by the server before
35//! each request.
36#![warn(missing_docs)]
37#![warn(missing_debug_implementations)]
38
39pub mod auth;
40pub mod metadata;
41pub mod multipart;
42pub mod range;
43pub mod scope;