26 lines
704 B
Rust
26 lines
704 B
Rust
use serde::{Deserialize, Serialize};
|
|
use std::collections::HashMap;
|
|
|
|
#[derive(Clone, Deserialize, Serialize)]
|
|
#[cfg_attr(feature = "config-schema", derive(schemars::JsonSchema))]
|
|
#[serde(default)]
|
|
pub struct KubernetesConfig<'a> {
|
|
pub symbol: &'a str,
|
|
pub format: &'a str,
|
|
pub style: &'a str,
|
|
pub disabled: bool,
|
|
pub context_aliases: HashMap<String, &'a str>,
|
|
}
|
|
|
|
impl<'a> Default for KubernetesConfig<'a> {
|
|
fn default() -> Self {
|
|
KubernetesConfig {
|
|
symbol: "☸ ",
|
|
format: "[$symbol$context( \\($namespace\\))]($style) in ",
|
|
style: "cyan bold",
|
|
disabled: true,
|
|
context_aliases: HashMap::new(),
|
|
}
|
|
}
|
|
}
|