use std::path::PathBuf;
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub enum VendorPolicy {
#[default]
Any,
MustMatch(String),
AllowList(Vec<String>),
}
#[derive(Debug, Clone, Default, PartialEq, Eq)]
#[non_exhaustive]
pub enum DiscoveryMode {
#[default]
StrictSpecOnly,
Heuristic,
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct ValidationConfig {
pub vendor_policy: VendorPolicy,
pub scan_keys: bool,
pub discovery_mode: DiscoveryMode,
pub skip_tokens: Vec<String>,
}
#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct FsSourceConfig {
pub paths: Vec<PathBuf>,
pub exclude: Vec<String>,
pub max_file_size: u64,
pub follow_links: bool,
pub max_depth: usize,
pub max_files: usize,
pub max_total_bytes: u64,
}
impl Default for FsSourceConfig {
fn default() -> Self {
Self {
paths: Vec::new(),
exclude: Vec::new(),
max_file_size: 10_485_760,
follow_links: false,
max_depth: 64,
max_files: 100_000,
max_total_bytes: 536_870_912,
}
}
}