Compare commits

..

2 Commits

Author SHA1 Message Date
ZhenYi
b8c1dc5958 feat(core): initialize project with access control and AI integration 2026-05-10 22:02:38 +08:00
ZhenYi
4e2a39a5c0 fix(workspace): resolve all cargo check warnings across workspace
Remove unused imports and add #[allow(dead_code)] annotations to
intentionally retained fields/methods. Also add deploy/.server.yaml
to .gitignore to prevent accidental credential exposure.
2026-05-10 21:56:08 +08:00
17 changed files with 14 additions and 18 deletions

3
.gitignore vendored
View File

@ -25,4 +25,5 @@ package-lock.json
yarn.lock
.gemini
.omg
/.sqry
/.sqry
deploy/.server.yaml

View File

@ -111,6 +111,7 @@ impl Reconciler {
/// The Secret watcher stores the cert at key `tls:<secretName>`.
/// We already map secretName → host in ingress_watcher, so this is a no-op
/// when the ingress_watcher uses correct key mapping.
#[allow(dead_code)]
pub fn cross_reference_tls(&self) -> HashMap<String, TlsCert> {
let mut host_certs: HashMap<String, TlsCert> = HashMap::new();

View File

@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN useradd --system --create-home appuser
WORKDIR /home/appuser
COPY target/release/app /bin
COPY ./target/release/app /bin
USER appuser
EXPOSE 3000
CMD ["app"]

View File

@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN useradd --system --create-home appuser
WORKDIR /home/appuser
COPY target/release/email-worker /bin
COPY ./target/release/email-worker /bin
USER appuser
EXPOSE 8084
CMD ["email-worker"]

View File

@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN useradd --system --create-home appuser
WORKDIR /home/appuser
COPY target/release/gingress /bin
COPY ./target/release/gingress /bin
USER appuser
EXPOSE 80 443 8080
CMD ["gingress"]

View File

@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN useradd --system --create-home appuser
WORKDIR /home/appuser
COPY target/release/git-hook /bin
COPY ./target/release/git-hook /bin
USER appuser
EXPOSE 8083
CMD ["git-hook"]

View File

@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN useradd --system --create-home appuser
WORKDIR /home/appuser
COPY target/release/gitserver /bin
COPY ./target/release/gitserver /bin
USER appuser
EXPOSE 8021 2222
CMD ["gitserver"]

View File

@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN useradd --system --create-home appuser
WORKDIR /home/appuser
COPY target/release/metrics-aggregator /bin
COPY ./target/release/metrics-aggregator /bin
USER appuser
EXPOSE 9090
CMD ["metrics-aggregator"]

View File

@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN useradd --system --create-home appuser
WORKDIR /home/appuser
COPY target/release/static-server /bin
COPY ./target/release/static-server /bin
USER appuser
EXPOSE 8081
CMD ["static-server"]

View File

@ -43,7 +43,6 @@ fn compute_etag(data: &[u8]) -> String {
// ── Asset collection ─────────────────────────────────────────────────────
struct Asset {
path: String,
data: Vec<u8>,
etag: String,
brotli: Option<Vec<u8>>,
@ -71,7 +70,6 @@ fn collect_assets(dist_dir: &Path) -> BTreeMap<String, Asset> {
assets.insert(
path_str.clone(),
Asset {
path: path_str,
data,
etag,
brotli: brotli_data,

View File

@ -17,6 +17,7 @@ pub mod skill;
pub mod user;
// Auto-generated frontend module (from build.rs) serving embedded dist/ assets
#[allow(dead_code)]
mod frontend;
pub use error::{api_success, ApiError, ApiResponse};

View File

@ -7,7 +7,6 @@
use super::{FilterContext, PostFilter, PreFilter};
use crate::config::{ConfigStore, HeaderOp};
use pingora::proxy::Session;
use std::sync::Arc;
pub struct HeaderInjectFilter {
store: ConfigStore,

View File

@ -9,7 +9,6 @@ pub mod real_ip;
pub mod session_sticky;
pub mod ws_upgrade;
use http::HeaderMap;
use pingora::proxy::Session;
/// Context passed through the filter chain for a single request.

View File

@ -8,6 +8,7 @@ use pingora::proxy::Session;
pub struct RealIpFilter {
/// Whether to trust Proxy Protocol headers (TCP-level).
#[allow(dead_code)]
trust_proxy_protocol: bool,
/// Maximum number of trusted proxy hops.
trusted_hops: usize,

View File

@ -14,8 +14,10 @@ pub struct HealthChecker {
#[allow(dead_code)]
interval: std::time::Duration,
/// Failure threshold for passive health checks.
#[allow(dead_code)]
passive_fail_threshold: u32,
/// Success threshold for recovery.
#[allow(dead_code)]
passive_success_threshold: u32,
}

View File

@ -4,8 +4,6 @@
//! configuration changes without dropping active connections.
use crate::config::ConfigStore;
use std::sync::Arc;
use tokio::sync::watch;
/// Hot-reload watcher that listens for config changes.
pub struct HotReloadWatcher {

View File

@ -5,12 +5,8 @@
use crate::config::ConfigStore;
use anyhow::Context;
use rustls::pki_types::CertificateDer;
use rustls::pki_types::PrivateKeyDer;
use rustls::pki_types::PrivatePkcs8KeyDer;
use rustls::server::ResolvesServerCert;
use rustls::sign::CertifiedKey;
use rustls::sign::SigningKey;
use rustls::ServerConfig;
use std::collections::HashMap;
use std::fmt;