Quota reporting: storage.Usager + GET /api/v1/quota (v0.3) #8

Merged
Cordy merged 7 commits from feat/quota-reporting into main 2026-07-21 18:25:40 +00:00
Owner

First v0.3 increment: storage-capacity reporting.

  • storage.Usager optional capability (Usage(ctx) (Usage, error)) + storage.Usage{Used,Free,Total} + ErrUnsupported.
  • POSIX driver implements it via statfs(2), build-tagged (usage_unix.go / usage_other.go) so non-unix builds fall back to ErrUnsupported.
  • GET /api/v1/quota — feature-detected: backends without Usager (S3 has no bucket-wide capacity notion) return 501.
  • Tests: POSIX Usage against a real tmpdir; API 200 (with Usager) / 501 (without).

Additive and backward-compatible — no existing behaviour changes. Closes the first of the v0.3 "quotas" items; WebDAV RFC-4331 quota props (so Finder shows free space) are a planned follow-up.

First v0.3 increment: storage-capacity reporting. - `storage.Usager` optional capability (`Usage(ctx) (Usage, error)`) + `storage.Usage{Used,Free,Total}` + `ErrUnsupported`. - POSIX driver implements it via `statfs(2)`, build-tagged (`usage_unix.go` / `usage_other.go`) so non-unix builds fall back to `ErrUnsupported`. - `GET /api/v1/quota` — feature-detected: backends without `Usager` (S3 has no bucket-wide capacity notion) return 501. - Tests: POSIX `Usage` against a real tmpdir; API 200 (with Usager) / 501 (without). Additive and backward-compatible — no existing behaviour changes. Closes the first of the v0.3 "quotas" items; WebDAV RFC-4331 quota props (so Finder shows free space) are a planned follow-up.
Cordy merged commit 03f7f2bacb into main 2026-07-21 18:25:40 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#8
No description provided.