From 567713b4c309d55a56f12ad2695d446bb662a09e Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sat, 8 Dec 2018 14:51:08 +0100 Subject: [PATCH] rename data_store to datastore --- src/api3/config/datastore.rs | 6 ++++++ src/config/{data_store.rs => datastore.rs} | 2 +- src/lib.rs | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) rename src/config/{data_store.rs => datastore.rs} (95%) diff --git a/src/api3/config/datastore.rs b/src/api3/config/datastore.rs index ee6e82aa..2e755512 100644 --- a/src/api3/config/datastore.rs +++ b/src/api3/config/datastore.rs @@ -5,8 +5,14 @@ use crate::api::schema::*; use crate::api::router::*; use serde_json::{json, Value}; +use crate::config::datastore; + fn datastore_list(param: Value, _info: &ApiMethod) -> Result { println!("This is a test {}", param); + + let config = datastore::config().unwrap(); + + Ok(json!({})) } diff --git a/src/config/data_store.rs b/src/config/datastore.rs similarity index 95% rename from src/config/data_store.rs rename to src/config/datastore.rs index c73234ac..62c9a14b 100644 --- a/src/config/data_store.rs +++ b/src/config/datastore.rs @@ -34,7 +34,7 @@ fn init() -> SectionConfig { const DATASTORE_CFG_FILENAME: &str = "/etc/proxmox-backup/datastore.cfg"; -fn config() -> Result { +pub fn config() -> Result { let mut file = match OpenOptions::new() .create(true) diff --git a/src/lib.rs b/src/lib.rs index 55b88080..c37a5015 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,7 +37,7 @@ pub mod backup { pub mod config { - pub mod data_store; + pub mod datastore; } pub mod storage {