1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#[macro_use]
extern crate log;

extern crate actix;

#[allow(unused_imports)]
#[macro_use]
extern crate actix_derive;

extern crate serde;
extern crate serde_json;
#[allow(unused_imports)]
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate error_chain;
extern crate bytes;
extern crate directories;

extern crate actix_web;
extern crate daemonize;
extern crate futures;
extern crate gu_actix;
extern crate gu_base;
extern crate libc;
extern crate tokio_fs;
extern crate tokio_io;

pub mod error {
    use actix::MailboxError;
    use serde_json;
    use std::io;

    error_chain!(
        foreign_links {
            Json(serde_json::Error);
            Io(io::Error);
        }

        errors {
            MailboxError(e : MailboxError){}
            ConcurrentChange{}
        }
    );

    impl From<MailboxError> for Error {
        fn from(e: MailboxError) -> Self {
            ErrorKind::MailboxError(e).into()
        }
    }

}

pub mod config;
#[cfg(unix)]
mod daemon;
#[cfg(unix)]
pub mod daemon_module;
pub mod file_storage;
pub mod http;
pub mod storage;