~bigbes/sourcehut-dolt: 6efd2748

db: postgres layer for repos, ACLs, dolt keys

Store wraps a Querier (*sql.DB/*sql.Tx/*sql.Conn); context-first methods, FromContext for core-go middleware, WithTx for the create-repo transaction. Repo CRUD + listing-visibility rules, effective-access/ACL upsert, dolt_key CRUD with typed ErrNotFound/ErrNameTaken/ErrKeyExists. Tests gated on DOLTSRHT_TEST_PG: per-run scratch schema + schema.sql, CRUD/visibility/effective-access cases; skip when unset.

Eugene Blikh <bigbes@gmail.com> — 2026-07-18 17:36:29 UTC

Commit 6efd2748c1c096073689f81cd4cde9829e82532cview raw patch

Parent(s): 19645e70

8 changed file(s)

FileStatus+
db/access.go A +103
db/access_test.go A +78
db/db_test.go A +146
db/keys.go A +152
db/keys_test.go A +81
db/repos.go A +197
db/repos_test.go A +200
db/store.go A +84