Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityInfo ¶
type ActivityInfo struct {
Type pullrequest.ActivityType
Count int
}
ActivityInfo holds information about activities
type EventHandler ¶
type EventHandler interface {
// Handle processes a domain event
// Returns error if handling fails
Handle(ctx context.Context, event pullrequest.Event) error
}
EventHandler is the port for handling domain events Implementations react to events by sending notifications, updating state, etc.
type EventPublisher ¶
type EventPublisher interface {
// Publish dispatches a domain event to all registered handlers
Publish(event pullrequest.Event) error
}
EventPublisher is the port for publishing domain events Implementations can dispatch events to handlers, persist them, or send to external systems
type NotificationPort ¶
type NotificationPort interface {
// NotifyPullRequests sends grouped notifications for pull requests
NotifyPullRequests(notifications []*PRNotificationData) error
// NotifyMessage sends a simple text notification (e.g., setup instructions)
NotifyMessage(title, message string) error
// SupportsClickActions returns true if this adapter supports click actions
SupportsClickActions() bool
}
NotificationPort is the port for sending notifications
type PRNotificationData ¶
type PRNotificationData struct {
PullRequest *pullrequest.PullRequest
IsNew bool
Activities []ActivityInfo
StatusChanges []StatusChange
ReviewChanges []ReviewChangeInfo
PipelineChange *PipelineStatusChange // nil if no pipeline status change
}
PRNotificationData represents the data for a single PR notification
type PipelineStatusChange ¶
type PipelineStatusChange struct {
OldStatus pullrequest.PipelineStatus
NewStatus pullrequest.PipelineStatus
}
PipelineStatusChange holds information about a CI/CD pipeline status transition
type ReviewChangeInfo ¶
type ReviewChangeInfo struct {
Reviewer string
State pullrequest.ReviewState
}
ReviewChangeInfo holds information about a review state change
type StatusChange ¶
type StatusChange struct {
EventType pullrequest.StatusChangeType
}
StatusChange holds information about status changes
type UIPort ¶
type UIPort interface {
// UpdateDisplay updates the user interface with the current PR state
// Different implementations can render this data however they want:
// - Systray menu adapter: Shows PRs in dropdown menus
// - Web UI adapter: Renders HTML with PR cards
// - Terminal UI adapter: Displays in a TUI with lists
UpdateDisplay(requestedReviewPRs, userCreatedPRs []*pullrequest.PullRequest, trackingRepo pullrequest.PRTrackingRepository)
}
UIPort represents the boundary between the application and any UI implementation This port is UI-agnostic and can be implemented by systray menus, web UIs, terminal UIs, etc.