chore: refactor client under infrastructure
This commit is contained in:
parent
8aca3b92b7
commit
0119027e1a
10 changed files with 6 additions and 6 deletions
|
|
@ -2,7 +2,7 @@ use anyhow::Result;
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::client::BrewlogClient;
|
use super::BrewlogClient;
|
||||||
use crate::domain::ids::{TokenId, UserId};
|
use crate::domain::ids::{TokenId, UserId};
|
||||||
|
|
||||||
pub struct TokensClient<'a> {
|
pub struct TokensClient<'a> {
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
pub mod auth;
|
pub mod auth;
|
||||||
|
pub mod client;
|
||||||
pub mod database;
|
pub mod database;
|
||||||
pub mod repositories;
|
pub mod repositories;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
pub mod application;
|
pub mod application;
|
||||||
pub mod client;
|
|
||||||
pub mod domain;
|
pub mod domain;
|
||||||
pub mod infrastructure;
|
pub mod infrastructure;
|
||||||
pub mod presentation;
|
pub mod presentation;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use brewlog::application::{ServerConfig, serve};
|
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 brewlog::presentation::cli::{Cli, Commands, ServeCommand, roasters, roasts, tokens};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use tracing_subscriber::{EnvFilter, fmt, prelude::*};
|
use tracing_subscriber::{EnvFilter, fmt, prelude::*};
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ use clap::Args;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
use super::print_json;
|
use super::print_json;
|
||||||
use crate::client::BrewlogClient;
|
|
||||||
use crate::domain::ids::RoasterId;
|
use crate::domain::ids::RoasterId;
|
||||||
use crate::domain::roasters::{NewRoaster, UpdateRoaster};
|
use crate::domain::roasters::{NewRoaster, UpdateRoaster};
|
||||||
|
use crate::infrastructure::client::BrewlogClient;
|
||||||
|
|
||||||
#[derive(Debug, Args)]
|
#[derive(Debug, Args)]
|
||||||
pub struct AddRoasterCommand {
|
pub struct AddRoasterCommand {
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ use clap::Args;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
use super::print_json;
|
use super::print_json;
|
||||||
use crate::client::BrewlogClient;
|
|
||||||
use crate::domain::ids::{RoastId, RoasterId};
|
use crate::domain::ids::{RoastId, RoasterId};
|
||||||
use crate::domain::roasts::NewRoast;
|
use crate::domain::roasts::NewRoast;
|
||||||
|
use crate::infrastructure::client::BrewlogClient;
|
||||||
|
|
||||||
#[derive(Debug, Args)]
|
#[derive(Debug, Args)]
|
||||||
pub struct AddRoastCommand {
|
pub struct AddRoastCommand {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ use clap::Args;
|
||||||
use std::io::{self, Write};
|
use std::io::{self, Write};
|
||||||
|
|
||||||
use super::print_json;
|
use super::print_json;
|
||||||
use crate::client::BrewlogClient;
|
|
||||||
use crate::domain::ids::TokenId;
|
use crate::domain::ids::TokenId;
|
||||||
|
use crate::infrastructure::client::BrewlogClient;
|
||||||
|
|
||||||
#[derive(Debug, Args)]
|
#[derive(Debug, Args)]
|
||||||
pub struct CreateTokenCommand {
|
pub struct CreateTokenCommand {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue