1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! Configuration and settings for Genja Core.
//!
//! This module defines the configuration structs that drive Genja behavior,
//! plus helpers for loading from config files and environment variables.
//!
//! **Key points**
//! - All configs implement `Default` and can be created with `::default()`.
//! - Builders allow partial configuration; missing fields are filled with defaults.
//! - `Settings::from_file` loads JSON or YAML and validates SSH config when present.
//!
//! # Configuration Precedence
//!
//! 1. Configuration files (JSON/YAML) are loaded first
//! 2. Environment variables provide defaults for missing fields
//! 3. Hard-coded defaults are used as final fallback
//!
//! # Environment Variables
//!
//! The following environment variables are supported:
//!
//! - `GENJA_CORE_RAISE_ON_ERROR` - Controls error handling behavior (default: false)
//! - `GENJA_INVENTORY_PLUGIN` - Inventory plugin name (default: "FileInventoryPlugin")
//! - `GENJA_RUNNER_PLUGIN` - Runner plugin name (default: "threaded")
//! - `GENJA_LOGGING_LEVEL` - Log level (default: "info")
//! - `GENJA_LOGGING_LOG_FILE` - Log file path (default: "genja.log")
//! - `GENJA_LOGGING_TO_CONSOLE` - Enable console logging (default: false)
//!
//! # Settings Reference
//!
//! See `docs/settings.md` for a complete schema summary and example config files.
//!
//! # Examples
//!
//! ## Defaults
//! ```
//! use genja_core::Settings;
//!
//! let settings = Settings::default();
//! ```
//!
//! ## Builders
//! ```
//! use genja_core::Settings;
//! use genja_core::settings::{LoggingConfig, RunnerConfig};
//!
//! let settings = Settings::builder()
//! .logging(LoggingConfig::builder().level("debug").build())
//! .runner(RunnerConfig::builder().plugin("threaded").build())
//! .build();
//! ```
//!
//! ## Load From File
//! ```no_run
//! use genja_core::Settings;
//!
//! let settings = Settings::from_file("config.yaml")?;
//! # Ok::<(), genja_core::ConfigLoadError>(())
//! ```
//!
//! ## SSH Validation
//! SSH config is validated automatically when calling `Settings::from_file`.
//! For manual validation, use `SSHConfig::validate`.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;