Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ principles:
- Swapping the SQL provider is a port. The consumer owns its schema, its migrations, and its
domain SQL, and those are what a swap rewrites. A library that ships its own migration set,
such as `blobfs`, owns that set; the consumer declares it beneath its own.
- The HTTP half of the admin service, the route group and handler, is application code: the
reference service builds it, and the template stays engine-free.
- The HTTP half of the admin service, the route group and handler, is application code; this
library ships none.

## Packages

Expand All @@ -43,7 +43,7 @@ principles:
- `sweep` runs a service's reclaimers, the bounded passes its libraries' garbage is removed in,
as one go-core reactor: each on its own interval or when nudged by name, under a per-reclaimer
advisory lock so one replica reclaims at a time, and paused under the service's quiesce gate.
It imports no reclaimer; blobfs's sweep and go-messaging's retention satisfy its interface.
It imports no reclaimer; a library's reclaimer satisfies its interface.
- `postgres` is the PostgreSQL provider: it constructs the pool over pgx's `database/sql` adapter
from the configuration block.

Expand Down
14 changes: 7 additions & 7 deletions STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
The judgement calls the standards-reviewer applies to go-database, beyond what `mise run check` enforces.

- A change that alters documented behavior updates the README and the affected `doc.go` in the same change.
- `architecture/standards/go-elemental/principles/dependencies.md`: the bottom-up line and no provider in a base, across the base module's and `postgres`'s `go.mod`.
- `architecture/standards/go-elemental/principles/tests-and-docs.md`: the doc.go inventory of `database`, `admin` and `postgres`, and the unit tier over sqlate's `sqltest`, the `database` tests' stub driver and the `postgres` tests' in-test `pgproto3` server.
- `architecture/standards/go-elemental/principles/topology-and-naming.md`: the base module with `database` and `admin`, and the `postgres` provider sub-module and its tags.
- `architecture/standards/go-elemental/principles/release-and-ci.md`: the check, currency and upgrade tasks over `GO_MODULES`, and a changelog per module, `CHANGELOG.md` and `postgres/CHANGELOG.md`.
- `architecture/standards/go-elemental/principles/dependencies.md`: the base module's and `postgres`'s `go.mod`.
- `architecture/standards/go-elemental/principles/tests-and-docs.md`: the doc.go inventory of `database`, `admin`, `sweep` and `postgres`, and the unit tier over sqlate's `sqltest`, the `database` tests' stub driver and the `postgres` tests' in-test `pgproto3` server.
- `architecture/standards/go-elemental/principles/topology-and-naming.md`: the base module with `database`, `admin` and `sweep`, and the `postgres` provider sub-module and its tags.
- `architecture/standards/go-elemental/principles/release-and-ci.md`: the check, currency and upgrade tasks over `GO_MODULES`, which matches `go.work`'s use-list, and a changelog per module, `CHANGELOG.md` and `postgres/CHANGELOG.md`.
- `architecture/standards/go-elemental/principles/lifecycle-and-context.md`: `DB`'s `Start`, `Shutdown` and `Ready`, and `admin.Service`'s `Start` and `Ready`; the constructors' panics on an unfinalized `Config` or a missing pool, and `postgres.New`'s error on a reserved option.
- `architecture/standards/go-elemental/principles/baseline-standards.md`: `Config`'s pool-size and timeout defaults, and `admin`, which takes every migration set, seed set, catalog and registry from its consumer.
- `architecture/standards/go-elemental/principles/utc-times.md`: `postgres.New`'s connections, which scan `timestamptz` in UTC.
- `architecture/standards/go-elemental/principles/construction-and-execution.md`: `sweep.New` takes its configuration as a trailing `sweep.Options` whose zero value keeps the defaults, and every new exported function and constructor in `database`, `admin`, `sweep` and `postgres` that takes configuration does the same.
- `architecture/standards/go-elemental/principles/construction-and-execution.md`: `sweep.New` takes its configuration as a trailing `sweep.Options` whose zero value keeps the defaults.
- `architecture/principles/service-tiers.md`: `DB.Conn`, `Config.Options`, and the `postgres` provider.
- `architecture/principles/validation-first.md`: `Config.Finalize`, and `admin`'s verbs, which refuse an argument outside their domain before any I/O.
- `architecture/principles/context-architecture.md`: the README and each `doc.go` are the homes.
- `architecture/principles/comments.md`: every comment is one of the five kinds, in source, tests, scripts, and every configuration file (TOML, YAML, `.gitignore`); a doc comment on an unexported identifier or a test function is not package documentation.
- `architecture/principles/context-architecture.md`: the README and each `doc.go`.
- `architecture/principles/comments.md`: every comment.
13 changes: 8 additions & 5 deletions context/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ library; the general sweeper; and the driver, isolated in the `postgres` provide

The README and each package's `doc.go` document this repository. The
[Go Elemental](https://github.com/standards-lab/architecture/blob/main/standards/go-elemental/README.md) standard states the principles it follows.
This context records only working knowledge the code and the README do not express.

## Capability map

- **database** (built): [doc.go](../doc.go).
- **admin** (built): [admin/doc.go](../admin/doc.go).
- **sweep** (built): [sweep/doc.go](../sweep/doc.go).
- **postgres** (built): [postgres/doc.go](../postgres/doc.go).
- **database** (built): the connection pool, with its configuration, lifecycle, readiness, and
connectivity sentinels ([doc.go](../doc.go)).
- **admin** (built): the database admin service over `sqlate`, which administers every migration
set its migrator runs ([admin/doc.go](../admin/doc.go)).
- **sweep** (built): the general sweeper that runs a service's reclaimers
([sweep/doc.go](../sweep/doc.go)).
- **postgres** (built): the PostgreSQL provider, which constructs the pool over pgx's
`database/sql` adapter ([postgres/doc.go](../postgres/doc.go)).