Documentation
¶
Index ¶
Constants ¶
View Source
const BaseTimestamp = -1
Used when the timestamp doesn't exist
Variables ¶
This section is empty.
Functions ¶
func RunApplication ¶
func RunApplication(container *DependencyContainer)
Types ¶
type DependencyContainer ¶
type DependencyContainer struct {
Repository Repository
Sender Sender
TestTakerService TestTakerService
ErrorHandler ErrorHandler
FromEmailAddress EmailAddress
ThanksEmail Email
FetchTestTakersInterval time.Duration
}
type EmailAddress ¶
type ErrorHandler ¶
type Repository ¶
type Repository interface {
StoreLastFinishedAt(timestamp int) (err error)
FetchLastFinishedAt() (timestamp int, err error)
StoreFailedTestTakerEmail(email TestTakerEmail) (err error)
StoreTestTakerEmail(email TestTakerEmail) (err error)
FetchEmailForTestTaker(testTaker TestTaker) (testTakerEmail *TestTakerEmail, err error)
}
type Sender ¶
type Sender interface {
Send(to, from EmailAddress, email Email) error
}
type TestTakerEmail ¶
type TestTakerService ¶
type TestTakerService interface {
GetNewTestTakers(repository Repository, errorHandler ErrorHandler) (testTakers []TestTaker, err error)
}
Click to show internal directories.
Click to hide internal directories.