Files
job-search/internal/mock/findATender/testdata/catalog.json
T
bwilliams 5cb3601e1f Added fetch service and a mock Find a Tender server
Fetching:
- Add `fetch service`, which runs a worker per enabled source until
  SIGINT/SIGTERM (internal/fetcher)
- Add util.Worker: runs a task on an interval with a since-checkpoint
  that only advances on success, and a shutdown timeout for in-flight
  work; plus AwaitTask/AwaitTaskE for calls that ignore cancellation
- Add fts_mock and sleeper sources
- Sleeper: sleeps periodically to emulate work being done. Can be
  instructed to block the shutdown signal or handle it cleanly

Mock FTS server (cmd/mock-fts, internal/mock/findATender):
- Serves GET /api/1.0/ocdsReleasePackages with FTS paging, query
  validation, UK local time handling and per-client rate limiting
- Generates fictional releases from an embedded catalog, moving
  procedures through planning, tender and award, and keeps them in a
  JSON Lines store that survives restarts
- Add logging.AccessLog for combined/common access logs
2026-10-09 18:02:32 +01:00

39 lines
1.8 KiB
JSON

{
"buyers": [
{
"id": "ZZ-MPON-PAAA-1111-AAAA",
"name": "Example Borough Council",
"identifier": {"scheme": "ZZ-MPON", "id": "PAAA-1111-AAAA"},
"address": {"locality": "Exampleton", "postalCode": "ZZ1 1AA", "countryName": "United Kingdom", "region": "UKJ"},
"details": {"classifications": [{"scheme": "UK_CA_TYPE", "id": "publicAuthoritySubCentralGovernment", "description": "Public authority - sub-central government"}]}
},
{"id": "ZZ-MPON-PBBB-2222-BBBB", "name": "Example NHS Trust"}
],
"suppliers": [
{"id": "ZZ-MCOH-01234567", "name": "Example Supplies Ltd", "identifier": {"scheme": "ZZ-MCOH", "id": "01234567"}}
],
"subjects": [
{
"title": "Grounds maintenance services",
"mainProcurementCategory": "services",
"classification": "CPV-77314000",
"items": [{"id": "1", "additionalClassifications": ["CPV-77310000"], "deliveryAddresses": [{"region": "UKJ"}], "relatedLot": "1"}],
"lots": [{"id": "1", "title": "Lot 1: Parks", "value": {"amountGross": 120000, "amount": 100000, "currency": "GBP"}}],
"value": {"amountGross": 120000, "amount": 100000, "currency": "GBP"}
},
{
"title": "Patient transport",
"classification": "CPV-60130000"
}
],
"methods": [
{"procurementMethod": "open", "procurementMethodDetails": "Open procedure"},
{"procurementMethod": "selective", "procurementMethodDetails": "Competitive flexible procedure"}
],
"classifications": {
"CPV-60130000": {"scheme": "CPV", "id": "60130000", "description": "Special-purpose road passenger-transport services"},
"CPV-77310000": {"scheme": "CPV", "id": "77310000", "description": "Planting and maintenance services of green areas"},
"CPV-77314000": {"scheme": "CPV", "id": "77314000", "description": "Grounds maintenance services"}
}
}