mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 16:06:08 +00:00
Expose generic detail CRUD, aggregate contributions, and native pricing evaluation through Admin and the plugin SDK. Reuse existing request and statistics storage without schema changes; keep workflow state and recovery with callers. Co-authored-by: Zyy <zyycn@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com>
25 lines
1018 B
Rust
25 lines
1018 B
Rust
//! 通用用量端口的插件管理测试夹具,非本测试调用路径禁止访问
|
|
use super::TestPluginPorts;
|
|
use gateway_admin::{model::usage_data::*, ports::usage_data::*};
|
|
#[async_trait::async_trait]
|
|
impl UsageDataStore for TestPluginPorts {
|
|
async fn get_record(&self, _: GetUsageRecord) -> UsageDataResult<UsageRecord> {
|
|
unreachable!("unexpected usage call")
|
|
}
|
|
async fn list_records(&self, _: ListUsageRecords) -> UsageDataResult<UsageRecordPage> {
|
|
unreachable!("unexpected usage call")
|
|
}
|
|
async fn write_records(&self, _: StoredUsageWrite) -> UsageDataResult<UsageWriteResult> {
|
|
unreachable!("unexpected usage call")
|
|
}
|
|
async fn list_aggregates(&self, _: ListUsageAggregates) -> UsageDataResult<UsageAggregatePage> {
|
|
unreachable!("unexpected usage call")
|
|
}
|
|
async fn write_aggregates(
|
|
&self,
|
|
_: StoredAggregateWrite,
|
|
) -> UsageDataResult<UsageAggregateWriteResult> {
|
|
unreachable!("unexpected usage call")
|
|
}
|
|
}
|