feat: with sled db

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-08-27 16:49:53 +02:00
parent 9e61ed7ef7
commit 757d1081bd
12 changed files with 682 additions and 31 deletions

View File

@@ -23,3 +23,20 @@ pub struct ServerMonitorResp {
pub cursor: Option<uuid::Uuid>,
pub logs: Vec<String>,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct LogEvent {
pub id: uuid::Uuid,
pub author: String,
pub content: String,
}
impl LogEvent {
pub fn new(author: impl Into<String>, content: impl Into<String>) -> Self {
Self {
id: uuid::Uuid::new_v4(),
author: author.into(),
content: content.into(),
}
}
}