mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-20 07:17:46 +00:00
fix: rename iam to instance (#3345)
* fix: rename iam command side to instance * fix: rename iam command side to instance * fix: rename iam command side to instance * fix: rename iam command side to instance * fix: rename orgiampolicy to domain policy * fix: merge conflicts * fix: protos * fix: md files * implement deprecated org iam policy again Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
44
internal/repository/instance/features.go
Normal file
44
internal/repository/instance/features.go
Normal file
@@ -0,0 +1,44 @@
|
||||
package instance
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
"github.com/caos/zitadel/internal/eventstore/repository"
|
||||
"github.com/caos/zitadel/internal/repository/features"
|
||||
)
|
||||
|
||||
var (
|
||||
FeaturesSetEventType = instanceEventTypePrefix + features.FeaturesSetEventType
|
||||
)
|
||||
|
||||
type FeaturesSetEvent struct {
|
||||
features.FeaturesSetEvent
|
||||
}
|
||||
|
||||
func NewFeaturesSetEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
changes []features.FeaturesChanges,
|
||||
) (*FeaturesSetEvent, error) {
|
||||
changedEvent, err := features.NewFeaturesSetEvent(
|
||||
eventstore.NewBaseEventForPush(
|
||||
ctx,
|
||||
aggregate,
|
||||
FeaturesSetEventType),
|
||||
changes,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &FeaturesSetEvent{FeaturesSetEvent: *changedEvent}, nil
|
||||
}
|
||||
|
||||
func FeaturesSetEventMapper(event *repository.Event) (eventstore.Event, error) {
|
||||
e, err := features.FeaturesSetEventMapper(event)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &FeaturesSetEvent{FeaturesSetEvent: *e.(*features.FeaturesSetEvent)}, nil
|
||||
}
|
Reference in New Issue
Block a user