summaryrefslogtreecommitdiffstats
path: root/src/schema.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/schema.rs')
-rw-r--r--src/schema.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/schema.rs b/src/schema.rs
index c8579e1..87663cd 100644
--- a/src/schema.rs
+++ b/src/schema.rs
@@ -3,6 +3,18 @@ use failure::{err_msg, Error};
use std::collections::HashSet;
#[derive(serde_derive::Deserialize, Debug)]
+#[serde(deny_unknown_fields, rename_all = "kebab-case")]
+pub(crate) struct Config {
+ allowed_mailing_lists_domains: HashSet<String>,
+}
+
+impl Config {
+ pub(crate) fn allowed_mailing_lists_domains(&self) -> &HashSet<String> {
+ &self.allowed_mailing_lists_domains
+ }
+}
+
+#[derive(serde_derive::Deserialize, Debug)]
#[serde(deny_unknown_fields)]
pub(crate) struct Person {
name: String,