Moved MountPoint structure into vfs module
This commit is contained in:
parent
143e1f6761
commit
d70abba47e
4 changed files with 10 additions and 13 deletions
|
@ -5,7 +5,7 @@ use std::path;
|
||||||
use toml;
|
use toml;
|
||||||
|
|
||||||
use errors::*;
|
use errors::*;
|
||||||
use db::MountPoint;
|
use vfs::MountPoint;
|
||||||
use ddns::DDNSConfig;
|
use ddns::DDNSConfig;
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
|
|
@ -9,15 +9,15 @@ use std::path::{Path, PathBuf};
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
|
|
||||||
use config::UserConfig;
|
use config::UserConfig;
|
||||||
use db::schema::*;
|
|
||||||
use ddns::{DDNSConfigSource, DDNSConfig};
|
use ddns::{DDNSConfigSource, DDNSConfig};
|
||||||
use errors::*;
|
use errors::*;
|
||||||
use vfs::Vfs;
|
use vfs::{MountPoint, Vfs};
|
||||||
|
|
||||||
mod index;
|
mod index;
|
||||||
mod models;
|
mod models;
|
||||||
mod schema;
|
mod schema;
|
||||||
|
|
||||||
|
pub use self::schema::*;
|
||||||
pub use self::models::*;
|
pub use self::models::*;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
|
|
|
@ -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
|
// Misc Settings
|
||||||
#[derive(Debug, Queryable)]
|
#[derive(Debug, Queryable)]
|
||||||
pub struct MiscSettings {
|
pub struct MiscSettings {
|
||||||
|
|
|
@ -2,8 +2,15 @@ use std::collections::HashMap;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
use db::mount_points;
|
||||||
use errors::*;
|
use errors::*;
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize, Insertable, Queryable)]
|
||||||
|
#[table_name="mount_points"]
|
||||||
|
pub struct MountPoint {
|
||||||
|
pub source: String,
|
||||||
|
pub name: String,
|
||||||
|
}
|
||||||
|
|
||||||
pub struct Vfs {
|
pub struct Vfs {
|
||||||
mount_points: HashMap<String, PathBuf>,
|
mount_points: HashMap<String, PathBuf>,
|
||||||
|
|
Loading…
Add table
Reference in a new issue