diff options
Diffstat (limited to 'src/db')
| -rw-r--r-- | src/db/audit.rs | 9 | ||||
| -rw-r--r-- | src/db/mod.rs | 3 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/db/audit.rs b/src/db/audit.rs index ce9d0c8..45a3b46 100644 --- a/src/db/audit.rs +++ b/src/db/audit.rs @@ -60,15 +60,6 @@ impl<'a> AuditEntry<'a> { Self { at, actor_kind: "human", actor, action, entity, entity_id, detail } } - pub fn system( - at: &'a str, - action: &'a str, - entity: &'a str, - entity_id: &'a str, - detail: serde_json::Value, - ) -> Self { - Self { at, actor_kind: "system", actor: "", action, entity, entity_id, detail } - } } pub fn audit_in(tx: &rusqlite::Transaction<'_>, e: &AuditEntry<'_>) -> Result<()> { diff --git a/src/db/mod.rs b/src/db/mod.rs index e8a97b4..bf54be1 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -195,7 +195,8 @@ pub struct Writer { } impl Writer { - pub fn start(path: &Path) -> Result<Self> { +/// Only `Writer::open` in this module starts a writer. + pub(crate) fn start(path: &Path) -> Result<Self> { let conn = open(path, false)?; let (tx, rx) = unbounded::<Msg>(); let alive = Arc::new(AtomicBool::new(true)); |
