mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-08 20:17:40 +00:00
ebeedd1346
member not working atm
22 lines
412 B
Go
22 lines
412 B
Go
package provider
|
|
|
|
import "github.com/caos/zitadel/internal/eventstore/v2"
|
|
|
|
type WriteModel struct {
|
|
eventstore.WriteModel
|
|
|
|
IDPConfigID string
|
|
IDPProviderType Type
|
|
}
|
|
|
|
func (wm *WriteModel) Reduce() error {
|
|
for _, event := range wm.Events {
|
|
switch e := event.(type) {
|
|
case *AddedEvent:
|
|
wm.IDPConfigID = e.IDPConfigID
|
|
wm.IDPProviderType = e.IDPProviderType
|
|
}
|
|
}
|
|
return wm.WriteModel.Reduce()
|
|
}
|