2022-03-26 10:42:19 +01:00
|
|
|
use serde::{Deserialize, Serialize};
|
2020-08-04 06:30:20 +09:00
|
|
|
use std::collections::HashMap;
|
|
|
|
|
|
2022-03-26 10:42:19 +01:00
|
|
|
#[derive(Clone, Deserialize, Serialize)]
|
|
|
|
|
#[serde(default)]
|
2020-08-04 06:30:20 +09:00
|
|
|
pub struct GcloudConfig<'a> {
|
|
|
|
|
pub format: &'a str,
|
|
|
|
|
pub symbol: &'a str,
|
|
|
|
|
pub style: &'a str,
|
|
|
|
|
pub disabled: bool,
|
|
|
|
|
pub region_aliases: HashMap<String, &'a str>,
|
2022-02-14 21:16:45 +09:00
|
|
|
pub project_aliases: HashMap<String, &'a str>,
|
2020-08-04 06:30:20 +09:00
|
|
|
}
|
|
|
|
|
|
2021-03-15 11:40:52 +01:00
|
|
|
impl<'a> Default for GcloudConfig<'a> {
|
|
|
|
|
fn default() -> Self {
|
2020-08-04 06:30:20 +09:00
|
|
|
GcloudConfig {
|
2021-04-30 08:19:54 +02:00
|
|
|
format: "on [$symbol$account(@$domain)(\\($region\\))]($style) ",
|
2021-04-29 19:18:20 +02:00
|
|
|
symbol: "☁️ ",
|
2020-08-04 06:30:20 +09:00
|
|
|
style: "bold blue",
|
|
|
|
|
disabled: false,
|
|
|
|
|
region_aliases: HashMap::new(),
|
2022-02-14 21:16:45 +09:00
|
|
|
project_aliases: HashMap::new(),
|
2020-08-04 06:30:20 +09:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|