No description
  • Go 97.3%
  • Makefile 1.5%
  • Dockerfile 0.8%
  • Go Template 0.4%
Find a file
Zamir Amir 08fafe71dd
All checks were successful
CI / image (push) Successful in 14s
CI / chart-release (push) Has been skipped
CI / chart (push) Successful in 9s
CI / test (push) Successful in 26s
CI / specification (push) Successful in 32s
Release 0.3.1
2026-11-25 13:16:12 +01:00
.forgejo/workflows Scan the rendered chart with KICS on every push and pull request 2026-11-25 10:34:13 +01:00
api Keep the vordering a bericht is about 2026-11-25 11:08:51 +01:00
cmd/source-organization-service Turn the copy of source-organization-process into the bronorganisatie's data layer 2026-11-23 21:59:27 +01:00
helm Release 0.3.1 2026-11-25 13:16:12 +01:00
internal Keep the vordering a bericht is about 2026-11-25 11:08:51 +01:00
.dockerignore Offer shipments for a functional address as bronorganisatie 2026-11-23 11:13:02 +01:00
CHANGELOG.md Keep the vordering a bericht is about 2026-11-25 11:08:51 +01:00
Dockerfile Turn the copy of source-organization-process into the bronorganisatie's data layer 2026-11-23 21:59:27 +01:00
go.mod Turn the copy of source-organization-process into the bronorganisatie's data layer 2026-11-23 21:59:27 +01:00
go.sum Turn the copy of source-organization-process into the bronorganisatie's data layer 2026-11-23 21:59:27 +01:00
LICENSE License under EUPL-1.2 2026-11-23 20:10:32 +01:00
Makefile Release source-organization-service with a version, chart and image together 2026-11-24 19:02:14 +01:00
README.md Release source-organization-service with a version, chart and image together 2026-11-24 19:02:14 +01:00

source-organization-service

The data layer of the bronorganisatie in Notificatie voor Burgers (blauwe-knop layering: process, service, db). It stores and returns what source-organization-process gives and asks for, and makes no decisions: no validation of message types, no rules about when an ontvangstbevestiging is allowed.

Five operations are conditional because only the database can make them atomic: the first retrieval moment, the first ontvangstbevestiging and the first retour moment are set only while still empty, the next volgnummer per adreskaart is handed out in one statement, and an adreskaartlevering replaces what is kept for its BSN only when its version is higher.

The burgers the adresregister delivered (POST /v1/burgers) are kept with BSN, name and adreskaart under an unguessable id of the service's own; a bericht refers to that burgerId. Searching by name is a POST (/v1/burgers/zoeken), so neither a name nor a BSN ever lands in a URL.

A bericht also keeps the verzenddienst's zendingReferentie (PUT /v1/berichten/{id}/zending-referentie), so a retour, which carries only that reference, finds its bericht (PUT /v1/retouren/{zendingReferentie}). A zending the verzenddienst refused at offer never got a reference; its bericht gets its retour moment by id (PUT /v1/berichten/{id}/retour-op).

API

Contract: api/openapi.yaml (OpenAPI 3.1, Dutch, NL API Design Rules), with the generated api/openapi.json committed next to it. Both are served at /v1/openapi.yaml and /v1/openapi.json; CI checks that the JSON matches the YAML. Regenerate after a change:

npx -y js-yaml@4 api/openapi.yaml > api/openapi.json

Internal only (Kubernetes Service source-organization-service), never routed. Every call except the specification needs the caller's service key as Authorization: Bearer <key>.

Configuration

  • DATABASE_URL: from the app Secret that CloudNativePG creates for source-organization-db (uri)
  • SOURCE_ORGANIZATION_PROCESS_API_KEY: the service key of source-organization-process, from the Secret source-organization-api-keys
  • LISTEN_ADDRESS: defaults to :8080

Development

The tests run against a real Postgres, because the SQL is what this service is about: TEST_DATABASE_URL (each test package creates a database of its own on that server) or, without it, a throwaway container via the local docker.

go test ./...
golangci-lint run ./...
docker build --target production -t code.digitaledienst.overheid.nl/mijn-betaaloverzicht/source-organization-service:dev .

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.