Fix all compilation issues.
This commit is contained in:
Generated
+52
-31
@@ -21,9 +21,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "actix-http"
|
||||
version = "3.12.1"
|
||||
version = "3.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93acb4a42f64936f9b8cae4a433b237599dd6eb6ed06124eb67132ef8cc90662"
|
||||
checksum = "48e2faa3e7418ed780cca54829d32782a4008a077230f67457caa063415e99c2"
|
||||
dependencies = [
|
||||
"actix-codec",
|
||||
"actix-rt",
|
||||
@@ -38,7 +38,7 @@ dependencies = [
|
||||
"derive_more",
|
||||
"encoding_rs",
|
||||
"flate2",
|
||||
"foldhash 0.1.5",
|
||||
"foldhash 0.2.0",
|
||||
"futures-core",
|
||||
"h2",
|
||||
"http 0.2.12",
|
||||
@@ -50,7 +50,7 @@ dependencies = [
|
||||
"mime",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"rand 0.10.1",
|
||||
"rand 0.10.2",
|
||||
"sha1",
|
||||
"smallvec",
|
||||
"tokio",
|
||||
@@ -131,7 +131,7 @@ dependencies = [
|
||||
"actix-service",
|
||||
"actix-utils",
|
||||
"futures-core",
|
||||
"impl-more",
|
||||
"impl-more 0.1.9",
|
||||
"pin-project-lite",
|
||||
"rustls-pki-types",
|
||||
"tokio",
|
||||
@@ -152,9 +152,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "actix-web"
|
||||
version = "4.13.0"
|
||||
version = "4.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ff87453bc3b56e9b2b23c1cc0b1be8797184accf51d2abe0f8a33ec275d316bf"
|
||||
checksum = "df09e2d9239703dd64056359c920c7f3fba6535ec61a0059e0f44e095ffe02b4"
|
||||
dependencies = [
|
||||
"actix-codec",
|
||||
"actix-http",
|
||||
@@ -172,10 +172,10 @@ dependencies = [
|
||||
"cookie",
|
||||
"derive_more",
|
||||
"encoding_rs",
|
||||
"foldhash 0.1.5",
|
||||
"foldhash 0.2.0",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"impl-more",
|
||||
"impl-more 0.3.1",
|
||||
"itoa",
|
||||
"language-tags",
|
||||
"log",
|
||||
@@ -444,9 +444,9 @@ checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
|
||||
|
||||
[[package]]
|
||||
name = "bcrypt"
|
||||
version = "0.19.1"
|
||||
version = "0.19.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24ae5479c93d3720e4c1dbd6b945b97457c50cb672781104768190371df1a905"
|
||||
checksum = "7f3c067aa24dd4ed5c79cf222a38f260c8f23d3b82a062fba3f28c6fe563b753"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"blowfish",
|
||||
@@ -568,9 +568,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.44"
|
||||
version = "0.4.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0"
|
||||
checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
|
||||
dependencies = [
|
||||
"iana-time-zone",
|
||||
"js-sys",
|
||||
@@ -895,9 +895,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "diesel"
|
||||
version = "2.3.10"
|
||||
version = "2.3.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29fe29a87fb84c631ffb3ba21798c4b1f3a964701ba78f0dce4bf8668562ec88"
|
||||
checksum = "e54d1f576cd3a3460f212a4615fd12ce1b6303c095b79a44449ffbe627753dc1"
|
||||
dependencies = [
|
||||
"diesel_derives",
|
||||
"downcast-rs",
|
||||
@@ -1091,9 +1091,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "env_filter"
|
||||
version = "1.0.1"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef"
|
||||
checksum = "900d271a03799a1ee8d1ca9b19893b48ca674a9284fefcfb85f05e74ed314217"
|
||||
dependencies = [
|
||||
"log",
|
||||
"regex",
|
||||
@@ -1101,9 +1101,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.11.10"
|
||||
version = "0.11.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a"
|
||||
checksum = "de671bd27a75a797dc9ae289ba1e77276e75e2026408aab65185384e2d5cd3f6"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
@@ -1636,6 +1636,12 @@ version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e8a5a9a0ff0086c7a148acb942baaabeadf9504d10400b5a05645853729b9cd2"
|
||||
|
||||
[[package]]
|
||||
name = "impl-more"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "35a84fd5aa25fae5c0f4a33d9cac2ca017fc622cbd089be2229993514990f870"
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.14.0"
|
||||
@@ -1717,9 +1723,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "jsonwebtoken"
|
||||
version = "10.3.0"
|
||||
version = "10.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0529410abe238729a60b108898784df8984c87f6054c9c4fcacc47e4803c1ce1"
|
||||
checksum = "eba32bfb4ffdeaca3e34431072faf01745c9b26d25504aa7a6cf5684334fc4fc"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"ed25519-dalek",
|
||||
@@ -1736,6 +1742,7 @@ dependencies = [
|
||||
"sha2",
|
||||
"signature",
|
||||
"simple_asn1",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1816,9 +1823,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.29"
|
||||
version = "0.4.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
||||
checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
|
||||
|
||||
[[package]]
|
||||
name = "lumiere"
|
||||
@@ -1850,7 +1857,7 @@ dependencies = [
|
||||
"log",
|
||||
"lumiere-domain",
|
||||
"mime",
|
||||
"rand 0.10.1",
|
||||
"rand 0.10.2",
|
||||
"tokio",
|
||||
"uuid",
|
||||
]
|
||||
@@ -1891,7 +1898,7 @@ dependencies = [
|
||||
"diesel_migrations",
|
||||
"log",
|
||||
"lumiere-domain",
|
||||
"rand 0.10.1",
|
||||
"rand 0.10.2",
|
||||
"rusqlite",
|
||||
"sysinfo",
|
||||
"tokio",
|
||||
@@ -2334,9 +2341,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207"
|
||||
checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
|
||||
dependencies = [
|
||||
"chacha20",
|
||||
"getrandom 0.4.2",
|
||||
@@ -2849,9 +2856,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sysinfo"
|
||||
version = "0.39.1"
|
||||
version = "0.39.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4deba334e1190ba7cb498327affa11e5ece10d26a30ab2f27fcf09504b8d8b6"
|
||||
checksum = "d2071df9448915b71c4fe6d25deaf1c22f12bd234f01540b77312bb8e41361e6"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"memchr",
|
||||
@@ -3137,9 +3144,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "1.23.1"
|
||||
version = "1.23.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76"
|
||||
checksum = "ea5fab0d6c3c01ae70085a09cb03d4c7a1d6314e2b3e075392783396d724ca0a"
|
||||
dependencies = [
|
||||
"getrandom 0.4.2",
|
||||
"js-sys",
|
||||
@@ -3657,6 +3664,20 @@ name = "zeroize"
|
||||
version = "1.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
|
||||
dependencies = [
|
||||
"zeroize_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zeroize_derive"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerotrie"
|
||||
|
||||
@@ -13,11 +13,11 @@ lumiere-application = { path = "../application" }
|
||||
lumiere-infrastructure = { path = "../infrastructure" }
|
||||
lumiere-exposition = { path = "../exposition" }
|
||||
|
||||
actix-web = { version = "4.13.0", features = ["rustls-0_23"] }
|
||||
diesel = { version = "2.0", features = ["sqlite"] }
|
||||
actix-web = { version = "4.14.0", features = ["rustls-0_23"] }
|
||||
diesel = { version = "2.3.11", features = ["sqlite"] }
|
||||
dotenv = "0.15.0"
|
||||
env_logger = "0.11.10"
|
||||
log = "0.4.29"
|
||||
env_logger = "0.11.11"
|
||||
log = "0.4.33"
|
||||
rusqlite = { version = "0.39.0", features = ["bundled"] }
|
||||
rustls = "0.23.37"
|
||||
rustls-pemfile = "2.2.0"
|
||||
|
||||
@@ -6,16 +6,16 @@ use rusqlite::Connection;
|
||||
use std::env;
|
||||
use std::io::{Error, ErrorKind};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use surveillant_systeme_application::configuration::service::ConfigurationService;
|
||||
use surveillant_systeme_application::user::service::UserService;
|
||||
use surveillant_systeme_infrastructure::common::database_connection::DatabaseConnection;
|
||||
use surveillant_systeme_infrastructure::common::database_initialisation::initialise_database_tables;
|
||||
use surveillant_systeme_infrastructure::configuration::adapter::ConfigurationSqliteAdapter;
|
||||
use surveillant_systeme_infrastructure::configuration::repository::ConfigurationSqliteRepository;
|
||||
use surveillant_systeme_infrastructure::user::adapter::UserSqliteAdapter;
|
||||
use surveillant_systeme_infrastructure::user::diesel_adapter::UserDieselAdapter;
|
||||
use surveillant_systeme_infrastructure::user::diesel_repository::UserDieselRepository;
|
||||
use surveillant_systeme_infrastructure::user::repository::UserSqliteRepository;
|
||||
use lumiere_application::configuration::service::ConfigurationService;
|
||||
use lumiere_application::user::service::UserService;
|
||||
use lumiere_infrastructure::common::database_connection::DatabaseConnection;
|
||||
use lumiere_infrastructure::common::database_initialisation::initialise_database_tables;
|
||||
use lumiere_infrastructure::configuration::adapter::ConfigurationSqliteAdapter;
|
||||
use lumiere_infrastructure::configuration::repository::ConfigurationSqliteRepository;
|
||||
use lumiere_infrastructure::user::adapter::UserSqliteAdapter;
|
||||
use lumiere_infrastructure::user::diesel_adapter::UserDieselAdapter;
|
||||
use lumiere_infrastructure::user::diesel_repository::UserDieselRepository;
|
||||
use lumiere_infrastructure::user::repository::UserSqliteRepository;
|
||||
|
||||
pub struct ApplicationContext {
|
||||
pub database_connection: Arc<Mutex<Connection>>,
|
||||
|
||||
@@ -11,9 +11,9 @@ use std::fs::File;
|
||||
use std::io::{BufReader, Error};
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use surveillant_systeme_exposition::init;
|
||||
use surveillant_systeme_exposition::video::video_format_content_type_mapper::map_to_content_type;
|
||||
use surveillant_systeme_infrastructure::video::video_format_detector::get_content_type;
|
||||
use lumiere_exposition::init;
|
||||
use lumiere_exposition::video::video_format_content_type_mapper::map_to_content_type;
|
||||
use lumiere_infrastructure::video::video_format_detector::get_content_type;
|
||||
use tokio_cron_scheduler::{Job, JobScheduler};
|
||||
|
||||
#[actix_web::main]
|
||||
@@ -31,35 +31,36 @@ async fn main() -> std::io::Result<()> {
|
||||
|
||||
let application_context = ApplicationContext::init()?;
|
||||
|
||||
let tls_config = init_tls_configuration()?;
|
||||
// let tls_config = init_tls_configuration()?;
|
||||
let server = HttpServer::new(
|
||||
move || App::new().configure(init)
|
||||
.app_data(web::Data::new(Arc::new(application_context.user_service.clone())))
|
||||
)
|
||||
.bind_rustls_0_23(("0.0.0.0", 19000), tls_config)
|
||||
.bind("0.0.0.0:19000")
|
||||
// .bind_rustls_0_23(("0.0.0.0", 19000), tls_config)
|
||||
.expect("Unable to start server");
|
||||
|
||||
server.run().await
|
||||
}
|
||||
|
||||
fn init_tls_configuration() -> Result<ServerConfig, Error> {
|
||||
let mut certs_file = BufReader::new(File::open("./certs/lumiere.crt")?);
|
||||
let mut key_file = BufReader::new(File::open("./certs/lumiere.key")?);
|
||||
|
||||
let tls_certs = rustls_pemfile::certs(&mut certs_file)
|
||||
.collect::<Result<Vec<_>, _>>().expect("Unable to read the TLS certificate…");
|
||||
let tls_key = rustls_pemfile::pkcs8_private_keys(&mut key_file)
|
||||
.next()
|
||||
.unwrap()
|
||||
.expect("Unable to read the private key for TLS configuration…");
|
||||
|
||||
let tls_config = rustls::ServerConfig::builder()
|
||||
.with_no_client_auth()
|
||||
.with_single_cert(tls_certs, rustls::pki_types::PrivateKeyDer::Pkcs8(tls_key))
|
||||
.unwrap();
|
||||
|
||||
Ok(tls_config)
|
||||
}
|
||||
// fn init_tls_configuration() -> Result<ServerConfig, Error> {
|
||||
// let mut certs_file = BufReader::new(File::open("./certs/lumiere.crt")?);
|
||||
// let mut key_file = BufReader::new(File::open("./certs/lumiere.key")?);
|
||||
//
|
||||
// let tls_certs = rustls_pemfile::certs(&mut certs_file)
|
||||
// .collect::<Result<Vec<_>, _>>().expect("Unable to read the TLS certificate…");
|
||||
// let tls_key = rustls_pemfile::pkcs8_private_keys(&mut key_file)
|
||||
// .next()
|
||||
// .unwrap()
|
||||
// .expect("Unable to read the private key for TLS configuration…");
|
||||
//
|
||||
// let tls_config = rustls::ServerConfig::builder()
|
||||
// .with_no_client_auth()
|
||||
// .with_single_cert(tls_certs, rustls::pki_types::PrivateKeyDer::Pkcs8(tls_key))
|
||||
// .unwrap();
|
||||
//
|
||||
// Ok(tls_config)
|
||||
// }
|
||||
|
||||
|
||||
fn check_all_variables_are_set() {
|
||||
|
||||
Reference in New Issue
Block a user