Skip to main content

sova_fs/
events.rs

1//! Domain events for filesystem mutations.
2
3use sova_core::Event;
4
5#[derive(Debug, Clone)]
6pub struct FileWritten {
7    pub path: String,
8}
9
10impl Event for FileWritten {
11    fn name(&self) -> &'static str {
12        "fs.file_written"
13    }
14}
15
16#[derive(Debug, Clone)]
17pub struct FileRemoved {
18    pub path: String,
19}
20
21impl Event for FileRemoved {
22    fn name(&self) -> &'static str {
23        "fs.file_removed"
24    }
25}
26
27#[derive(Debug, Clone)]
28pub struct DirCreated {
29    pub path: String,
30}
31
32impl Event for DirCreated {
33    fn name(&self) -> &'static str {
34        "fs.dir_created"
35    }
36}