Add header module with spec
This commit is contained in:
parent
de843541f1
commit
07f223bb8a
2 changed files with 20 additions and 0 deletions
18
src/module/bm/header.rs
Normal file
18
src/module/bm/header.rs
Normal 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]
|
||||
}),
|
||||
},
|
||||
],
|
||||
}],
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,8 @@ use std::result::Result;
|
|||
use clap::ArgMatches;
|
||||
use regex::Regex;
|
||||
|
||||
mod header;
|
||||
|
||||
pub struct BMModule {
|
||||
path: Option<String>,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue