Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { UserProvider UserProvider ReviseItemProvider ReviseItemProvider Notifier Notifier }
func NewApplication ¶
func NewApplication( userProvider UserProvider, reviseItemProvider ReviseItemProvider, notifier Notifier, ) Application
func (Application) NotifyUsers ¶
func (a Application) NotifyUsers(ctx context.Context) error
type Notifier ¶
type Notifier interface {
Notify(ctx context.Context, user domainUser.User, reviseItems []reviseitem.ReviseItem) error
}
type ReviseItemProvider ¶
type ReviseItemProvider interface { FetchReviseItemsDueForUser( ctx context.Context, userID uuid.UUID, ) ([]reviseitem.ReviseItem, error) }
type UserProvider ¶
type UserProvider interface { // GetUsersForNotification selects users whose notify time is less than now and greater than now - 1 minute. GetUsersForNotification(ctx context.Context) ([]domainUser.User, error) }
UserProvider defines the methods for user data access.
Click to show internal directories.
Click to hide internal directories.