Documentation
¶
Overview ¶
Package digest wires the digest domain — the scheduled stuck-PR reminder — 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("digest", fx.Provide( fx.Annotate(infrastructure.NewStuckRepo, fx.As(new(domain.StuckFinder))), fx.Annotate(infrastructure.NewScheduledAnnouncementsRepo, fx.As(new(domain.ScheduledAnnouncements))), fx.Annotate(infrastructure.NewSlackComposer, fx.As(new(domain.DigestComposer))), fx.Annotate(infrastructure.NewSlackPoster, fx.As(new(domain.DigestPoster))), provideReporterParams, fx.Annotate(application.NewReporter, fx.As(new(domain.DigestReporter)), fx.As(new(domain.ScheduleJob))), fx.Annotate(provideCalendar, fx.As(new(domain.DigestCalendar))), provideSchedulerParams, fx.Annotate(application.NewScheduler, fx.As(new(domain.DigestScheduler))), ), )
Module binds the digest ports to their adapters and use cases. It expects the composition root to supply the external inputs it cannot build itself: the store's *store.PullRequests and *store.ScheduledNotifications, a *slack.Composer, a *slack.Client, the routing provider (as domain.DigestTargets and domain.DigestResolver), a *slog.Logger, and a Config.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.21.2
type Config struct {
Specs []string
TZ *time.Location
Provider kernel.Provider
// Country is the ISO 3166-1 alpha-2 code selecting the holiday table.
// Empty means weekends only.
Country string
}
Config carries the digest module's runtime configuration — the distinct enabled cron specs, the digest timezone, and the deployment's git provider — supplied as a single value by the composition root (or a test).
Directories
¶
| Path | Synopsis |
|---|---|
|
Package application holds the digest use cases — the stuck-PR reporter and the cron scheduler — behind the domain's use-case interfaces.
|
Package application holds the digest use cases — the stuck-PR reporter and the cron scheduler — behind the domain's use-case interfaces. |
|
Package domain defines the digest domain's ports, DTOs, and constants — the scheduled stuck-PR reminder contracts.
|
Package domain defines the digest domain's ports, DTOs, and constants — the scheduled stuck-PR reminder contracts. |
|
Package infrastructure holds the digest adapters: a stuck-PR repository over the store and Slack composer/poster adapters over the platform client.
|
Package infrastructure holds the digest adapters: a stuck-PR repository over the store and Slack composer/poster adapters over the platform client. |