Skip to content

Commit

Permalink
[Dembo] Add notification mechanism interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
walbertus committed Sep 17, 2019
1 parent c7663a5 commit 3be5e90
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/app/service/notification/service/notification.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package service

import (
"proctor/pkg/notification/event"
)

type NotificationService interface {
Notify(evt event.Event)
}
11 changes: 11 additions & 0 deletions pkg/notification/event/event.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package event

type Event interface {
Type() string
User() UserData
Content() map[string]string
}

type UserData struct {
Email string
}
7 changes: 7 additions & 0 deletions pkg/notification/observer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package notification

import "proctor/pkg/notification/event"

type Observer interface {
OnNotify(evt event.Event)
}

0 comments on commit 3be5e90

Please sign in to comment.