Re-exports§
pub use async_stream;pub use futures;
Modules§
- wal
- WAL (Write-Ahead Logging) operations module. WAL (Write-Ahead Logging) functionality for Sentinel DBMS.
Structs§
- Collection
- A collection represents a namespace for documents in the Sentinel database.
- Collection
Metadata - Collection metadata stored on disk.
- Collection
WalConfig - Configuration for WAL operations at the collection level.
- Collection
WalConfig Overrides - Overrides for CollectionWalConfig, where None means “use existing value”.
- Crypto
Config - Global cryptographic configuration. This allows runtime selection of algorithms for all default operations. Defaults to the most secure algorithms available.
- Document
- Represents a document in the database.
- Encryption
KeyManager - Encryption key management utilities
- LogEntry
- A WAL log entry
- Query
- Represents a query for filtering documents in a collection.
- Query
Builder - Builder pattern for constructing queries.
- Query
Result - The result of executing a query.
- Signature
- Ed25519 signature.
- Signing
Key - ed25519 signing key which can be used to produce signatures.
- Signing
KeyManager - Signing key management utilities
- Store
- The top-level manager for document collections in Cyberpath Sentinel.
- Store
Metadata - Store metadata stored on disk.
- Store
WalConfig - Configuration for WAL operations at the store level.
- Verification
Options - Options for controlling verification behavior when reading documents.
- Verifying
Key - An ed25519 public key.
- WalConfig
- Configuration for WAL manager
- WalManager
- Write-Ahead Log manager
- WalRecovery
Failure - Details of a recovery failure
- WalRecovery
Result - Result of WAL recovery operation
- WalVerification
Issue - Issues found during WAL verification
- WalVerification
Result - Result of WAL verification
Enums§
- Aggregation
- Aggregation operations for queries.
- Compression
Algorithm - Compression algorithms available for WAL file rotation
- Crypto
Error - Comprehensive error type for all sentinel-crypto operations. This enum wraps all possible errors that can occur during cryptographic operations, providing a unified error handling interface. We use thiserror for ergonomic error handling while ensuring all sensitive information is properly abstracted.
- Encryption
Algorithm Choice - Encryption algorithm options for global configuration
- Entry
Type - Types of WAL entries
- Filter
- A filter condition for querying documents.
- Hash
Algorithm Choice - Hash algorithm options for global configuration
- KeyDerivation
Algorithm Choice - Key derivation algorithm options for global configuration
- Operator
- Operator for building filters in the query builder.
- Sentinel
Error - Sentinel-wide error type for the document DBMS.
- Signature
Algorithm Choice - Signature algorithm options for global configuration
- Sort
Order - Sort order for query results.
- Verification
Mode - Verification mode for signature and hash checks.
- WalError
- Error types for WAL operations
- WalFailure
Mode - Failure handling modes for WAL operations.
- WalFormat
- WAL file format options
Constants§
- COLLECTION_
METADATA_ FILE - Filename for collection metadata stored within a collection directory.
- DATA_
DIR - Directory name for storing collection data within a store.
- DELETED_
DIR - Directory name for soft-deleted documents within a collection.
- DOCUMENT_
EXTENSION - File extension for document files.
- DOCUMENT_
SENTINEL_ VERSION - The current version of the Sentinel document format.
- KEYS_
COLLECTION - Name of the special collection used for storing encryption keys.
- MAX_
COLLECTION_ METADATA_ SIZE - Maximum size for collection metadata files (1MB).
- MAX_
STORE_ METADATA_ SIZE - Maximum size for store metadata files (10MB).
- META_
SENTINEL_ VERSION - The current version of the Sentinel metadata format.
- SIGNING_
KEY_ FILE - Filename for storing signing keys within the keys collection.
- STORE_
METADATA_ FILE - Filename for store metadata stored in the store root directory.
- WAL_DIR
- Directory name for Write-Ahead Log files within a collection.
- WAL_
FILE - Filename for the main WAL file within a collection’s WAL directory.
Traits§
- WalDocument
Ops - Operations required for WAL recovery and verification
Functions§
- derive_
key_ from_ passphrase - Derives a 32-byte key from a passphrase using the globally configured algorithm. Returns the randomly generated salt and the derived key.
- encrypt_
data - Encrypts data using the globally configured algorithm.
- get_
global_ crypto_ config - Gets the current global cryptographic configuration. Returns the default configuration if none has been set.
- hash_
data - Computes the hash of the given JSON data using the globally configured algorithm.
- is_
global_ crypto_ config_ set - Checks if the global cryptographic configuration has been explicitly set. Returns true if set, false if still using the default lazy-initialized config.
- recover_
from_ wal_ force - Recover collection from WAL with conflict resolution
- recover_
from_ wal_ safe - Recover collection state from WAL entries
- set_
global_ crypto_ config - Sets the global cryptographic configuration. This affects all default cryptographic operations. Can be called multiple times, but a warning is emitted if the config is changed.
- sign_
hash - Signs the given hash using the globally configured algorithm.
- verify_
signature - Verifies the signature of the given hash using the globally configured algorithm.
- verify_
wal_ consistency - Verify WAL consistency and final state against disk
Type Aliases§
- Metadata
Version - Version of the metadata format.
- Result
- Result type alias for Sentinel operations.