pinto/storage.rs
1//! Persistence layer.
2//!
3//! Read and write backlog items as Markdown (TOML frontmatter plus body), one item per file.
4//! Repository traits keep persistence separate from the domain layer and make backends replaceable
5//! in tests.
6//!
7//! Frontmatter is TOML between `+++` delimiters and uses the same serialization format as
8//! `config.toml`, keeping the data human-editable.
9
10mod atomic;
11mod backend;
12mod file_repository;
13mod git_repository;
14mod issued_ids;
15mod lock;
16mod markdown;
17mod repository;
18#[cfg(feature = "sqlite")]
19mod sqlite_repository;
20
21pub(crate) use atomic::atomic_write;
22// The Markdown representation (`+++` frontmatter plus body) is the backend-independent editing
23// format used by `$EDITOR`. The facade re-exports it because the service layer uses it to build
24// edit templates and parse edited content; concrete paths remain backend-internal.
25pub use backend::Backend;
26pub use lock::BoardLock;
27pub use markdown::parse_item_markdown;
28pub(crate) use markdown::{from_markdown as item_from_markdown, to_markdown as item_to_markdown};
29// Re-export the backend type here because backend selection and migration use the persistence
30// facade's public API ([`Backend::open`] and [`crate::service::migrate_storage`]).
31pub use crate::config::StorageBackend;
32pub use file_repository::FileRepository;
33pub use git_repository::GitRepository;
34pub use repository::{BacklogItemRepository, SprintRepository};
35#[cfg(feature = "sqlite")]
36pub use sqlite_repository::SqliteRepository;