mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:27:31 +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:
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
"github.com/caos/zitadel/internal/eventstore/handler"
|
||||
"github.com/caos/zitadel/internal/eventstore/handler/crdb"
|
||||
"github.com/caos/zitadel/internal/repository/iam"
|
||||
"github.com/caos/zitadel/internal/repository/instance"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -57,30 +57,30 @@ func NewDebugNotificationProviderProjection(ctx context.Context, config crdb.Sta
|
||||
func (p *DebugNotificationProviderProjection) reducers() []handler.AggregateReducer {
|
||||
return []handler.AggregateReducer{
|
||||
{
|
||||
Aggregate: iam.AggregateType,
|
||||
Aggregate: instance.AggregateType,
|
||||
EventRedusers: []handler.EventReducer{
|
||||
{
|
||||
Event: iam.DebugNotificationProviderFileAddedEventType,
|
||||
Event: instance.DebugNotificationProviderFileAddedEventType,
|
||||
Reduce: p.reduceDebugNotificationProviderAdded,
|
||||
},
|
||||
{
|
||||
Event: iam.DebugNotificationProviderFileChangedEventType,
|
||||
Event: instance.DebugNotificationProviderFileChangedEventType,
|
||||
Reduce: p.reduceDebugNotificationProviderChanged,
|
||||
},
|
||||
{
|
||||
Event: iam.DebugNotificationProviderFileRemovedEventType,
|
||||
Event: instance.DebugNotificationProviderFileRemovedEventType,
|
||||
Reduce: p.reduceDebugNotificationProviderRemoved,
|
||||
},
|
||||
{
|
||||
Event: iam.DebugNotificationProviderLogAddedEventType,
|
||||
Event: instance.DebugNotificationProviderLogAddedEventType,
|
||||
Reduce: p.reduceDebugNotificationProviderAdded,
|
||||
},
|
||||
{
|
||||
Event: iam.DebugNotificationProviderLogChangedEventType,
|
||||
Event: instance.DebugNotificationProviderLogChangedEventType,
|
||||
Reduce: p.reduceDebugNotificationProviderChanged,
|
||||
},
|
||||
{
|
||||
Event: iam.DebugNotificationProviderLogRemovedEventType,
|
||||
Event: instance.DebugNotificationProviderLogRemovedEventType,
|
||||
Reduce: p.reduceDebugNotificationProviderRemoved,
|
||||
},
|
||||
},
|
||||
@@ -92,14 +92,14 @@ func (p *DebugNotificationProviderProjection) reduceDebugNotificationProviderAdd
|
||||
var providerEvent settings.DebugNotificationProviderAddedEvent
|
||||
var providerType domain.NotificationProviderType
|
||||
switch e := event.(type) {
|
||||
case *iam.DebugNotificationProviderFileAddedEvent:
|
||||
case *instance.DebugNotificationProviderFileAddedEvent:
|
||||
providerEvent = e.DebugNotificationProviderAddedEvent
|
||||
providerType = domain.NotificationProviderTypeFile
|
||||
case *iam.DebugNotificationProviderLogAddedEvent:
|
||||
case *instance.DebugNotificationProviderLogAddedEvent:
|
||||
providerEvent = e.DebugNotificationProviderAddedEvent
|
||||
providerType = domain.NotificationProviderTypeLog
|
||||
default:
|
||||
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-pYPxS", "reduce.wrong.event.type %v", []eventstore.EventType{iam.DebugNotificationProviderFileAddedEventType, iam.DebugNotificationProviderLogAddedEventType})
|
||||
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-pYPxS", "reduce.wrong.event.type %v", []eventstore.EventType{instance.DebugNotificationProviderFileAddedEventType, instance.DebugNotificationProviderLogAddedEventType})
|
||||
}
|
||||
|
||||
return crdb.NewCreateStatement(&providerEvent, []handler.Column{
|
||||
@@ -119,14 +119,14 @@ func (p *DebugNotificationProviderProjection) reduceDebugNotificationProviderCha
|
||||
var providerEvent settings.DebugNotificationProviderChangedEvent
|
||||
var providerType domain.NotificationProviderType
|
||||
switch e := event.(type) {
|
||||
case *iam.DebugNotificationProviderFileChangedEvent:
|
||||
case *instance.DebugNotificationProviderFileChangedEvent:
|
||||
providerEvent = e.DebugNotificationProviderChangedEvent
|
||||
providerType = domain.NotificationProviderTypeFile
|
||||
case *iam.DebugNotificationProviderLogChangedEvent:
|
||||
case *instance.DebugNotificationProviderLogChangedEvent:
|
||||
providerEvent = e.DebugNotificationProviderChangedEvent
|
||||
providerType = domain.NotificationProviderTypeLog
|
||||
default:
|
||||
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-pYPxS", "reduce.wrong.event.type %v", []eventstore.EventType{iam.DebugNotificationProviderFileChangedEventType, iam.DebugNotificationProviderLogChangedEventType})
|
||||
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-pYPxS", "reduce.wrong.event.type %v", []eventstore.EventType{instance.DebugNotificationProviderFileChangedEventType, instance.DebugNotificationProviderLogChangedEventType})
|
||||
}
|
||||
|
||||
cols := []handler.Column{
|
||||
@@ -151,14 +151,14 @@ func (p *DebugNotificationProviderProjection) reduceDebugNotificationProviderRem
|
||||
var providerEvent settings.DebugNotificationProviderRemovedEvent
|
||||
var providerType domain.NotificationProviderType
|
||||
switch e := event.(type) {
|
||||
case *iam.DebugNotificationProviderFileRemovedEvent:
|
||||
case *instance.DebugNotificationProviderFileRemovedEvent:
|
||||
providerEvent = e.DebugNotificationProviderRemovedEvent
|
||||
providerType = domain.NotificationProviderTypeFile
|
||||
case *iam.DebugNotificationProviderLogRemovedEvent:
|
||||
case *instance.DebugNotificationProviderLogRemovedEvent:
|
||||
providerEvent = e.DebugNotificationProviderRemovedEvent
|
||||
providerType = domain.NotificationProviderTypeLog
|
||||
default:
|
||||
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-dow9f", "reduce.wrong.event.type %v", []eventstore.EventType{iam.DebugNotificationProviderFileRemovedEventType, iam.DebugNotificationProviderLogRemovedEventType})
|
||||
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-dow9f", "reduce.wrong.event.type %v", []eventstore.EventType{instance.DebugNotificationProviderFileRemovedEventType, instance.DebugNotificationProviderLogRemovedEventType})
|
||||
}
|
||||
|
||||
return crdb.NewDeleteStatement(
|
||||
|
Reference in New Issue
Block a user