From 0119027e1aee78716eb5fb1d42e3154e4360a965 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Wed, 26 Nov 2025 10:59:31 +0000 Subject: [PATCH] chore: refactor `client` under `infrastructure` --- src/{ => infrastructure}/client/mod.rs | 0 src/{ => infrastructure}/client/roasters.rs | 0 src/{ => infrastructure}/client/roasts.rs | 0 src/{ => infrastructure}/client/tokens.rs | 2 +- src/infrastructure/mod.rs | 1 + src/lib.rs | 1 - src/main.rs | 2 +- src/presentation/cli/roasters.rs | 2 +- src/presentation/cli/roasts.rs | 2 +- src/presentation/cli/tokens.rs | 2 +- 10 files changed, 6 insertions(+), 6 deletions(-) rename src/{ => infrastructure}/client/mod.rs (100%) rename src/{ => infrastructure}/client/roasters.rs (100%) rename src/{ => infrastructure}/client/roasts.rs (100%) rename src/{ => infrastructure}/client/tokens.rs (98%) diff --git a/src/client/mod.rs b/src/infrastructure/client/mod.rs similarity index 100% rename from src/client/mod.rs rename to src/infrastructure/client/mod.rs diff --git a/src/client/roasters.rs b/src/infrastructure/client/roasters.rs similarity index 100% rename from src/client/roasters.rs rename to src/infrastructure/client/roasters.rs diff --git a/src/client/roasts.rs b/src/infrastructure/client/roasts.rs similarity index 100% rename from src/client/roasts.rs rename to src/infrastructure/client/roasts.rs diff --git a/src/client/tokens.rs b/src/infrastructure/client/tokens.rs similarity index 98% rename from src/client/tokens.rs rename to src/infrastructure/client/tokens.rs index 5bfd28e..fb9ac2a 100644 --- a/src/client/tokens.rs +++ b/src/infrastructure/client/tokens.rs @@ -2,7 +2,7 @@ use anyhow::Result; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; -use crate::client::BrewlogClient; +use super::BrewlogClient; use crate::domain::ids::{TokenId, UserId}; pub struct TokensClient<'a> { diff --git a/src/infrastructure/mod.rs b/src/infrastructure/mod.rs index e8850de..77bcde9 100644 --- a/src/infrastructure/mod.rs +++ b/src/infrastructure/mod.rs @@ -1,3 +1,4 @@ pub mod auth; +pub mod client; pub mod database; pub mod repositories; diff --git a/src/lib.rs b/src/lib.rs index c9cb8a3..de226b8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,4 @@ pub mod application; -pub mod client; pub mod domain; pub mod infrastructure; pub mod presentation; diff --git a/src/main.rs b/src/main.rs index 101cc04..8951910 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use anyhow::Result; use brewlog::application::{ServerConfig, serve}; -use brewlog::client::BrewlogClient; +use brewlog::infrastructure::client::BrewlogClient; use brewlog::presentation::cli::{Cli, Commands, ServeCommand, roasters, roasts, tokens}; use clap::Parser; use tracing_subscriber::{EnvFilter, fmt, prelude::*}; diff --git a/src/presentation/cli/roasters.rs b/src/presentation/cli/roasters.rs index 12eef50..3d4ab8e 100644 --- a/src/presentation/cli/roasters.rs +++ b/src/presentation/cli/roasters.rs @@ -3,9 +3,9 @@ use clap::Args; use serde_json::json; use super::print_json; -use crate::client::BrewlogClient; use crate::domain::ids::RoasterId; use crate::domain::roasters::{NewRoaster, UpdateRoaster}; +use crate::infrastructure::client::BrewlogClient; #[derive(Debug, Args)] pub struct AddRoasterCommand { diff --git a/src/presentation/cli/roasts.rs b/src/presentation/cli/roasts.rs index 03beb8e..7d3574b 100644 --- a/src/presentation/cli/roasts.rs +++ b/src/presentation/cli/roasts.rs @@ -3,9 +3,9 @@ use clap::Args; use serde_json::json; use super::print_json; -use crate::client::BrewlogClient; use crate::domain::ids::{RoastId, RoasterId}; use crate::domain::roasts::NewRoast; +use crate::infrastructure::client::BrewlogClient; #[derive(Debug, Args)] pub struct AddRoastCommand { diff --git a/src/presentation/cli/tokens.rs b/src/presentation/cli/tokens.rs index c931ea6..a3ffb08 100644 --- a/src/presentation/cli/tokens.rs +++ b/src/presentation/cli/tokens.rs @@ -3,8 +3,8 @@ use clap::Args; use std::io::{self, Write}; use super::print_json; -use crate::client::BrewlogClient; use crate::domain::ids::TokenId; +use crate::infrastructure::client::BrewlogClient; #[derive(Debug, Args)] pub struct CreateTokenCommand {