Skip to content

Commit

Permalink
http_server name_refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
amigin committed Dec 2, 2024
1 parent 072a075 commit 154a91e
Show file tree
Hide file tree
Showing 104 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/db_transactions/json_parser/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use my_no_sql_sdk::core::my_json::json_reader::JsonArrayIterator;
use crate::{
db_operations::transactions::TransactionOperationError,
db_transactions::steps::TransactionalOperationStep,
http::controllers::transactions::models::JsonBaseTransaction,
http_server::controllers::transactions::models::JsonBaseTransaction,
};

use super::models::{
Expand Down
2 changes: 1 addition & 1 deletion src/grpc/writer_grpc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::server::MyNoSqlServerWriterGrpcSerice;
use crate::db_operations::UpdateStatistics;
use crate::db_sync::EventSource;
use crate::http::controllers::ToSetExpirationTime;
use crate::http_server::controllers::ToSetExpirationTime;
use crate::mynosqlserver_grpc::writer_server::Writer;
use crate::mynosqlserver_grpc::*;
use futures_core::Stream;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use my_http_server::types::RawDataTyped;

use crate::{
db_sync::DataSynchronizationPeriod,
http::controllers::row_controller::models::BaseDbRowContract,
http_server::controllers::row_controller::models::BaseDbRowContract,
};

#[derive(MyHttpInput)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{
app::AppContext,
data_readers::{http_connection::HttpPayload, DataReaderConnection},
db_operations::DbOperationError,
http::{controllers::mappers::ToSetExpirationTime, http_sessions::HttpSessionsSupport},
http_server::{controllers::mappers::ToSetExpirationTime, http_sessions::HttpSessionsSupport},
};

use super::models::{GetChangesInputModel, UpdateExpirationDateTime};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use my_http_server::macros::*;
use my_http_server::types::RawDataTyped;
use serde::{Deserialize, Serialize};

use crate::http::controllers::row_controller::models::BaseDbRowContract;
use crate::http_server::controllers::row_controller::models::BaseDbRowContract;

#[derive(MyHttpInput)]
pub struct DataReaderGreetingInputModel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use my_http_server::macros::*;
use my_http_server::{HttpContext, HttpFailResult, HttpOkResult, HttpOutput};
use std::sync::Arc;

use crate::{app::AppContext, http::http_sessions::HttpSessionsSupport};
use crate::{app::AppContext, http_server::http_sessions::HttpSessionsSupport};

use super::models::PingInputModel;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{app::AppContext, http::http_sessions::*};
use crate::{app::AppContext, http_server::http_sessions::*};
use my_http_server::macros::*;
use my_http_server::{HttpContext, HttpFailResult, HttpOkResult, HttpOutput};
use std::sync::Arc;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use my_http_server::macros::*;
use my_http_server::{HttpContext, HttpFailResult, HttpOkResult};
use std::sync::Arc;

use crate::{app::AppContext, http::controllers::row_controller::models::BaseDbRowContract};
use crate::{app::AppContext, http_server::controllers::row_controller::models::BaseDbRowContract};

use super::models::NextMultipartRequestInputContract;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};

use crate::{
db_operations::UpdateStatistics, db_sync::DataSynchronizationPeriod,
http::controllers::mappers::ToSetExpirationTime,
http_server::controllers::mappers::ToSetExpirationTime,
};

#[derive(MyHttpInput)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use my_http_server::{HttpContext, HttpFailResult, HttpOkResult};
use my_no_sql_sdk::core::rust_extensions::date_time::DateTimeAsMicroseconds;
use std::sync::Arc;

use crate::{app::AppContext, http::controllers::row_controller::models::BaseDbRowContract};
use crate::{app::AppContext, http_server::controllers::row_controller::models::BaseDbRowContract};

use super::models::GetHighestRowsAndBelowInputContract;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use my_http_server::{HttpContext, HttpFailResult, HttpOkResult};
use my_no_sql_sdk::core::rust_extensions::date_time::DateTimeAsMicroseconds;
use std::sync::Arc;

use crate::{app::AppContext, http::controllers::row_controller::models::BaseDbRowContract};
use crate::{app::AppContext, http_server::controllers::row_controller::models::BaseDbRowContract};

use super::models::GetSinglePartitionMultipleRowsActionInputContract;

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};

use crate::{
db_operations::UpdateStatistics, db_sync::DataSynchronizationPeriod,
http::controllers::mappers::ToSetExpirationTime,
http_server::controllers::mappers::ToSetExpirationTime,
};
#[derive(MyHttpInput)]
pub struct GetHighestRowsAndBelowInputContract {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{app::AppContext, http::controllers::partitions::GetPartitionsAmountContract};
use crate::{app::AppContext, http_server::controllers::partitions::GetPartitionsAmountContract};
use my_http_server::macros::*;
use my_http_server::{HttpContext, HttpFailResult, HttpOkResult, HttpOutput};
use std::{result::Result, sync::Arc};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use my_http_server::{HttpContext, HttpFailResult, HttpOkResult, HttpOutput, WebC
use my_no_sql_sdk::core::db_json_entity::JsonTimeStamp;
use std::sync::Arc;

use crate::{app::AppContext, db_sync::EventSource, http::contracts::input_params};
use crate::{app::AppContext, db_sync::EventSource, http_server::contracts::input_params};

use super::models::TableMigrationInputContract;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/http/get_table.rs → src/http_server/get_table.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use my_http_server::{HttpFailResult, WebContentType};

use crate::http::mappers::db_operation_error::OPERATION_FAIL_HTTP_STATUS_CODE;
use crate::http_server::mappers::db_operation_error::OPERATION_FAIL_HTTP_STATUS_CODE;

use super::mappers::{OperationFailHttpContract, OperationFailReason};

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/http/start_up.rs → src/http_server/start_up.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::app::AppContext;
pub fn setup_server(app: &Arc<AppContext>) -> HttpConnectionsCounter {
let mut http_server = MyHttpServer::new(SocketAddr::from(([0, 0, 0, 0], 5123)));

let controllers = Arc::new(crate::http::controllers::builder::build(app));
let controllers = Arc::new(crate::http_server::controllers::builder::build(app));

let swagger_middleware = SwaggerMiddleware::new(
controllers.clone(),
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ mod sqlite_repo;
mod db_operations;
mod db_sync;
mod db_transactions;
mod http;
mod http_server;
mod scripts;
mod tcp;

Expand Down Expand Up @@ -49,7 +49,7 @@ async fn main() {

tokio::spawn(crate::operations::init::load_tables(app.clone()));

let http_connections_counter = crate::http::start_up::setup_server(&app);
let http_connections_counter = crate::http_server::start_up::setup_server(&app);

app.sync
.register_event_loop(Arc::new(SyncEventLoop::new(app.clone())))
Expand Down
1 change: 0 additions & 1 deletion src/operations/backup/restore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ pub async fn restore(
}
}
}

Ok(())
}

Expand Down

0 comments on commit 154a91e

Please sign in to comment.