Files
Denozordec f39df7c4bf
CI / changes (push) Successful in 8s
CI / commitlint (push) Has been skipped
CI / openapi (push) Successful in 25s
CI / web (push) Successful in 32s
CI / go (push) Successful in 57s
CI / bird2 (push) Successful in 15s
CI / release (push) Successful in 3m18s
feat(revisions): add pruning estimate and cleanup endpoints
Implemented new endpoints for estimating and pruning revisions, including detailed schemas for requests and responses. The `RevisionPruneEstimate` and `RevisionPruneResult` components were added to the OpenAPI documentation, enhancing the API's functionality for managing revision retention. Updated the backend to support these operations and integrated them into the tenant settings UI for improved user interaction.
2026-06-12 21:56:36 +07:00

22 lines
828 B
Go

package store
import "time"
// RevisionPruneEstimate describes revisions and storage that would be removed by prune.
type RevisionPruneEstimate struct {
RetentionMinutes int `json:"retention_minutes"`
CutoffAt time.Time `json:"cutoff_at"`
RevisionCount int `json:"revision_count"`
PrefixRowCount int `json:"prefix_row_count"`
OrphanSnapshotCount int `json:"orphan_snapshot_count"`
BytesEstimate int64 `json:"bytes_estimate"`
}
// RevisionPruneResult is the outcome of a revision prune run.
type RevisionPruneResult struct {
DeletedRevisions int `json:"deleted_revisions"`
DeletedPrefixSnapshots int `json:"deleted_prefix_snapshots"`
DeletedPrefixRows int `json:"deleted_prefix_rows"`
BytesEstimate int64 `json:"bytes_estimate"`
}