start idp config

This commit is contained in:
adlerhurst
2020-11-17 13:44:37 +01:00
parent 4b1e79604a
commit edff816ec1
13 changed files with 239 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
package iam
import (
"context"
"github.com/caos/zitadel/internal/eventstore/v2"
)
@@ -38,3 +40,18 @@ func AggregateFromReadModel(rm *ReadModel) *Aggregate {
SetUpStarted: rm.SetUpStarted,
}
}
func (a *Aggregate) PushMemberAdded(ctx context.Context, userID string, roles ...string) *Aggregate {
a.Aggregate = *a.PushEvents(NewMemberAddedEvent(ctx, userID, roles...))
return a
}
func (a *Aggregate) PushMemberChanged(ctx context.Context, userID string, roles ...string) *Aggregate {
a.Aggregate = *a.PushEvents(NewMemberChangedEvent(ctx, userID, roles...))
return a
}
func (a *Aggregate) PushMemberRemoved(ctx context.Context, userID string) *Aggregate {
a.Aggregate = *a.PushEvents(NewMemberRemovedEvent(ctx, userID))
return a
}