pub trait HttpStore: Send + Sync {
// Required methods
fn get_task_by_id(&self, id: &str) -> Result<Option<ScheduledTask>>;
fn create_task(&self, task: &ScheduledTask) -> Result<()>;
fn delete_task(&self, id: &str) -> Result<()>;
fn get_tasks_for_group(
&self,
group_folder: &str,
) -> Result<Vec<ScheduledTask>>;
fn get_session_rows(&self) -> Result<Vec<SessionRow>>;
fn upsert_investigation(&self, inv: &Investigation) -> Result<()>;
fn get_investigation(&self, id: &str) -> Result<Option<Investigation>>;
fn list_investigations(&self, limit: usize) -> Result<Vec<Investigation>>;
fn latest_investigation_for_alert(
&self,
alert_id: &str,
) -> Result<Option<Investigation>>;
// Provided method
fn investigation_status_counts(&self) -> Result<BTreeMap<String, u64>> { ... }
}Expand description
Persistence operations used by the HTTP channel.
Required Methods§
Sourcefn get_task_by_id(&self, id: &str) -> Result<Option<ScheduledTask>>
fn get_task_by_id(&self, id: &str) -> Result<Option<ScheduledTask>>
Scheduled task by id.
Sourcefn create_task(&self, task: &ScheduledTask) -> Result<()>
fn create_task(&self, task: &ScheduledTask) -> Result<()>
Insert a scheduled task.
Sourcefn delete_task(&self, id: &str) -> Result<()>
fn delete_task(&self, id: &str) -> Result<()>
Delete a scheduled task (and its run logs).
Sourcefn get_tasks_for_group(&self, group_folder: &str) -> Result<Vec<ScheduledTask>>
fn get_tasks_for_group(&self, group_folder: &str) -> Result<Vec<ScheduledTask>>
Tasks belonging to a group folder.
Sourcefn get_session_rows(&self) -> Result<Vec<SessionRow>>
fn get_session_rows(&self) -> Result<Vec<SessionRow>>
Stored sessions, keyed by lane session key.
Sourcefn upsert_investigation(&self, inv: &Investigation) -> Result<()>
fn upsert_investigation(&self, inv: &Investigation) -> Result<()>
Insert or update an investigation job.
Sourcefn get_investigation(&self, id: &str) -> Result<Option<Investigation>>
fn get_investigation(&self, id: &str) -> Result<Option<Investigation>>
Investigation by id.
Sourcefn list_investigations(&self, limit: usize) -> Result<Vec<Investigation>>
fn list_investigations(&self, limit: usize) -> Result<Vec<Investigation>>
Most recent investigations first.
Sourcefn latest_investigation_for_alert(
&self,
alert_id: &str,
) -> Result<Option<Investigation>>
fn latest_investigation_for_alert( &self, alert_id: &str, ) -> Result<Option<Investigation>>
Latest investigation for an alert id.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".