zitadel/internal/repository/user/human_mfa_events.go
Fabi d8e42744b4
fix: move v2 pkgs (#1331)
* fix: move eventstore pkgs

* fix: move eventstore pkgs

* fix: remove v2 view

* fix: remove v2 view
2021-02-23 15:13:04 +01:00

42 lines
966 B
Go

package user
import (
"context"
"github.com/caos/zitadel/internal/eventstore"
"github.com/caos/zitadel/internal/eventstore/repository"
)
const (
mfaEventPrefix = humanEventPrefix + "mfa."
HumanMFAInitSkippedType = mfaEventPrefix + "init.skipped"
)
type HumanMFAInitSkippedEvent struct {
eventstore.BaseEvent `json:"-"`
}
func (e *HumanMFAInitSkippedEvent) Data() interface{} {
return e
}
func (e *HumanMFAInitSkippedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint {
return nil
}
func NewHumanMFAInitSkippedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *HumanMFAInitSkippedEvent {
return &HumanMFAInitSkippedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
ctx,
aggregate,
HumanMFAInitSkippedType,
),
}
}
func HumanMFAInitSkippedEventMapper(event *repository.Event) (eventstore.EventReader, error) {
return &HumanMFAInitSkippedEvent{
BaseEvent: *eventstore.BaseEventFromRepo(event),
}, nil
}