Documentation
¶
Overview ¶
Package notification wires the notification domain — the core PR-event → chat notification flow — into an fx module. This file is the only fx-aware part of the domain; the domain, application, and infrastructure layers stay framework-free.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Module = fx.Module("notification", fx.Provide( fx.Annotate(infrastructure.NewMessageRepo, fx.As(new(domain.MessageStore))), fx.Annotate(infrastructure.NewSlackMessenger, fx.As(new(domain.Messenger))), fx.Annotate(application.NewOpenHandler, fx.As(new(domain.Handler)), fx.ResultTags(`group:"handlers"`)), fx.Annotate(application.NewCloseHandler, fx.As(new(domain.Handler)), fx.ResultTags(`group:"handlers"`)), fx.Annotate(application.NewDraftHandler, fx.As(new(domain.Handler)), fx.ResultTags(`group:"handlers"`)), fx.Annotate(application.NewApproveHandler, fx.As(new(domain.Handler)), fx.ResultTags(`group:"handlers"`)), fx.Annotate(application.NewCommentedHandler, fx.As(new(domain.Handler)), fx.ResultTags(`group:"handlers"`)), fx.Annotate(application.NewRequestChangeHandler, fx.As(new(domain.Handler)), fx.ResultTags(`group:"handlers"`)), fx.Annotate(provideDispatcher, fx.As(new(domain.EventDispatcher))), ), )
Module binds the notification ports to their adapters and use cases, and assembles the six lifecycle handlers into a value group the dispatcher consumes. It expects the composition root to supply the external inputs it cannot build itself: the store's *store.PullRequests and *store.CodeReviews, a *slack.Client and *slack.Composer, the routing provider (as domain.RepoBehavior and domain.TargetResolver), and a *slog.Logger.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package application holds the notification use cases — the PR-lifecycle handlers (open/close/draft and the review-reaction handlers) and the event dispatcher — behind the domain's Handler and use-case interfaces.
|
Package application holds the notification use cases — the PR-lifecycle handlers (open/close/draft and the review-reaction handlers) and the event dispatcher — behind the domain's Handler and use-case interfaces. |
|
Package domain defines the notification domain's ports, DTOs, enums, and policies — the contracts for keeping one chat message per (PR, channel) in sync with GitHub PR events.
|
Package domain defines the notification domain's ports, DTOs, enums, and policies — the contracts for keeping one chat message per (PR, channel) in sync with GitHub PR events. |
|
Package infrastructure holds the notification adapters: the messages repository over the store, the Slack messenger over the platform client, and the GitHub inbound receiver.
|
Package infrastructure holds the notification adapters: the messages repository over the store, the Slack messenger over the platform client, and the GitHub inbound receiver. |