notificationservice

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MailService added in v0.14.0

type MailService interface {
	SendMail(
		ctx context.Context,
		channel models.NotificationChannel,
		recipient string,
		subject string,
		htmlBody string,
	) error
}

type NotificationChannelService added in v0.14.0

type NotificationChannelService interface {
	GetNotificationChannelByIdAndType(
		ctx context.Context,
		id string,
		channelType models.ChannelType,
	) (models.NotificationChannel, error)
}

type NotificationRepository added in v0.14.0

type NotificationRepository interface {
	ListNotifications(
		ctx context.Context,
		resultSelector query.ResultSelector,
	) (notifications []models.Notification, totalResult uint64, err error)
	CreateNotification(ctx context.Context, notification models.Notification) (models.Notification, error)
}

type NotificationService

type NotificationService interface {
	ListNotifications(
		ctx context.Context,
		resultSelector query.ResultSelector,
	) (notifications []models.Notification, totalResult uint64, err error)
	CreateNotification(
		ctx context.Context,
		notificationIn models.Notification,
	) (notification models.Notification, err error)
}

func NewNotificationService

func NewNotificationService(
	store NotificationRepository,
	ruleService RuleService,
	channelService NotificationChannelService,
	mailService MailService,
	mattermostService WebhookService,
	teamsService WebhookService,
) NotificationService

type RuleService added in v0.14.0

type RuleService interface {
	ProcessRules(ctx context.Context, notification models.Notification) ([]models.Action, error)
}

type SendTask added in v0.14.0

type SendTask struct {
	Notification *models.Notification // avoid copies, as object can be quite large
	Action       models.Action
	// contains filtered or unexported fields
}

type WebhookService added in v0.14.0

type WebhookService interface {
	SendMessage(webhookUrl string, message string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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