use std::path::Path;

use crate::error::CoreError;
use crate::models::{Finding, SbomEntry, ScanType};

#[derive(Debug, Default)]
pub struct ScanOutput {
    pub findings: Vec<Finding>,
    pub sbom_entries: Vec<SbomEntry>,
}

#[allow(async_fn_in_trait)]
pub trait Scanner: Send + Sync {
    fn name(&self) -> &str;
    fn scan_type(&self) -> ScanType;
    async fn scan(&self, repo_path: &Path, repo_id: &str) -> Result<ScanOutput, CoreError>;
}
