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
//! **Rustypaste** is a minimal file upload/pastebin service.
/// Configuration file parser.
/// Random URL generator.
/// Server routes.
/// HTTP headers.
/// Auth handler.
/// Storage handler.
/// File metadata handler.
/// Media type handler.
/// Helper functions.
/// Custom middleware implementation.
// Use macros from tracing crate.
extern crate tracing;
/// Environment variable for setting the configuration file path.
pub const CONFIG_ENV: &str = "CONFIG";
/// Environment variable for setting the authentication token.
pub const AUTH_TOKEN_ENV: &str = "AUTH_TOKEN";
/// Environment variable for the path to a file containing multiple authentication token.
pub const AUTH_TOKENS_FILE_ENV: &str = "AUTH_TOKENS_FILE";
/// Environment variable for setting the deletion token.
pub const DELETE_TOKEN_ENV: &str = "DELETE_TOKEN";
/// Environment variable for the path to a file containing multiple deletion token.
pub const DELETE_TOKENS_FILE_ENV: &str = "DELETE_TOKENS_FILE";