feat: Add access key on config

This commit is contained in:
Quentin de Quelen 2019-02-14 15:44:11 +01:00
parent 482f750231
commit 4721da1679

View File

@ -8,12 +8,20 @@ pub enum RankingOrdering {
Dsc
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct AccessToken {
pub token: String,
pub secret_key: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Config {
pub stop_words: Option<HashSet<String>>,
pub ranking_order: Option<Vec<String>>,
pub distinct_field: Option<String>,
pub ranking_rules: Option<HashMap<String, RankingOrdering>>,
pub access_token: Option<AccessToken>,
}
@ -24,6 +32,7 @@ impl Config {
ranking_order: None,
distinct_field: None,
ranking_rules: None,
access_token: None,
}
}
}