Documentation
¶
Overview ¶
Package notifications will be the notifications module: the webhook catalogue, criteria, signing and delivery.
Role ¶
notifications module, module root. Only app imports a module root; other modules reach notifications through notifications/api (decision 0044, dependency rules). The target layout keeps this module small and flat, so its logic will sit in this directory beside the constructor. Its storage skeleton (the module's ports, models and store adapters) sits in subpackages ahead of its phase; skeleton modules get no constructor until then (decision 0044, composition and HTTP).
Inputs ¶
None yet. Planned: one subscription per catalogue topic on the event bus in platform/events, and the Deps that app passes to New (target layout, lines 730-734).
Outputs ¶
None yet. Planned, in this directory (target layout, lines 318-321 and 730-734):
- module.go: New(Deps), which app calls in module order.
- catalogue.go: JFrog event names mapped to module events.
- criteria.go, delivery.go, signing.go, retry.go and troubleshoot.go: subscription criteria, delivery with retries and its log, request signing, and the troubleshooting view.
- subscribe.go: one bus subscription per catalogue topic.
References ¶
- Context map, notifications row, as https://github.com/weaveplatform/artifactweave/issues/958 records it: owns the webhook catalogue, criteria, signing and delivery; phases P11.
- Target layout: docs/research/architecture-options/5-modular-monolith.md, "Full package tree", lines 85-104 and 317-323, and "Webhooks and events (P11, P13)", lines 717-744.
- Decision 0044: docs/research/decisions/0044-modular-monolith-migration.md, "Placeholders" and "Composition and HTTP".
- Decision 0011: docs/research/decisions/0011-webhooks.md.
- Plan: docs/implementation/plan.md#p11-projects-webhooks-retention-replication.
Status ¶
Placeholder: implemented by P11.
Directories
¶
| Path | Synopsis |
|---|---|
|
adapters
|
|
|
http
Package notificationshttp will serve the event service's endpoints: webhook subscriptions, test deliveries and troubleshooting.
|
Package notificationshttp will serve the event service's endpoints: webhook subscriptions, test deliveries and troubleshooting. |
|
inmem
Package inmem is the in-memory implementation of the notifications module's stores: webhook subscriptions, with their handlers' secrets, and the delivery records.
|
Package inmem is the in-memory implementation of the notifications module's stores: webhook subscriptions, with their handlers' secrets, and the delivery records. |
|
sql
Package sql is the SQL implementation of the notifications module's stores: webhook subscriptions, their handlers' sealed secrets and the delivery records, with the module's registration with the SQL layer.
|
Package sql is the SQL implementation of the notifications module's stores: webhook subscriptions, their handlers' sealed secrets and the delivery records, with the module's registration with the SQL layer. |
|
sql/migrations
Package migrations holds the notifications module's migration stream: the SQLite and PostgreSQL schema of the tables the module's SQL adapter owns.
|
Package migrations holds the notifications module's migration stream: the SQLite and PostgreSQL schema of the tables the module's SQL adapter owns. |
|
storetest
Package storetest is the contract suite of the notifications module's stores: one set of expectations that every implementation of the webhook store must meet.
|
Package storetest is the contract suite of the notifications module's stores: one set of expectations that every implementation of the webhook store must meet. |
|
Package api will be the notifications module's published interface: webhook administration and the module's events.
|
Package api will be the notifications module's published interface: webhook administration and the module's events. |
|
core
|
|
|
model
Package model holds the notifications module's entity values: webhook subscriptions with their criteria and handlers, the delivery records the troubleshooting view reads, and the event types each webhook domain defines.
|
Package model holds the notifications module's entity values: webhook subscriptions with their criteria and handlers, the delivery records the troubleshooting view reads, and the event types each webhook domain defines. |
|
port
Package port declares the notifications module's store ports: the webhook store and Store, the part of the metadata store the module uses.
|
Package port declares the notifications module's store ports: the webhook store and Store, the part of the metadata store the module uses. |