infrastructure

package
v0.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package infrastructure holds the digest adapters: a stuck-PR repository over the store and Slack composer/poster adapters over the platform client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScheduledAnnouncementsRepo added in v0.27.0

type ScheduledAnnouncementsRepo struct {
	// contains filtered or unexported fields
}

ScheduledAnnouncementsRepo adapts the store's ScheduledNotifications repository to the digest's ScheduledAnnouncements port.

func NewScheduledAnnouncementsRepo added in v0.27.0

func NewScheduledAnnouncementsRepo(scheduled *persistence.ScheduledNotifications) *ScheduledAnnouncementsRepo

NewScheduledAnnouncementsRepo wraps the store's ScheduledNotifications repository.

func (*ScheduledAnnouncementsRepo) AnnouncedSince added in v0.27.0

func (r *ScheduledAnnouncementsRepo) AnnouncedSince(ctx context.Context, cutoff time.Time) ([]domain.AnnouncedPR, error)

AnnouncedSince implements domain.ScheduledAnnouncements.

type SlackComposer

type SlackComposer struct {
	// contains filtered or unexported fields
}

SlackComposer adapts the platform Slack composer to the digest's DigestComposer port, mapping the Slack message type to the domain's presentation-neutral Message at the boundary.

func NewSlackComposer

func NewSlackComposer(composer *slack.Composer) *SlackComposer

NewSlackComposer wraps the platform Slack composer.

func (*SlackComposer) StuckDigestList

func (c *SlackComposer) StuckDigestList(prs []domain.StuckPR) domain.Message

StuckDigestList implements domain.DigestComposer.

func (*SlackComposer) StuckDigestParent

func (c *SlackComposer) StuckDigestParent(mentions []string, count int) domain.Message

StuckDigestParent implements domain.DigestComposer.

type SlackPoster

type SlackPoster struct {
	// contains filtered or unexported fields
}

SlackPoster adapts the platform Slack client to the digest's DigestPoster port, mapping the domain's neutral Message back to the Slack message type at the boundary.

func NewSlackPoster

func NewSlackPoster(client *slack.Client) *SlackPoster

NewSlackPoster wraps the platform Slack client.

func (*SlackPoster) PostMessage

func (p *SlackPoster) PostMessage(ctx context.Context, channel string, msg domain.Message) (string, error)

PostMessage implements domain.DigestPoster.

func (*SlackPoster) PostReply

func (p *SlackPoster) PostReply(ctx context.Context, channel, threadTS string, msg domain.Message) (string, error)

PostReply implements domain.DigestPoster.

type StuckRepo

type StuckRepo struct {
	// contains filtered or unexported fields
}

StuckRepo adapts the store's PullRequests repository to the digest's StuckFinder port, mapping store persistence models to digest domain DTOs at the boundary so no gorm-tagged type crosses a port.

func NewStuckRepo

func NewStuckRepo(pullRequests *persistence.PullRequests) *StuckRepo

NewStuckRepo wraps the store's PullRequests repository.

func (*StuckRepo) FindStuck

func (r *StuckRepo) FindStuck(ctx context.Context, cutoff time.Time) ([]domain.PullRequest, error)

FindStuck implements domain.StuckFinder, mapping store rows to digest domain PullRequests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL