Versions in this module Expand all Collapse all v0 v0.26.7 Jun 12, 2024 v0.26.6 Jun 8, 2024 Changes in this version + type BulkCheckEndpoints struct + type BulkCheckEndpointsHandler struct + func NewBulkCheckEndpointsHandler(httpChecker httpChecker, txProvider TransactionProvider, ...) BulkCheckEndpointsHandler + func (c BulkCheckEndpointsHandler) Execute(ctx context.Context, cmd BulkCheckEndpoints) error + type CheckEndpoint struct + MonitorID domain.ID + type CheckEndpointHandler struct + func NewCheckEndpointHandler(httpChecker httpChecker, monitorRepository monitor.Repository, ...) CheckEndpointHandler + func (c CheckEndpointHandler) Execute(ctx context.Context, cmd CheckEndpoint) error + type CheckResult struct + RequestHeaders string + ResponseBody string + ResponseHeaders string + ResponseStatus int16 + Result *monitor.CheckResult + type CreateAccount struct + Account *account.Account + type CreateAccountHandler struct + func NewCreateAccountHandler(txProvider TransactionProvider) CreateAccountHandler + func (h CreateAccountHandler) Execute(ctx context.Context, cmd CreateAccount) error + type CreateIncident struct + CheckResultID domain.ID + CheckedUrl string + MonitorID domain.ID + type CreateIncidentHandler struct + func NewCreateIncidentHandler(txProvider TransactionProvider, checkResultFinder checkResultFinder) CreateIncidentHandler + func (h CreateIncidentHandler) Execute(ctx context.Context, cmd CreateIncident) error + type CreateMonitor struct + Monitor *monitor.Monitor + type CreateMonitorHandler struct + func NewCreateMonitorHandler(monitorRepository monitor.Repository, eventPublisher EventPublisher) CreateMonitorHandler + func (h CreateMonitorHandler) Execute(ctx context.Context, cmd CreateMonitor) error + type DeleteMonitor struct + ID domain.ID + type DeleteMonitorHandler struct + func NewDeleteMonitorHandler(txProvider TransactionProvider) DeleteMonitorHandler + func (h DeleteMonitorHandler) Execute(ctx context.Context, cmd DeleteMonitor) error + type EditMonitor struct + CheckIntervalInSeconds time.Duration + EndpointUrl string + ID domain.ID + type EditMonitorHandler struct + func NewEditMonitorHandler(monitorRepository monitor.Repository) EditMonitorHandler + func (h EditMonitorHandler) Execute(ctx context.Context, cmd EditMonitor) error + type EndpointCheckFailedEvent struct + At time.Time + CheckResultID string + CheckedURL string + MonitorID string + type EndpointCheckSucceededEvent struct + At time.Time + MonitorID string + type EventPublisher interface + PublishEndpointCheckFailed func(ctx context.Context, event EndpointCheckFailedEvent) error + PublishEndpointCheckSucceeded func(ctx context.Context, event EndpointCheckSucceededEvent) error + PublishIncidentCreated func(ctx context.Context, event IncidentCreatedEvent) error + PublishIncidentResolved func(ctx context.Context, event IncidentResolvedEvent) error + PublishMonitorCreated func(ctx context.Context, event MonitorCreatedEvent) error + type IncidentCreatedEvent struct + At time.Time + IncidentID string + MonitorID string + type IncidentResolvedEvent struct + At time.Time + IncidentID string + MonitorID string + type LogIn struct + Email account.Email + PlainTextPassword string + type LoginHandler struct + func NewLoginHandler(userRepository account.UserRepository, tokenSigner tokenSigner) LoginHandler + func (h LoginHandler) Execute(ctx context.Context, cmd LogIn) (string, error) + type MonitorCreatedEvent struct + CreatedAt time.Time + ID string + type NotifyMonitorSubscribersOnIncident struct + IncidentID domain.ID + MonitorID domain.ID + type NotifyMonitorSubscribersOnIncidentHandler struct + func NewNotifyMonitorSubscribersOnIncidentHandler(txProvider TransactionProvider, subscriberNotifier subscriberNotifier) NotifyMonitorSubscribersOnIncidentHandler + func (h NotifyMonitorSubscribersOnIncidentHandler) Execute(ctx context.Context, cmd NotifyMonitorSubscribersOnIncident) error + type NotifyOnIncidentResolved struct + IncidentID domain.ID + MonitorID domain.ID + type NotifyOnIncidentResolvedHandler struct + func NewNotifyOnIncidentResolvedHandler(monitorRepository monitor.Repository, userRepository account.UserRepository, ...) NotifyOnIncidentResolvedHandler + func (h NotifyOnIncidentResolvedHandler) Execute(ctx context.Context, cmd NotifyOnIncidentResolved) error + type ResolveIncident struct + MonitorID domain.ID + type ResolveIncidentHandler struct + func NewResolveIncidentHandler(txProvider TransactionProvider) ResolveIncidentHandler + func (h ResolveIncidentHandler) Execute(ctx context.Context, cmd ResolveIncident) error + type ToggleMonitorPause struct + MonitorID domain.ID + Pause bool + type ToggleMonitorPauseHandler struct + func NewToggleMonitorPauseHandler(txProvider TransactionProvider) ToggleMonitorPauseHandler + func (h ToggleMonitorPauseHandler) Execute(ctx context.Context, cmd ToggleMonitorPause) error + type TransactFunc func(adapters TransactableAdapters) error + type TransactableAdapters struct + AccountRepository account.Repository + EventPublisher EventPublisher + IncidentRepository monitor.IncidentRepository + MonitorRepository monitor.Repository + UserRepository account.UserRepository + type TransactionProvider interface + Transact func(ctx context.Context, f TransactFunc) error