zitadel/internal/repository/user/human_mfa_events.go
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

43 lines
967 B
Go

package user
import (
"context"
"github.com/zitadel/zitadel/internal/eventstore"
"github.com/zitadel/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.Event, error) {
return &HumanMFAInitSkippedEvent{
BaseEvent: *eventstore.BaseEventFromRepo(event),
}, nil
}