1#![cfg_attr(docsrs, feature(doc_auto_cfg))]
5pub mod config;
11pub mod net;
12#[cfg(feature = "oauth")]
13pub mod oauth;
14pub mod process;
15pub mod security;
16pub mod upstream;
17
18use thiserror::Error;
19
20#[derive(Debug, Error)]
21pub enum ConfigError {
22 #[error("{field}: {message}")]
23 InvalidField {
24 field: &'static str,
25 message: String,
26 },
27}
28
29impl ConfigError {
30 pub(crate) fn invalid(field: &'static str, message: impl Into<String>) -> Self {
31 Self::InvalidField {
32 field,
33 message: message.into(),
34 }
35 }
36}
37
38pub const VERSION: &str = env!("CARGO_PKG_VERSION");
40
41#[cfg(test)]
42#[path = "lib_tests.rs"]
43mod tests;