try writemodel

This commit is contained in:
adlerhurst
2020-11-20 17:03:17 +01:00
parent 609c4d4f24
commit 20f4fa56c5
12 changed files with 83 additions and 13 deletions
@@ -0,0 +1,41 @@
package idp
import "github.com/caos/zitadel/internal/eventstore/v2"
type ConfigAddedEvent struct {
eventstore.BaseEvent
ID string `json:"idpConfigId"`
Name string `json:"name"`
Type ConfigType `json:"idpType,omitempty"`
StylingType StylingType `json:"stylingType,omitempty"`
}
func NewAddedEvent(
base *eventstore.BaseEvent,
configID string,
name string,
configType ConfigType,
stylingType StylingType,
) *ConfigAddedEvent {
return &ConfigAddedEvent{
BaseEvent: *base,
ID: configID,
Name: name,
StylingType: stylingType,
Type: configType,
}
}
func (e *ConfigAddedEvent) CheckPrevious() bool {
return true
}
func (e *ConfigAddedEvent) Data() interface{} {
return e
}
type ConfigType uint32
type StylingType uint32