mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-06 01:34:21 +01:00
Let's add an encryption module, hard coded to use AES 256 GCM. Other required parameters are also hard coded and will be made configurable in the future PRs. The module is behind a `encryption` feature flag.
34 lines
1.2 KiB
Rust
34 lines
1.2 KiB
Rust
//! The storage layer.
|
|
//!
|
|
//! This module contains the storage layer for Limbo. The storage layer is
|
|
//! responsible for managing access to the database and its pages. The main
|
|
//! interface to the storage layer is the `Pager` struct, which is
|
|
//! responsible for managing the database file and the pages it contains.
|
|
//!
|
|
//! Pages in a database are stored in one of the following to data structures:
|
|
//! `DatabaseStorage` or `Wal`. The `DatabaseStorage` trait is responsible
|
|
//! for reading and writing pages to the database file, either local or
|
|
//! remote. The `Wal` struct is responsible for managing the write-ahead log
|
|
//! for the database, also either local or remote.
|
|
pub(crate) mod btree;
|
|
pub(crate) mod buffer_pool;
|
|
pub(crate) mod database;
|
|
#[cfg(feature = "encryption")]
|
|
pub(crate) mod encryption;
|
|
pub(crate) mod page_cache;
|
|
#[allow(clippy::arc_with_non_send_sync)]
|
|
pub(crate) mod pager;
|
|
#[allow(dead_code)]
|
|
pub(super) mod slot_bitmap;
|
|
pub(crate) mod sqlite3_ondisk;
|
|
mod state_machines;
|
|
#[allow(clippy::arc_with_non_send_sync)]
|
|
pub(crate) mod wal;
|
|
|
|
#[macro_export]
|
|
macro_rules! return_corrupt {
|
|
($msg:expr) => {
|
|
return Err(LimboError::Corrupt($msg.into()));
|
|
};
|
|
}
|