60 lines
1.5 KiB
Markdown
60 lines
1.5 KiB
Markdown
# Changelog
|
|
|
|
## v0.4.0 - 2026-06-17
|
|
|
|
Added:
|
|
|
|
- `durableevent` package with the shared wire contract for durable
|
|
cross-service events.
|
|
- Event validation, payload normalization and stable idempotency key helper.
|
|
|
|
Migration:
|
|
|
|
1. Push `portal-common` commit and tag `v0.4.0`.
|
|
2. In each producer/consumer service, update:
|
|
|
|
```bash
|
|
go get gitea.estateliga.work/admin/portal-common@v0.4.0
|
|
go mod tidy
|
|
```
|
|
|
|
3. Use `durableevent.New(...)` for critical cross-service events and publish
|
|
the JSON envelope to the selected durable transport.
|
|
4. Keep consumers idempotent by storing or checking `idempotency_key`.
|
|
|
|
## v0.3.0 - 2026-06-17
|
|
|
|
Added:
|
|
|
|
- `audit` package with the shared business-audit event contract.
|
|
- Safe audit details redaction for sensitive keys such as token, secret,
|
|
password, api_key, authorization and webhook_url.
|
|
- `audit.Client` for `POST /api/internal/audit/events` in Portal.
|
|
|
|
Migration:
|
|
|
|
1. Push `portal-common` commit and tag `v0.3.0`.
|
|
2. In each service, update:
|
|
|
|
```bash
|
|
go get gitea.estateliga.work/admin/portal-common@v0.3.0
|
|
go mod tidy
|
|
```
|
|
|
|
3. Use `audit.NewClient(cfg.PortalBaseURL, cfg.PortalAPIKey)` or equivalent
|
|
Portal URL / internal key config already present in the service.
|
|
4. Send business events from handlers/workers after the durable operation
|
|
succeeds.
|
|
5. Keep Portal proxy audit mappings only as fallback until duplicate events are
|
|
checked in production.
|
|
|
|
## v0.2.0
|
|
|
|
Existing shared packages:
|
|
|
|
- `db`
|
|
- `middleware`
|
|
- `portal`
|
|
- `redisx`
|
|
- `eventbus`
|