mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-19 06:17:32 +00:00
f51f0ede5c
* fix: add assets to eventstore and event * fix: project member, grant member, app changed tests * fix: asset migrations * feat: add asset tests * feat: add asset tests * Update internal/eventstore/repository/repository.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * feat: add asset tests Co-authored-by: Livio Amstutz <livio.a@gmail.com>
46 lines
1.0 KiB
Go
46 lines
1.0 KiB
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 (e *HumanMFAInitSkippedEvent) Assets() []*eventstore.Asset {
|
|
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
|
|
}
|