zitadel/internal/v2/command/iam.go
Livio Amstutz ff87264f95
feat: set up org (#1157)
* add setup steps

* refactoring

* omitempty

* cleanup

* begin org

* create org

* setup org

* setup org

* merge

* fixes

* fixes

* fixes
2021-01-08 11:33:45 +01:00

18 lines
390 B
Go

package command
import (
"context"
"github.com/caos/zitadel/internal/v2/domain"
)
//TODO: private
func (r *CommandSide) GetIAM(ctx context.Context, aggregateID string) (*domain.IAM, error) {
iamWriteModel := NewIAMWriteModel(aggregateID)
err := r.eventstore.FilterToQueryReducer(ctx, iamWriteModel)
if err != nil {
return nil, err
}
return writeModelToIAM(iamWriteModel), nil
}