mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-25 00:38:22 +00:00
> This is currently a WIP and all features are subject to alteration or removal at any time. ## Overview The successor to #2873. Contains the backbone of `beacon.watch` including syncing code, the initial API, and several core database tables. See `watch/README.md` for more information, requirements and usage.
41 lines
784 B
Rust
41 lines
784 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
pub const fn enabled() -> bool {
|
|
false
|
|
}
|
|
|
|
pub const fn url() -> Option<String> {
|
|
None
|
|
}
|
|
|
|
pub const fn username() -> Option<String> {
|
|
None
|
|
}
|
|
|
|
pub const fn password() -> Option<String> {
|
|
None
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct Config {
|
|
#[serde(default = "enabled")]
|
|
pub enabled: bool,
|
|
#[serde(default = "url")]
|
|
pub url: Option<String>,
|
|
#[serde(default = "username")]
|
|
pub username: Option<String>,
|
|
#[serde(default = "password")]
|
|
pub password: Option<String>,
|
|
}
|
|
|
|
impl Default for Config {
|
|
fn default() -> Self {
|
|
Config {
|
|
enabled: enabled(),
|
|
url: url(),
|
|
username: username(),
|
|
password: password(),
|
|
}
|
|
}
|
|
}
|