Add header module with spec

This commit is contained in:
Matthias Beyer 2015-10-30 18:26:04 +01:00
parent de843541f1
commit 07f223bb8a
2 changed files with 20 additions and 0 deletions

18
src/module/bm/header.rs Normal file
View file

@ -0,0 +1,18 @@
use storage::file::FileHeaderSpec as FHS;
pub fn get_spec() -> FHS {
FHS::Array {
allowed_types: vec![FHS::Map {
keys: vec![
FHS::Key { name: "ID", value_type: Box::new(FHS::Text) },
FHS::Key { name: "URL", value_type: Box::new(FHS::Text) },
FHS::Key { name: "TAGS",
value_type: Box::new(FHS::Array {
allowed_types: vec![FHS::Text]
}),
},
],
}],
}
}

View file

@ -7,6 +7,8 @@ use std::result::Result;
use clap::ArgMatches; use clap::ArgMatches;
use regex::Regex; use regex::Regex;
mod header;
pub struct BMModule { pub struct BMModule {
path: Option<String>, path: Option<String>,
} }