2020-03-01 22:53:41 -08:00
|
|
|
// This file is part of Moonfire NVR, a security camera network video recorder.
|
2021-04-10 17:34:52 -07:00
|
|
|
// Copyright (C) 2021 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt.
|
2021-02-17 13:28:48 -08:00
|
|
|
// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception.
|
2018-02-20 23:15:39 -08:00
|
|
|
|
2021-04-10 17:34:52 -07:00
|
|
|
//! Moonfire NVR's persistence layer.
|
|
|
|
//!
|
|
|
|
//! This manages both the SQLite database and the sample file directory.
|
|
|
|
//! Everything dealing with either flows through this crate. It keeps in-memory
|
|
|
|
//! state both as indexes and to batch SQLite database transactions.
|
|
|
|
//!
|
|
|
|
//! The core recording design is described in `design/recording.md` and is
|
|
|
|
//! mostly in the `db` module.
|
|
|
|
|
2021-02-16 22:15:54 -08:00
|
|
|
#![cfg_attr(all(feature = "nightly", test), feature(test))]
|
2018-02-20 23:15:39 -08:00
|
|
|
|
2018-11-01 23:25:06 -07:00
|
|
|
pub mod auth;
|
2018-03-01 17:07:42 -08:00
|
|
|
pub mod check;
|
2018-02-20 23:15:39 -08:00
|
|
|
mod coding;
|
2019-07-11 08:07:40 -07:00
|
|
|
mod compare;
|
2021-03-23 09:40:52 -07:00
|
|
|
pub mod days;
|
2018-02-20 23:15:39 -08:00
|
|
|
pub mod db;
|
|
|
|
pub mod dir;
|
2019-07-12 11:05:36 -07:00
|
|
|
mod fs;
|
2021-09-10 16:31:03 -07:00
|
|
|
pub mod json;
|
2021-01-15 09:54:10 -08:00
|
|
|
mod proto {
|
|
|
|
include!(concat!(env!("OUT_DIR"), "/mod.rs"));
|
|
|
|
}
|
2018-02-22 16:35:34 -08:00
|
|
|
mod raw;
|
2018-02-20 23:15:39 -08:00
|
|
|
pub mod recording;
|
2022-03-09 13:12:33 -08:00
|
|
|
pub use proto::schema;
|
2019-06-06 16:18:13 -07:00
|
|
|
pub mod signal;
|
2018-02-28 21:21:47 -08:00
|
|
|
pub mod upgrade;
|
2018-03-04 12:24:24 -08:00
|
|
|
pub mod writer;
|
2018-02-20 23:15:39 -08:00
|
|
|
|
|
|
|
// This is only for #[cfg(test)], but it's also used by the dependent crate, and it appears that
|
|
|
|
// #[cfg(test)] is not passed on to dependencies.
|
|
|
|
pub mod testutil;
|
|
|
|
|
2018-12-28 12:21:49 -06:00
|
|
|
pub use crate::db::*;
|
2019-06-19 15:17:50 -07:00
|
|
|
pub use crate::schema::Permissions;
|
2019-06-06 16:18:13 -07:00
|
|
|
pub use crate::signal::Signal;
|