Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename API packages #1332

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ jobs:
cargo publish -p bittorrent-udp-tracker-protocol
cargo publish -p torrust-axum-health-check-api-server
cargo publish -p torrust-axum-http-tracker-server
cargo publish -p torrust-axum-rest-tracker-api-server
cargo publish -p torrust-axum-server
cargo publish -p torrust-axum-tracker-api-server
cargo publish -p torrust-rest-tracker-api-client
cargo publish -p torrust-rest-tracker-api-core
cargo publish -p torrust-torrust-server-lib
cargo publish -p torrust-tracker
cargo publish -p torrust-tracker-api-client
cargo publish -p torrust-tracker-api-core
cargo publish -p torrust-tracker-client
cargo publish -p torrust-tracker-clock
cargo publish -p torrust-tracker-configuration
Expand Down
111 changes: 56 additions & 55 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ serde_json = { version = "1", features = ["preserve_order"] }
tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] }
torrust-axum-health-check-api-server = { version = "3.0.0-develop", path = "packages/axum-health-check-api-server" }
torrust-axum-http-tracker-server = { version = "3.0.0-develop", path = "packages/axum-http-tracker-server" }
torrust-axum-rest-tracker-api-server = { version = "3.0.0-develop", path = "packages/axum-rest-tracker-api-server" }
torrust-axum-server = { version = "3.0.0-develop", path = "packages/axum-server" }
torrust-axum-tracker-api-server = { version = "3.0.0-develop", path = "packages/axum-tracker-api-server" }
torrust-rest-tracker-api-core = { version = "3.0.0-develop", path = "packages/rest-tracker-api-core" }
torrust-server-lib = { version = "3.0.0-develop", path = "packages/server-lib" }
torrust-tracker-api-core = { version = "3.0.0-develop", path = "packages/tracker-api-core" }
torrust-tracker-clock = { version = "3.0.0-develop", path = "packages/clock" }
torrust-tracker-configuration = { version = "3.0.0-develop", path = "packages/configuration" }
torrust-udp-tracker-server = { version = "3.0.0-develop", path = "packages/udp-tracker-server" }
Expand All @@ -62,7 +62,7 @@ tracing-subscriber = { version = "0", features = ["json"] }
[dev-dependencies]
local-ip-address = "0"
mockall = "0"
torrust-tracker-api-client = { version = "3.0.0-develop", path = "packages/tracker-api-client" }
torrust-rest-tracker-api-client = { version = "3.0.0-develop", path = "packages/rest-tracker-api-client" }
torrust-tracker-test-helpers = { version = "3.0.0-develop", path = "packages/test-helpers" }

[workspace]
Expand Down
2 changes: 1 addition & 1 deletion packages/axum-health-check-api-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ tracing = "0"
reqwest = { version = "0", features = ["json"] }
torrust-axum-health-check-api-server = { version = "3.0.0-develop", path = "../axum-health-check-api-server" }
torrust-axum-http-tracker-server = { version = "3.0.0-develop", path = "../axum-http-tracker-server" }
torrust-axum-tracker-api-server = { version = "3.0.0-develop", path = "../axum-tracker-api-server" }
torrust-axum-rest-tracker-api-server = { version = "3.0.0-develop", path = "../axum-rest-tracker-api-server" }
torrust-tracker-clock = { version = "3.0.0-develop", path = "../clock" }
torrust-tracker-test-helpers = { version = "3.0.0-develop", path = "../test-helpers" }
torrust-udp-tracker-server = { version = "3.0.0-develop", path = "../udp-tracker-server" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ mod api {

let configuration = Arc::new(configuration::ephemeral());

let service = torrust_axum_tracker_api_server::environment::Started::new(&configuration).await;
let service = torrust_axum_rest_tracker_api_server::environment::Started::new(&configuration).await;

let registar = service.registar.clone();

Expand Down Expand Up @@ -90,7 +90,7 @@ mod api {

let configuration = Arc::new(configuration::ephemeral());

let service = torrust_axum_tracker_api_server::environment::Started::new(&configuration).await;
let service = torrust_axum_rest_tracker_api_server::environment::Started::new(&configuration).await;

let binding = service.bind_address();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition.workspace = true
homepage.workspace = true
keywords = ["axum", "bittorrent", "http", "server", "torrust", "tracker"]
license.workspace = true
name = "torrust-axum-tracker-api-server"
name = "torrust-axum-rest-tracker-api-server"
publish.workspace = true
readme = "README.md"
repository.workspace = true
Expand All @@ -32,9 +32,9 @@ serde_with = { version = "3", features = ["json"] }
thiserror = "2"
tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] }
torrust-axum-server = { version = "3.0.0-develop", path = "../axum-server" }
torrust-rest-tracker-api-client = { version = "3.0.0-develop", path = "../rest-tracker-api-client" }
torrust-rest-tracker-api-core = { version = "3.0.0-develop", path = "../rest-tracker-api-core" }
torrust-server-lib = { version = "3.0.0-develop", path = "../server-lib" }
torrust-tracker-api-client = { version = "3.0.0-develop", path = "../tracker-api-client" }
torrust-tracker-api-core = { version = "3.0.0-develop", path = "../tracker-api-core" }
torrust-tracker-clock = { version = "3.0.0-develop", path = "../clock" }
torrust-tracker-configuration = { version = "3.0.0-develop", path = "../configuration" }
torrust-tracker-primitives = { version = "3.0.0-develop", path = "../primitives" }
Expand All @@ -46,7 +46,7 @@ tracing = "0"
[dev-dependencies]
local-ip-address = "0"
mockall = "0"
torrust-tracker-api-client = { version = "3.0.0-develop", path = "../tracker-api-client" }
torrust-rest-tracker-api-client = { version = "3.0.0-develop", path = "../rest-tracker-api-client" }
torrust-tracker-test-helpers = { version = "3.0.0-develop", path = "../test-helpers" }
url = { version = "2", features = ["serde"] }
uuid = { version = "1", features = ["v4"] }
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use bittorrent_tracker_core::container::TrackerCoreContainer;
use bittorrent_udp_tracker_core::container::UdpTrackerCoreContainer;
use futures::executor::block_on;
use torrust_axum_server::tsl::make_rust_tls;
use torrust_rest_tracker_api_client::connection_info::{ConnectionInfo, Origin};
use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer;
use torrust_server_lib::registar::Registar;
use torrust_tracker_api_client::connection_info::{ConnectionInfo, Origin};
use torrust_tracker_api_core::container::TrackerHttpApiCoreContainer;
use torrust_tracker_configuration::{logging, Configuration};
use torrust_tracker_primitives::peer;
use torrust_udp_tracker_server::container::UdpTrackerServerContainer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use axum::response::Response;
use axum::routing::get;
use axum::{middleware, BoxError, Router};
use hyper::{Request, StatusCode};
use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer;
use torrust_server_lib::logging::Latency;
use torrust_tracker_api_core::container::TrackerHttpApiCoreContainer;
use torrust_tracker_configuration::{AccessTokens, DEFAULT_TIMEOUT};
use tower::timeout::TimeoutLayer;
use tower::ServiceBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ use thiserror::Error;
use tokio::sync::oneshot::{Receiver, Sender};
use torrust_axum_server::custom_axum_server::{self, TimeoutAcceptor};
use torrust_axum_server::signals::graceful_shutdown;
use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer;
use torrust_server_lib::logging::STARTED_ON;
use torrust_server_lib::registar::{ServiceHealthCheckJob, ServiceRegistration, ServiceRegistrationForm};
use torrust_server_lib::signals::{Halted, Started};
use torrust_tracker_api_core::container::TrackerHttpApiCoreContainer;
use torrust_tracker_configuration::AccessTokens;
use tracing::{instrument, Level};

Expand Down Expand Up @@ -295,8 +295,8 @@ mod tests {
use std::sync::Arc;

use torrust_axum_server::tsl::make_rust_tls;
use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer;
use torrust_server_lib::registar::Registar;
use torrust_tracker_api_core::container::TrackerHttpApiCoreContainer;
use torrust_tracker_configuration::{logging, Configuration};
use torrust_tracker_test_helpers::configuration::ephemeral_public;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use bittorrent_tracker_core::torrent::repository::in_memory::InMemoryTorrentRepo
use bittorrent_udp_tracker_core::services::banning::BanService;
use serde::Deserialize;
use tokio::sync::RwLock;
use torrust_tracker_api_core::statistics::services::get_metrics;
use torrust_rest_tracker_api_core::statistics::services::get_metrics;

use super::responses::{metrics_response, stats_response};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! API resources for the [`stats`](crate::v1::context::stats)
//! API context.
use serde::{Deserialize, Serialize};
use torrust_tracker_api_core::statistics::services::TrackerMetrics;
use torrust_rest_tracker_api_core::statistics::services::TrackerMetrics;

/// It contains all the statistics generated by the tracker.
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)]
Expand Down Expand Up @@ -117,8 +117,8 @@ impl From<TrackerMetrics> for Stats {

#[cfg(test)]
mod tests {
use torrust_tracker_api_core::statistics::metrics::Metrics;
use torrust_tracker_api_core::statistics::services::TrackerMetrics;
use torrust_rest_tracker_api_core::statistics::metrics::Metrics;
use torrust_rest_tracker_api_core::statistics::services::TrackerMetrics;
use torrust_tracker_primitives::torrent_metrics::TorrentsMetrics;

use super::Stats;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! API responses for the [`stats`](crate::v1::context::stats)
//! API context.
use axum::response::{IntoResponse, Json, Response};
use torrust_tracker_api_core::statistics::services::TrackerMetrics;
use torrust_rest_tracker_api_core::statistics::services::TrackerMetrics;

use super::resources::Stats;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::sync::Arc;

use axum::routing::get;
use axum::Router;
use torrust_tracker_api_core::container::TrackerHttpApiCoreContainer;
use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer;

use super::handlers::get_stats_handler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use std::sync::Arc;

use axum::Router;
use torrust_tracker_api_core::container::TrackerHttpApiCoreContainer;
use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer;

use super::context::{auth_key, stats, torrent, whitelist};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use torrust_tracker_api_client::connection_info::{ConnectionInfo, Origin};
use torrust_rest_tracker_api_client::connection_info::{ConnectionInfo, Origin};

pub fn connection_with_invalid_token(origin: Origin) -> ConnectionInfo {
ConnectionInfo::authenticated(origin, "invalid token")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// code-review: should we use macros to return the exact line where the assert fails?

use reqwest::Response;
use torrust_axum_tracker_api_server::v1::context::auth_key::resources::AuthKey;
use torrust_axum_tracker_api_server::v1::context::stats::resources::Stats;
use torrust_axum_tracker_api_server::v1::context::torrent::resources::torrent::{ListItem, Torrent};
use torrust_axum_rest_tracker_api_server::v1::context::auth_key::resources::AuthKey;
use torrust_axum_rest_tracker_api_server::v1::context::stats::resources::Stats;
use torrust_axum_rest_tracker_api_server::v1::context::torrent::resources::torrent::{ListItem, Torrent};

// Resource responses

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use torrust_axum_tracker_api_server::environment::Started;
use torrust_tracker_api_client::common::http::{Query, QueryParam};
use torrust_tracker_api_client::v1::client::{headers_with_request_id, Client};
use torrust_axum_rest_tracker_api_server::environment::Started;
use torrust_rest_tracker_api_client::common::http::{Query, QueryParam};
use torrust_rest_tracker_api_client::v1::client::{headers_with_request_id, Client};
use torrust_tracker_test_helpers::logging::logs_contains_a_line_with;
use torrust_tracker_test_helpers::{configuration, logging};
use uuid::Uuid;
Expand Down
Loading