Florian Forster fa9f581d56
chore(v2): move to new org (#3499)
* chore: move to new org

* logging

* fix: org rename caos -> zitadel

Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
2022-04-26 23:01:45 +00:00

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)
}