Add idnot config
This commit is contained in:
parent
c8f4c45e3e
commit
e7a685056c
@ -11,11 +11,15 @@ pub struct Config {
|
|||||||
pub core_url: String,
|
pub core_url: String,
|
||||||
pub core_wallet: Option<String>,
|
pub core_wallet: Option<String>,
|
||||||
pub ws_url: String,
|
pub ws_url: String,
|
||||||
|
pub http_url: String,
|
||||||
pub wallet_name: String,
|
pub wallet_name: String,
|
||||||
pub network: Network,
|
pub network: Network,
|
||||||
pub electrum_url: String,
|
pub electrum_url: String,
|
||||||
pub zmq_url: String,
|
pub zmq_url: String,
|
||||||
pub data_dir: String,
|
pub data_dir: String,
|
||||||
|
pub idnot_client_secret: Option<String>,
|
||||||
|
pub idnot_client_id: Option<String>,
|
||||||
|
pub idnot_redirect_uri: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Config {
|
impl Config {
|
||||||
@ -53,6 +57,10 @@ impl Config {
|
|||||||
.remove("ws_url")
|
.remove("ws_url")
|
||||||
.ok_or(Error::msg("No \"ws_url\""))?
|
.ok_or(Error::msg("No \"ws_url\""))?
|
||||||
.to_owned(),
|
.to_owned(),
|
||||||
|
http_url: file_content
|
||||||
|
.remove("http_url")
|
||||||
|
.ok_or(Error::msg("No \"http_url\""))?
|
||||||
|
.to_owned(),
|
||||||
wallet_name: file_content
|
wallet_name: file_content
|
||||||
.remove("wallet_name")
|
.remove("wallet_name")
|
||||||
.ok_or(Error::msg("No \"wallet_name\""))?
|
.ok_or(Error::msg("No \"wallet_name\""))?
|
||||||
@ -75,6 +83,12 @@ impl Config {
|
|||||||
.remove("data_dir")
|
.remove("data_dir")
|
||||||
.ok_or(Error::msg("No \"data_dir\""))?
|
.ok_or(Error::msg("No \"data_dir\""))?
|
||||||
.to_owned(),
|
.to_owned(),
|
||||||
|
idnot_client_id: file_content
|
||||||
|
.remove("idnot_client_id"),
|
||||||
|
idnot_client_secret: file_content
|
||||||
|
.remove("idnot_client_secret"),
|
||||||
|
idnot_redirect_uri: file_content
|
||||||
|
.remove("idnot_redirect_uri"),
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(config)
|
Ok(config)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user