infrastructure

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 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 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 (messages preloaded) to digest domain PullRequests.

Jump to

Keyboard shortcuts

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