No description
  • Go 96.3%
  • Makefile 2.1%
  • Dockerfile 1%
  • Go Template 0.6%
Find a file
Zamir Amir 0bb122db36
All checks were successful
CI / chart (push) Successful in 7s
CI / test (push) Successful in 18s
CI / specification (push) Successful in 26s
CI / image (push) Successful in 14s
CI / chart-release (push) Has been skipped
Release 0.2.1
2026-11-25 13:15:48 +01:00
.forgejo/workflows Scan the rendered chart with KICS on every push and pull request 2026-11-25 10:34:11 +01:00
api Keep the burgerenvelop of a zending as the opaque JWE string 2026-11-24 12:53:19 +01:00
cmd/delivery-service Publish the OpenAPI document as committed JSON and YAML, as in blauwe knop 2026-11-23 22:19:09 +01:00
delivery-service@c2c566a851 added plugin submodule 2026-11-24 16:25:51 +01:00
helm Release 0.2.1 2026-11-25 13:15:48 +01:00
internal Keep the burgerenvelop as the JWE string it now is 2026-11-24 13:10:11 +01:00
.dockerignore Deliver citizen envelopes to registered mailboxes as bezorgdienst 2026-11-23 11:13:02 +01:00
Dockerfile Publish the OpenAPI document as committed JSON and YAML, as in blauwe knop 2026-11-23 22:19:09 +01:00
go.mod Turn the copy of delivery-process into the bezorgdienst's data layer 2026-11-23 21:33:45 +01:00
go.sum Turn the copy of delivery-process into the bezorgdienst's data layer 2026-11-23 21:33:45 +01:00
LICENSE License under EUPL-1.2 2026-11-23 20:10:32 +01:00
Makefile Release delivery-service with a version, chart and image together 2026-11-24 19:02:12 +01:00
README.md Release delivery-service with a version, chart and image together 2026-11-24 19:02:12 +01:00

delivery-service

The data layer of the bezorgdienst in Notificatie voor Burgers. It stores and returns what delivery-process and delivery-management-process give and ask, and contains no business logic: it delivers nothing, checks nothing and decides nothing. It follows the blauwe-knop layering: delivery-process (logic) → delivery-service (data access) → delivery-db (schema and Postgres).

Internal only: never routed from outside the cluster. Every /v1 path except the specification needs a service key (Authorization: Bearer <key>), one per calling process.

API

Dutch, as in api/openapi.yaml (OpenAPI 3.1, NL API Design Rules), served at /v1/openapi.json and /v1/openapi.yaml (both committed in api/, as in blauwe knop). Every response carries API-Version; errors are application/problem+json.

  • PUT/GET/DELETE /v1/adressen/{functioneelAdres}: the technical address of a mailbox
  • PUT/DELETE /v1/zendingen/{zendingReferentie}, PUT …/poging, POST /v1/zendingen/_claim: zendingen taken on but not yet delivered; a claim hands each due zending to one caller only (FOR UPDATE SKIP LOCKED), and when to retry or return is decided by delivery-process
  • GET/POST /v1/gebeurtenissen: the newest 200 events
  • GET /v1/statistieken: registered mailboxes per host

What is stored: per functional address the technical address of its mailbox, and events with only the first eight characters of a functional address. No names, no BSN, never a sender or content: the bezorgdienst never receives the sender.

Configuration

  • DATABASE_URL: Postgres connection string (the uri key of the CloudNativePG app Secret of delivery-db)
  • DELIVERY_PROCESS_API_KEY, DELIVERY_MANAGEMENT_PROCESS_API_KEY: the service keys of the two callers
  • LISTEN_ADDRESS: defaults to :8080

Development

go test ./...          # needs docker, or TEST_DATABASE_URL pointing at a Postgres server
golangci-lint run ./...

The store tests use internal/repositories/testdata/schema.sql, which mirrors the migrations of delivery-db; change both together. With TEST_DATABASE_URL every test package creates a database of its own on that server, so packages running in parallel never share tables.

CI

.forgejo/workflows/ci.yml tests against a Postgres service container, validates the spec with Redocly and the ADR checker, lints the chart, and on main pushes code.digitaledienst.overheid.nl/mijn-betaaloverzicht/delivery-service:<commit>.

Release

make release VERSION=1.2.3   # on an up-to-date main: writes helm/Chart.yaml, commits, tags v1.2.3
git push --follow-tags

The tag pipeline tags the image 1.2.3 and v1.2.3 and publishes the chart at 1.2.3 to the Forgejo Helm registry (see the charts repository). The environments repository pins that version.

License

EUPL-1.2, see LICENSE.