Skip to main content

HttpStore

Trait HttpStore 

Source
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>>;
}
Expand description

Persistence operations used by the HTTP channel.

Required Methods§

Source

fn get_task_by_id(&self, id: &str) -> Result<Option<ScheduledTask>>

Scheduled task by id.

Source

fn create_task(&self, task: &ScheduledTask) -> Result<()>

Insert a scheduled task.

Source

fn delete_task(&self, id: &str) -> Result<()>

Delete a scheduled task (and its run logs).

Source

fn get_tasks_for_group(&self, group_folder: &str) -> Result<Vec<ScheduledTask>>

Tasks belonging to a group folder.

Source

fn get_session_rows(&self) -> Result<Vec<SessionRow>>

Stored sessions, keyed by lane session key.

Source

fn upsert_investigation(&self, inv: &Investigation) -> Result<()>

Insert or update an investigation job.

Source

fn get_investigation(&self, id: &str) -> Result<Option<Investigation>>

Investigation by id.

Source

fn list_investigations(&self, limit: usize) -> Result<Vec<Investigation>>

Most recent investigations first.

Source

fn latest_investigation_for_alert( &self, alert_id: &str, ) -> Result<Option<Investigation>>

Latest investigation for an alert id.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl HttpStore for Db

Implementors§