Add configuration.rs

This commit is contained in:
Matthias Beyer 2016-03-05 11:37:06 +01:00
parent a771db9ea4
commit 1fe545eb8b
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,50 @@
use config::types::{Config, Value};
use hook::position::HookPosition;
pub fn config_is_valid(config: &Config) -> bool {
unimplemented!()
}
pub fn get_pre_read_aspect_names(value: &Value) -> Vec<String> {
get_aspect_names_for_aspect_position(HookPosition::PreRead, value)
}
pub fn get_post_read_aspect_names(value: &Value) -> Vec<String> {
get_aspect_names_for_aspect_position(HookPosition::PostRead, value)
}
pub fn get_pre_create_aspect_names(value: &Value) -> Vec<String> {
get_aspect_names_for_aspect_position(HookPosition::PreCreate, value)
}
pub fn get_post_create_aspect_names(value: &Value) -> Vec<String> {
get_aspect_names_for_aspect_position(HookPosition::PostCreate, value)
}
pub fn get_pre_retrieve_aspect_names(value: &Value) -> Vec<String> {
get_aspect_names_for_aspect_position(HookPosition::PreRetrieve, value)
}
pub fn get_post_retrieve_aspect_names(value: &Value) -> Vec<String> {
get_aspect_names_for_aspect_position(HookPosition::PostRetrieve, value)
}
pub fn get_pre_update_aspect_names(value: &Value) -> Vec<String> {
get_aspect_names_for_aspect_position(HookPosition::PreUpdate, value)
}
pub fn get_post_update_aspect_names(value: &Value) -> Vec<String> {
get_aspect_names_for_aspect_position(HookPosition::PostUpdate, value)
}
pub fn get_pre_delete_aspect_names(value: &Value) -> Vec<String> {
get_aspect_names_for_aspect_position(HookPosition::PreDelete, value)
}
pub fn get_post_delete_aspect_names(value: &Value) -> Vec<String> {
get_aspect_names_for_aspect_position(HookPosition::PostDelete, value)
}
fn get_aspect_names_for_aspect_position(position: HookPosition, value: &Value) -> Vec<String> {
unimplemented!()
}

View file

@ -13,5 +13,6 @@ pub mod storeid;
pub mod error;
pub mod hook;
pub mod store;
mod configuration;
mod lazyfile;