Files
tdc-rs/src/lib.rs
T
adminandClaude Code 03e9f05736 feat(tds): TDS 出向客户端(照抄上游 TdsReportClient 的 internal 通道)
- 9 个方法:internal_catalog/apply/apply_batch + list/dispute/confirm/settle/receipt/voucher
- 出向固定 6 个头(App-Code: sswflow / Jnpf-Origin: pc / Vue-Version: 3 / X-Internal-Token / X-Protocol-Version: 1.0)
- 超时 3s 连 / 5s 读;no_proxy 避免系统代理劫持 loopback 的 TDS
- 路径段白名单(字母数字下划线短横线,≤64)

Co-Authored-By: Claude Code <[email protected]>
2026-10-25 13:21:27 +08:00

26 lines
763 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//! TDC 连接器(数据接入连接器)—— 本地优先 Rust 重实现。
//!
//! 红线(详见 `CLAUDE.md` 与设计文档 §3.3):
//! - TDC↔TDS 只走 HTTP 契约,绝不编译期耦合。
//! - 前端不直接持有数据库;全部数据访问经 `/api/ssw/tdc/*`。
//! - 业务错误读 body 的 `code`,不只看 HTTP 状态。
//! - 所有 DB 访问持 `state.db_lock`(PGlite 单 in-process backend)。
//! - 任意 SELECT 走 `db::query_json()`(row_to_json 包裹)。
pub mod account;
pub mod auth;
pub mod cipher;
pub mod codec;
pub mod config;
pub mod crud;
pub mod db;
pub mod domain;
pub mod envelope;
pub mod ids;
pub mod protocol;
pub mod registry;
pub mod routes;
pub mod session;
pub mod state;
pub mod tds;