Expand description
Backend-agnostic storage abstraction for agent-proxy-rust.
Defines the Storage trait and all data types shared across backends.
Middleware crates depend on Box<dyn Storage> injected at construction time,
and never know whether the backend is SQLite, PostgreSQL, or an in-memory mock.
Structs§
- Available
Channel Info - An enabled channel with its bound models, used by the Admin API
GET /admin/available-channelsendpoint for Claude direct-connect mode. - Available
Model Info - A model bound to a channel, returned as part of
AvailableChannelInfo. - Channel
- An upstream AI provider channel with its API key and protocol.
- Compression
Savings Report - Compression savings report for a project.
- Cost
Aggregate - Aggregated cost summary row.
- Cost
Filter - Optional filters for querying cost records.
- Cost
Record - A single proxied request with token usage and cost.
- Model
- A model offered by a provider.
- Model
Mapping - Maps a client-facing model name to an upstream model name with pricing.
- Protocol
Entry - A single protocol entry in a channel’s
protocolsJSON. - Provider
- An upstream AI provider (e.g. “Anthropic”, “
OpenAI”). - Seed
Entry Status - Status of a single seed data entry.
- Seed
Manifest - Deserialized seed manifest from
seed-manifest.json. - Seed
Manifest Entry - A single file entry in the seed manifest.
- Seed
Status - Status of the local seed data.
- Subscription
Fee - A monthly subscription fee for a flat-fee channel.
- Switch
Log - A switch/redirect event between channels.
- Time
Range - A time range bounded by start and end timestamps.
Enums§
- Cost
Group By - Grouping dimension for cost aggregation.
- Storage
Error - Storage error type covering all backend failure modes.
Traits§
- Seed
Manager - Seed data manager — initializes and refreshes reference data.
- Storage
- Backend-agnostic storage for providers, models, channels, and cost records.