X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=backend%2Fsrc%2Fconsts.rs;h=45167a389115810849b53dcb6d316fb463f95441;hb=0a1631e66c861de2799cd98fc93686ff121c9fce;hp=b9f1e4139c3f815ae2887d375383a1347ef9b15e;hpb=44826a7edd68c0111273dac0ac4a3a705a6534cf;p=recipes.git diff --git a/backend/src/consts.rs b/backend/src/consts.rs index b9f1e41..45167a3 100644 --- a/backend/src/consts.rs +++ b/backend/src/consts.rs @@ -1 +1,11 @@ -pub static FILE_CONF: &str = "conf.ron"; \ No newline at end of file +use std::time::Duration; + +pub const FILE_CONF: &str = "conf.ron"; +pub const DB_DIRECTORY: &str = "data"; +pub const DB_FILENAME: &str = "recipes.sqlite"; +pub const SQL_FILENAME: &str = "sql/version_{VERSION}.sql"; +pub const VALIDATION_TOKEN_DURATION: i64 = 1 * 60 * 60; // 1 hour. [s]. +pub const REVERSE_PROXY_IP_HTTP_FIELD: &str = "x-real-ip"; +pub const COOKIE_AUTH_TOKEN_NAME: &str = "auth_token"; +pub const AUTHENTICATION_TOKEN_SIZE: usize = 32; // Number of alphanumeric characters for cookie authentication token. +pub const SEND_EMAIL_TIMEOUT: Duration = Duration::from_secs(60);