23 lines
641 B
Go
23 lines
641 B
Go
package alerts
|
|
|
|
import (
|
|
"linkport/internal/model"
|
|
"linkport/internal/store"
|
|
"time"
|
|
)
|
|
|
|
// Repository is the persistence boundary required by alert evaluation and delivery.
|
|
// Store retains responsibility for transition deduplication and conditional updates.
|
|
type Repository interface {
|
|
AlertSettings() (store.AlertSettings, error)
|
|
List() ([]model.Proxy, error)
|
|
Targets() ([]model.Target, error)
|
|
Assets() ([]model.Asset, error)
|
|
Alerts() ([]store.Alert, error)
|
|
ReconcileAlert(store.Alert, bool, bool, time.Time) error
|
|
PruneAlerts(time.Time) error
|
|
AlertDelivery(int64, string, string) error
|
|
}
|
|
|
|
var _ Repository = (*store.Store)(nil)
|