use crate::conductor::paths::KeystorePath;
use schemars::JsonSchema;
use serde::Deserialize;
use serde::Serialize;
#[derive(Deserialize, Serialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum KeystoreConfig {
DangerTestKeystore,
LairServer {
#[schemars(schema_with = "holochain_util::jsonschema::url2_schema")]
connection_url: url2::Url2,
},
LairServerInProc {
#[serde(default, skip_serializing_if = "Option::is_none")]
lair_root: Option<KeystorePath>,
},
}
impl Default for KeystoreConfig {
fn default() -> KeystoreConfig {
KeystoreConfig::LairServerInProc { lair_root: None }
}
}