use std::time::Duration;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum NameStrategy {
Keep,
PerHand,
Stable,
}
#[derive(Debug, Clone)]
pub struct TimeFuzzConfig {
pub max_global_shift: Duration,
pub max_per_hand_jitter: Duration,
}
impl Default for TimeFuzzConfig {
fn default() -> Self {
Self {
max_global_shift: Duration::from_secs(30 * 60),
max_per_hand_jitter: Duration::from_secs(5),
}
}
}
#[derive(Debug, Clone)]
pub struct AnonymizeConfig {
pub name_strategy: NameStrategy,
pub name_pool: Option<Vec<String>>,
pub rotate_site: bool,
pub rotate_network: bool,
pub rotate_internal_version: bool,
pub rotate_table_name: bool,
pub rotate_game_numbers: bool,
pub time_fuzz: Option<TimeFuzzConfig>,
pub seed: Option<u64>,
}
impl Default for AnonymizeConfig {
fn default() -> Self {
Self {
name_strategy: NameStrategy::Stable,
name_pool: None,
rotate_site: true,
rotate_network: true,
rotate_internal_version: true,
rotate_table_name: true,
rotate_game_numbers: true,
time_fuzz: Some(TimeFuzzConfig::default()),
seed: None,
}
}
}