bestool_psql/
config.rs

1use std::collections::HashSet;
2
3use crate::{column_extractor::ColumnRef, theme::Theme};
4
5#[derive(Clone, Debug)]
6pub struct Config {
7	/// Syntax highlighting theme
8	pub theme: Theme,
9
10	/// Path to audit database directory
11	pub audit_path: Option<std::path::PathBuf>,
12
13	/// Whether write mode is enabled upon entering the REPL
14	pub write: bool,
15
16	/// Whether to use colours in output
17	pub use_colours: bool,
18
19	/// Whether redaction mode is enabled
20	pub redact_mode: bool,
21
22	/// Set of columns to redact
23	pub redactions: HashSet<ColumnRef>,
24}
25
26impl Default for Config {
27	fn default() -> Self {
28		Self {
29			theme: Theme::Dark,
30			audit_path: None,
31			write: false,
32			use_colours: true,
33			redact_mode: false,
34			redactions: HashSet::new(),
35		}
36	}
37}