2021-07-26 14:38:28 +00:00
|
|
|
//! **Rustypaste** is a minimal file upload/pastebin service.
|
2021-07-23 19:52:00 +00:00
|
|
|
#![warn(missing_docs, clippy::unwrap_used)]
|
|
|
|
|
|
|
|
/// Configuration file parser.
|
|
|
|
pub mod config;
|
|
|
|
|
2021-07-26 12:34:23 +00:00
|
|
|
/// Random URL generator.
|
|
|
|
pub mod random;
|
|
|
|
|
2021-07-23 19:52:00 +00:00
|
|
|
/// Server routes.
|
|
|
|
pub mod server;
|
|
|
|
|
2021-07-24 11:38:53 +00:00
|
|
|
/// HTTP headers.
|
|
|
|
pub mod header;
|
|
|
|
|
|
|
|
/// Auth handler.
|
|
|
|
pub mod auth;
|
2021-08-04 14:35:54 +00:00
|
|
|
|
|
|
|
/// Storage handler.
|
|
|
|
pub mod paste;
|
2021-08-09 19:28:33 +00:00
|
|
|
|
2021-10-12 16:35:06 +00:00
|
|
|
/// File metadata handler.
|
|
|
|
pub mod file;
|
|
|
|
|
2021-08-09 19:28:33 +00:00
|
|
|
/// Media type handler.
|
|
|
|
pub mod mime;
|
2021-08-27 12:54:23 +00:00
|
|
|
|
|
|
|
/// Helper functions.
|
|
|
|
pub mod util;
|
2022-03-17 12:54:08 +00:00
|
|
|
|
2023-06-05 19:49:26 +00:00
|
|
|
/// Custom middleware implementation.
|
|
|
|
pub mod middleware;
|
|
|
|
|
2023-12-05 12:12:02 +00:00
|
|
|
// Use macros from tracing crate.
|
|
|
|
#[macro_use]
|
|
|
|
extern crate tracing;
|
|
|
|
|
2022-03-17 12:54:08 +00:00
|
|
|
/// 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";
|
2023-09-03 15:47:52 +00:00
|
|
|
|
|
|
|
/// Environment variable for setting the deletion token.
|
|
|
|
pub const DELETE_TOKEN_ENV: &str = "DELETE_TOKEN";
|