Documentation
¶
Overview ¶
Package maintenance sweeps expired rows out of operational Postgres tables that would otherwise grow monotonically: oauth_codes, oauth_access_tokens, and sessions. It is the library half of cmd/maintenance and is invoked as a one-shot from host cron / Kamal scheduled task — not as a goroutine in the main server process.
Scope is intentionally narrow: "expired" means expires_at < NOW(). Revoked access tokens that have not yet expired are left alone so a future audit view can surface them; oauth_clients are never touched.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
Result reports how many rows the sweep deleted per table. Callers use it for structured logging and exit-code decisions.