Files

18 lines
543 B
Go

package notifier
import (
"context"
"github.com/vincentc-afk/gitea-notification-hub/internal/event"
)
// Notifier defines the interface for sending notifications
// This abstraction allows for different notification providers (Slack, Teams, Discord, etc.)
type Notifier interface {
// SendDirect sends a direct message to a user
SendDirect(ctx context.Context, userID string, msg *event.Notification) error
// SendChannel sends a message to a channel
SendChannel(ctx context.Context, channel string, msg *event.Notification) error
}