Expand description
Common API types and models for the perfgate baseline service.
Defines request/response types, baseline records, project models, and verdict history used by both the server and client crates.
Part of the perfgate workspace.
§Example
use perfgate_api::BASELINE_SCHEMA_V1;
assert_eq!(BASELINE_SCHEMA_V1, "perfgate.baseline.v1");Structs§
- Affected
Project - A project affected by a fleet-wide dependency regression.
- ApiError
- Generic error response for the API.
- Audit
Event - An append-only audit event for tracking mutations and admin actions.
- Baseline
Record - The primary storage model for baselines.
- Baseline
Summary - Summary of a baseline record (without full receipt).
- Baseline
Version - Version history metadata (without full receipt).
- Create
KeyRequest - Request for creating a new API key.
- Create
KeyResponse - Response for creating a new API key (contains the plaintext key once).
- Delete
Baseline Response - Response for baseline deletion.
- Dependency
Change - A single dependency version change observed alongside a benchmark run.
- Dependency
Event - A recorded dependency change event with its performance impact.
- Dependency
Impact Query - Query parameters for dependency impact lookup.
- Dependency
Impact Response - Response for dependency impact lookup.
- Fleet
Alert - A fleet-wide alert: multiple projects regressed after the same dependency update.
- Health
Response - Response for health check.
- KeyEntry
- A redacted API key entry returned by list operations.
- List
Audit Events Query - Query parameters for listing audit events.
- List
Audit Events Response - Response for audit event list operation.
- List
Baselines Query - Request for baseline list operation.
- List
Baselines Response - Response for baseline list operation.
- List
Fleet Alerts Query - Query parameters for listing fleet alerts.
- List
Fleet Alerts Response - Response for listing fleet alerts.
- List
Keys Response - Response for listing API keys.
- List
Verdicts Query - Request for verdict list operation.
- List
Verdicts Response - Response for verdict list operation.
- Pagination
Info - Pagination information for lists.
- Pool
Metrics - Connection pool metrics exposed via the health endpoint.
- Project
- Multi-tenancy namespace with retention policies.
- Promote
Baseline Request - Request for baseline promotion.
- Promote
Baseline Response - Response for baseline promotion.
- Record
Dependency Event Request - Request to record a dependency change event.
- Record
Dependency Event Response - Response after recording dependency events.
- Retention
Policy - Retention policy for a project.
- Revoke
KeyResponse - Response for revoking an API key.
- Storage
Health - Health status of a storage backend.
- Submit
Verdict Request - Request for submitting a verdict.
- Upload
Baseline Request - Request for baseline upload.
- Upload
Baseline Response - Response for successful baseline upload.
- Verdict
Record - A record of a benchmark execution verdict.
Enums§
- Audit
Action - The action that was performed in an audit event.
- Audit
Resource Type - The type of resource affected by an audit event.
- Baseline
Source - Source of baseline creation.
- Versioning
Strategy - Strategy for auto-generating versions.
Constants§
- AUDIT_
SCHEMA_ V1 - Schema identifier for audit event records.
- BASELINE_
SCHEMA_ V1 - Schema identifier for baseline records.
- DEPENDENCY_
EVENT_ SCHEMA_ V1 - Schema identifier for dependency event records.
- FLEET_
ALERT_ SCHEMA_ V1 - Schema identifier for fleet alert records.
- PROJECT_
SCHEMA_ V1 - Schema identifier for project records.
- VERDICT_
SCHEMA_ V1 - Schema identifier for verdict records.