mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-15 06:51:18 +00:00
try splitt event
This commit is contained in:
36
internal/v2/repository/iam/aggregate.go
Normal file
36
internal/v2/repository/iam/aggregate.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package iam
|
||||
|
||||
import "github.com/caos/zitadel/internal/eventstore/v2"
|
||||
|
||||
type Aggregate struct {
|
||||
eventstore.Aggregate
|
||||
}
|
||||
|
||||
type Step int8
|
||||
|
||||
type SetupStepEvent struct {
|
||||
eventstore.BaseEvent `json:"-"`
|
||||
|
||||
Step Step
|
||||
//Done if the setup is started earlier
|
||||
Done bool `json:"-"`
|
||||
}
|
||||
|
||||
func (e *SetupStepEvent) CheckPrevious() bool {
|
||||
return e.Type() == "iam.setup.started"
|
||||
}
|
||||
|
||||
//Type implements event
|
||||
func (e *SetupStepEvent) Type() eventstore.EventType {
|
||||
if e.Done {
|
||||
return "iam.setup.done"
|
||||
}
|
||||
return "iam.setup.started"
|
||||
}
|
||||
|
||||
func (e *SetupStepEvent) Data() interface{} {
|
||||
return e
|
||||
}
|
||||
|
||||
type MemberAddedEvent struct {
|
||||
}
|
Reference in New Issue
Block a user