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
use serde::{Deserialize, Serialize};
use serde_with::rust::string_empty_as_none;
use crate::command::types::RegistryType;
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct BridgerConfig {
pub registry: BridgerRegistry,
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct BridgerRegistry {
#[serde(rename = "type")]
pub type_: RegistryType,
#[serde(with = "string_empty_as_none")]
pub path: Option<String>,
#[serde(with = "string_empty_as_none")]
pub version: Option<String>,
}
impl Default for BridgerRegistry {
fn default() -> Self {
Self {
type_: RegistryType::Github,
path: Some("https://github.com/darwinia-network/bridger".to_string()),
version: None,
}
}
}