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.
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.