use crate::artifact::{ArtifactApproval, ArtifactRow, ArtifactVerdict};
pub trait ArtifactTrustStore {
fn get_artifact(&self, id: &str) -> Option<ArtifactRow>;
fn get_artifact_by_path(&self, session_id: &str, path: &str) -> Option<ArtifactRow>;
fn attach_verdict(
&mut self,
artifact_id: &str,
verdict: ArtifactVerdict,
) -> Option<ArtifactRow>;
fn record_approval(
&mut self,
artifact_id: &str,
approval: ArtifactApproval,
) -> Option<ArtifactRow>;
fn finalize_artifact(&mut self, artifact_id: &str) -> Option<ArtifactRow>;
}
pub trait SessionConduit {
type Error: std::fmt::Debug;
fn submit(&self, op: crate::op::Op) -> Result<(), Self::Error>;
}