Add asynchronous call to database.
[recipes.git] / backend / src / consts.rs
1
2 use std::time::Duration;
3
4 pub const FILE_CONF: &str = "conf.ron";
5 pub const DB_DIRECTORY: &str = "data";
6 pub const DB_FILENAME: &str = "recipes.sqlite";
7 pub const SQL_FILENAME: &str = "sql/version_{VERSION}.sql";
8 pub const VALIDATION_TOKEN_DURATION: i64 = 1 * 60 * 60; // 1 hour. [s].
9 pub const REVERSE_PROXY_IP_HTTP_FIELD: &str = "x-real-ip";
10 pub const COOKIE_AUTH_TOKEN_NAME: &str = "auth_token";
11 pub const AUTHENTICATION_TOKEN_SIZE: usize = 32; // Number of alphanumeric characters for cookie authentication token.
12 pub const SEND_EMAIL_TIMEOUT: Duration = Duration::from_secs(60);