合并api和service为system
This commit is contained in:
parent
29d4a5fbc0
commit
f6d7ef8761
56
Cargo.lock
generated
56
Cargo.lock
generated
@ -66,21 +66,6 @@ version = "1.0.86"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "api"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"axum",
|
|
||||||
"axum-extra",
|
|
||||||
"domain",
|
|
||||||
"library",
|
|
||||||
"service",
|
|
||||||
"tokio",
|
|
||||||
"tower-http",
|
|
||||||
"tracing",
|
|
||||||
"validator",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-lock"
|
name = "async-lock"
|
||||||
version = "3.4.0"
|
version = "3.4.0"
|
||||||
@ -307,10 +292,10 @@ dependencies = [
|
|||||||
name = "chuanyue-service"
|
name = "chuanyue-service"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
|
||||||
"job",
|
"job",
|
||||||
"library",
|
"library",
|
||||||
"mimalloc",
|
"mimalloc",
|
||||||
|
"system",
|
||||||
"tokio",
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -2013,23 +1998,6 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "service"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"chrono",
|
|
||||||
"domain",
|
|
||||||
"error-stack",
|
|
||||||
"futures-executor",
|
|
||||||
"i18n",
|
|
||||||
"lazy_static",
|
|
||||||
"library",
|
|
||||||
"moka",
|
|
||||||
"reqwest",
|
|
||||||
"sqlx",
|
|
||||||
"tracing",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sha1"
|
name = "sha1"
|
||||||
version = "0.10.6"
|
version = "0.10.6"
|
||||||
@ -2412,6 +2380,28 @@ version = "1.0.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
|
checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "system"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"axum",
|
||||||
|
"axum-extra",
|
||||||
|
"chrono",
|
||||||
|
"domain",
|
||||||
|
"error-stack",
|
||||||
|
"futures-executor",
|
||||||
|
"i18n",
|
||||||
|
"lazy_static",
|
||||||
|
"library",
|
||||||
|
"moka",
|
||||||
|
"reqwest",
|
||||||
|
"sqlx",
|
||||||
|
"tokio",
|
||||||
|
"tower-http",
|
||||||
|
"tracing",
|
||||||
|
"validator",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "system-configuration"
|
name = "system-configuration"
|
||||||
version = "0.5.1"
|
version = "0.5.1"
|
||||||
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [".", "api", "domain", "i18n", "job","library", "service"]
|
members = [".", "system", "domain", "i18n", "job","library"]
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ members = [".", "api", "domain", "i18n", "job","library", "service"]
|
|||||||
tokio = { workspace = true, features = ["full"]}
|
tokio = { workspace = true, features = ["full"]}
|
||||||
mimalloc = { workspace = true }
|
mimalloc = { workspace = true }
|
||||||
|
|
||||||
api = { path = "api" }
|
system = { path = "system" }
|
||||||
library = { path = "library" }
|
library = { path = "library" }
|
||||||
job = { path = "job" }
|
job = { path = "job" }
|
||||||
|
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "api"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
axum = { workspace = true }
|
|
||||||
tokio = { workspace = true, features = ["full"] }
|
|
||||||
tracing = { workspace = true }
|
|
||||||
tower-http = { workspace = true, features = ["trace"] }
|
|
||||||
validator = { workspace = true }
|
|
||||||
axum-extra = { workspace = true }
|
|
||||||
|
|
||||||
library = { path = "../library" }
|
|
||||||
domain = { path = "../domain" }
|
|
||||||
service = { path = "../service" }
|
|
||||||
|
|
@ -10,5 +10,5 @@ async fn main() {
|
|||||||
library::core::db::init_database(config!()).await;
|
library::core::db::init_database(config!()).await;
|
||||||
|
|
||||||
job::start().await;
|
job::start().await;
|
||||||
api::serve().await;
|
system::serve().await;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "service"
|
name = "system"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
axum = { workspace = true }
|
||||||
|
tokio = { workspace = true, features = ["full"] }
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
|
tower-http = { workspace = true, features = ["trace"] }
|
||||||
|
validator = { workspace = true }
|
||||||
|
axum-extra = { workspace = true }
|
||||||
chrono = { workspace = true }
|
chrono = { workspace = true }
|
||||||
reqwest = { workspace = true }
|
reqwest = { workspace = true }
|
||||||
futures-executor = { workspace = true }
|
futures-executor = { workspace = true }
|
@ -2,6 +2,8 @@ use axum::{Extension, Json};
|
|||||||
use domain::{dto::account::{AuthenticateGooleAccountReq, AuthenticateWithPassword, RefreshToken}, vo::account::{LoginAccount, RefreshTokenResult}};
|
use domain::{dto::account::{AuthenticateGooleAccountReq, AuthenticateWithPassword, RefreshToken}, vo::account::{LoginAccount, RefreshTokenResult}};
|
||||||
use library::{context::{Context, WhiteContext}, res::{response::{ ResData, ResResult}, validator}};
|
use library::{context::{Context, WhiteContext}, res::{response::{ ResData, ResResult}, validator}};
|
||||||
|
|
||||||
|
use crate::service;
|
||||||
|
|
||||||
/// google账号登录
|
/// google账号登录
|
||||||
pub async fn authenticate_google(
|
pub async fn authenticate_google(
|
||||||
Extension(context): Extension<WhiteContext>,
|
Extension(context): Extension<WhiteContext>,
|
@ -8,6 +8,8 @@ use library::res::pageable::Pageable;
|
|||||||
use library::res::response::{ResData, ResResult};
|
use library::res::response::{ResData, ResResult};
|
||||||
use library::res::validator;
|
use library::res::validator;
|
||||||
|
|
||||||
|
use crate::service;
|
||||||
|
|
||||||
/// 添加反馈信息
|
/// 添加反馈信息
|
||||||
pub async fn add_feedback(
|
pub async fn add_feedback(
|
||||||
Extension(context): Extension<Context>,
|
Extension(context): Extension<Context>,
|
@ -2,6 +2,7 @@ use library::config;
|
|||||||
|
|
||||||
mod controller;
|
mod controller;
|
||||||
mod router;
|
mod router;
|
||||||
|
mod service;
|
||||||
|
|
||||||
/// 启动服务
|
/// 启动服务
|
||||||
pub async fn serve() {
|
pub async fn serve() {
|
Loading…
Reference in New Issue
Block a user