zitadel/internal/repository/user/human_mfa_events.go
Fabi 667cc30291
feat: asset storage (#1696)
* feat: remove assets

* feat: minio implementation

* fix: remove assets from tests

* feat: minio implementation

* feat: Env vars

* fix: sprintf

* fix: sprintf

* Update internal/eventstore/repository/repository.go

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* fix: error handling

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-05-03 10:15:50 +02: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
}