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:
Fabi
2022-03-24 17:21:34 +01:00
committed by GitHub
parent 504fe5b761
commit 9d4f296c62
274 changed files with 12073 additions and 11853 deletions

View File

@@ -7,7 +7,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"
"github.com/caos/zitadel/internal/repository/project"
)
@@ -64,15 +64,15 @@ func (p *SMTPConfigProjection) reducers() []handler.AggregateReducer {
Aggregate: project.AggregateType,
EventRedusers: []handler.EventReducer{
{
Event: iam.SMTPConfigAddedEventType,
Event: instance.SMTPConfigAddedEventType,
Reduce: p.reduceSMTPConfigAdded,
},
{
Event: iam.SMTPConfigChangedEventType,
Event: instance.SMTPConfigChangedEventType,
Reduce: p.reduceSMTPConfigChanged,
},
{
Event: iam.SMTPConfigPasswordChangedEventType,
Event: instance.SMTPConfigPasswordChangedEventType,
Reduce: p.reduceSMTPConfigPasswordChanged,
},
},
@@ -81,9 +81,9 @@ func (p *SMTPConfigProjection) reducers() []handler.AggregateReducer {
}
func (p *SMTPConfigProjection) reduceSMTPConfigAdded(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*iam.SMTPConfigAddedEvent)
e, ok := event.(*instance.SMTPConfigAddedEvent)
if !ok {
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-sk99F", "reduce.wrong.event.type %s", iam.SMTPConfigAddedEventType)
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-sk99F", "reduce.wrong.event.type %s", instance.SMTPConfigAddedEventType)
}
return crdb.NewCreateStatement(
e,
@@ -105,9 +105,9 @@ func (p *SMTPConfigProjection) reduceSMTPConfigAdded(event eventstore.Event) (*h
}
func (p *SMTPConfigProjection) reduceSMTPConfigChanged(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*iam.SMTPConfigChangedEvent)
e, ok := event.(*instance.SMTPConfigChangedEvent)
if !ok {
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-wl0wd", "reduce.wrong.event.type %s", iam.SMTPConfigChangedEventType)
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-wl0wd", "reduce.wrong.event.type %s", instance.SMTPConfigChangedEventType)
}
columns := make([]handler.Column, 0, 7)
@@ -138,9 +138,9 @@ func (p *SMTPConfigProjection) reduceSMTPConfigChanged(event eventstore.Event) (
}
func (p *SMTPConfigProjection) reduceSMTPConfigPasswordChanged(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*iam.SMTPConfigPasswordChangedEvent)
e, ok := event.(*instance.SMTPConfigPasswordChangedEvent)
if !ok {
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-fk02f", "reduce.wrong.event.type %s", iam.SMTPConfigChangedEventType)
return nil, errors.ThrowInvalidArgumentf(nil, "HANDL-fk02f", "reduce.wrong.event.type %s", instance.SMTPConfigChangedEventType)
}
return crdb.NewUpdateStatement(