mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-08 11:17:41 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
35 lines
1.1 KiB
Go
35 lines
1.1 KiB
Go
package view
|
|
|
|
import (
|
|
"github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
|
"github.com/zitadel/zitadel/internal/view/repository"
|
|
)
|
|
|
|
const (
|
|
notificationTable = "notification.notifications"
|
|
)
|
|
|
|
func (v *View) GetLatestNotificationSequence(instanceID string) (*repository.CurrentSequence, error) {
|
|
return v.latestSequence(notificationTable, instanceID)
|
|
}
|
|
|
|
func (v *View) GetLatestNotificationSequences() ([]*repository.CurrentSequence, error) {
|
|
return v.latestSequences(notificationTable)
|
|
}
|
|
|
|
func (v *View) ProcessedNotificationSequence(event *models.Event) error {
|
|
return v.saveCurrentSequence(notificationTable, event)
|
|
}
|
|
|
|
func (v *View) UpdateNotificationSpoolerRunTimestamp() error {
|
|
return v.updateSpoolerRunSequence(notificationTable)
|
|
}
|
|
|
|
func (v *View) GetLatestNotificationFailedEvent(sequence uint64, instanceID string) (*repository.FailedEvent, error) {
|
|
return v.latestFailedEvent(notificationTable, instanceID, sequence)
|
|
}
|
|
|
|
func (v *View) ProcessedNotificationFailedEvent(failedEvent *repository.FailedEvent) error {
|
|
return v.saveFailedEvent(failedEvent)
|
|
}
|