notifier

package
v0.0.0-...-a8e4d9d Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ProgramName = "notifier"

Variables

This section is empty.

Functions

func Main

func Main()

Types

type DbNotificationRules

type DbNotificationRules struct {
	// contains filtered or unexported fields
}

func NewDbNotificationRules

func NewDbNotificationRules(db *sqlx.DB) *DbNotificationRules

func (*DbNotificationRules) FindByProjectUuid

func (self *DbNotificationRules) FindByProjectUuid(projectUuid string) ([]*domain.NotificationRule, error)

type DbScheduler

type DbScheduler struct {
	// contains filtered or unexported fields
}

func NewDbScheduler

func NewDbScheduler(db *sqlx.DB) *DbScheduler

func (*DbScheduler) ScheduleNotification

func (self *DbScheduler) ScheduleNotification(rule *domain.NotificationRule, activity *domain.Activity) error

type NotificationRulesStore

type NotificationRulesStore interface {
	FindByProjectUuid(projectUuid string) ([]*domain.NotificationRule, error)
}

type Scheduler

type Scheduler interface {
	ScheduleNotification(rule *domain.NotificationRule, activity *domain.Activity) error
}

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(rules NotificationRulesStore, scheduler Scheduler) *Worker

func (*Worker) HandleActivity

func (self *Worker) HandleActivity(activity *domain.Activity) error

func (*Worker) Notify

func (self *Worker) Notify(rule *domain.NotificationRule, activity *domain.Activity)

Jump to

Keyboard shortcuts

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