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//! ## Auth
26//!
27//! The [`auth`] module defines [`Permission`](auth::Permission), the set of
28//! operations that can be granted in a JWT token and checked by the server before
29//! each request.
30#![warn(missing_docs)]
31#![warn(missing_debug_implementations)]
32
33pub mod auth;
34pub mod metadata;
35pub mod scope;