Moved MountPoint structure into vfs module

This commit is contained in:
Antoine Gersant 2017-07-01 11:40:31 -07:00
parent 143e1f6761
commit d70abba47e
4 changed files with 10 additions and 13 deletions

View file

@ -5,7 +5,7 @@ use std::path;
use toml;
use errors::*;
use db::MountPoint;
use vfs::MountPoint;
use ddns::DDNSConfig;
#[derive(Deserialize)]

View file

@ -9,15 +9,15 @@ use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use config::UserConfig;
use db::schema::*;
use ddns::{DDNSConfigSource, DDNSConfig};
use errors::*;
use vfs::Vfs;
use vfs::{MountPoint, Vfs};
mod index;
mod models;
mod schema;
pub use self::schema::*;
pub use self::models::*;
#[allow(dead_code)]

View file

@ -97,16 +97,6 @@ impl NewUser {
}
}
// VFS
#[derive(Debug, Deserialize, Insertable, Queryable)]
#[table_name="mount_points"]
pub struct MountPoint {
pub source: String,
pub name: String,
}
// Misc Settings
#[derive(Debug, Queryable)]
pub struct MiscSettings {

View file

@ -2,8 +2,15 @@ use std::collections::HashMap;
use std::path::PathBuf;
use std::path::Path;
use db::mount_points;
use errors::*;
#[derive(Debug, Deserialize, Insertable, Queryable)]
#[table_name="mount_points"]
pub struct MountPoint {
pub source: String,
pub name: String,
}
pub struct Vfs {
mount_points: HashMap<String, PathBuf>,