Refactor project structure and add singlethreaded feature
Signed-off-by: trivernis <trivernis@protonmail.com>main
parent
a15a713a0c
commit
40496b1686
@ -1,5 +1,5 @@
|
|||||||
use crate::command_template::CommandTemplate;
|
use crate::server::command_template::CommandTemplate;
|
||||||
use crate::error::MultihookResult;
|
use crate::utils::error::MultihookResult;
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
use std::fs::read_to_string;
|
use std::fs::read_to_string;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
@ -1,12 +1,18 @@
|
|||||||
use crate::action::HookAction;
|
|
||||||
use crate::error::MultihookError;
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use warp::http::Response;
|
use warp::http::Response;
|
||||||
use warp::hyper::body::Bytes;
|
use warp::hyper::body::Bytes;
|
||||||
use warp::{Filter, Rejection};
|
use warp::{Filter, Rejection};
|
||||||
|
|
||||||
|
use action::HookAction;
|
||||||
|
|
||||||
|
use crate::utils::error::MultihookError;
|
||||||
|
|
||||||
|
mod action;
|
||||||
|
pub mod command_template;
|
||||||
|
|
||||||
pub struct HookServer {
|
pub struct HookServer {
|
||||||
endpoints: HashMap<String, HookAction>,
|
endpoints: HashMap<String, HookAction>,
|
||||||
}
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
pub mod error;
|
||||||
|
pub mod logging;
|
||||||
|
pub mod settings;
|
@ -1,4 +1,4 @@
|
|||||||
use crate::error::MultihookResult;
|
use crate::utils::error::MultihookResult;
|
||||||
use config::File;
|
use config::File;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
Loading…
Reference in New Issue