Core database abstraction for gobank — shared schema, multi-user base, built on go-postgres
- Go 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Module path and self-referencing URLs now point at the new Forgejo instance following the move off Codeberg. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
| .gitignore | ||
| CHANGELOG.md | ||
| db.go | ||
| db_test.go | ||
| go.mod | ||
| go.sum | ||
| index.md | ||
| README.md | ||
| ROADMAP.md | ||
| task-plus.yml | ||
| Taskfile.yml | ||
gobank-db
Core database abstraction for gobank — shared schema, multi-user base, built on go-postgres.
Part of the gobank family of libraries.
Overview
gobank-db provides:
- Shared Schema — common database schema used across gobank services
- Multi-User Base — abstracts DB technology so multiple services/users share one database
- Migration Support — schema versioning and migration management
- Connection Management — pooled connections with go-postgres (pglike for dev, Postgres/CockroachDB for prod)
Testing
Tests run against pglike (in-memory SQLite with PostgreSQL syntax translation) by default — no database server needed:
task test
To run against a real PostgreSQL instance, set GOBANK_TEST_DSN:
createdb gobank_test
GOBANK_TEST_DSN="postgres:///gobank_test?host=/var/run/postgresql" task test
dropdb gobank_test
Both backends exercise the same test suite and schema.
Status
Early development. See issues for planned work.
Links
- Documentation: https://h3-gobank-db.statichost.eu
- Source: https://git.bytestone.uk/hum3/gobank-db
- Mirror: https://github.com/drummonds/gobank-db