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
//! Multi-Tenant Isolation for OxiRS TDB
//!
//! Provides per-tenant namespace isolation, quota enforcement, and
//! cross-tenant access auditing on top of the TDB storage engine.
//!
//! ## Design
//! - Each tenant gets a unique [`TenantId`] that prefixes all triple storage keys.
//! - [`TenantStore`] wraps a TDB store and transparently namespaces all operations.
//! - [`TenantRegistry`] manages tenant lifecycle (create, delete, list).
//! - [`TenantAuditLog`] records cross-tenant access attempts.
//! - Quotas are enforced at write time: inserts fail when limits are exceeded.
//!
//! ## Usage
//! ```rust,no_run
//! use oxirs_tdb::tenant::{TenantId, TenantConfig, TenantRegistry, TenantStore};
//!
//! let mut registry = TenantRegistry::new();
//! let id = TenantId::new("acme_corp").unwrap();
//! let config = TenantConfig {
//! max_triples: 1_000_000,
//! max_graphs: 100,
//! quota_bytes: 512 * 1024 * 1024,
//! allowed_predicates: vec![],
//! allowed_prefixes: vec![],
//! active: true,
//! };
//! registry.create_tenant(id, config).unwrap();
//! ```
pub
/// Tenant lifecycle management.
/// Type definitions, errors and audit log.
pub use *;
pub use *;
pub use *;