fix: v2 setup sequence (#3437)

* add/register human command done

* validations

* crypto

* move clientid

* keys

* fix: clientID

* remove v2 package

* tests

* tests running

* fix: add init instance to eventstore

* fix: mig

* test(eventstore): create instance

* revert old code

* instance domain from ctx

* chore: rename zitadel app ids

* comments

* fix: test

* fix: mock

* fix: test
This commit is contained in:
Silvan
2022-04-13 07:42:48 +02:00
committed by GitHub
parent 375a57377d
commit db554536a1
11 changed files with 137 additions and 81 deletions

View File

@@ -59,6 +59,10 @@ func (es *Eventstore) Push(ctx context.Context, cmds ...Command) ([]Event, error
return eventReaders, nil
}
func (es *Eventstore) NewInstance(ctx context.Context, instanceID string) error {
return es.repo.CreateInstance(ctx, instanceID)
}
func commandsToRepository(instanceID string, cmds []Command) (events []*repository.Event, constraints []*repository.UniqueConstraint, err error) {
events = make([]*repository.Event, len(cmds))
for i, cmd := range cmds {
@@ -245,7 +249,3 @@ func uniqueConstraintActionToRepository(action UniqueConstraintAction) repositor
return repository.UniqueConstraintAdd
}
}
func (es *Eventstore) Step20(ctx context.Context, latestSequence uint64) error {
return es.repo.Step20(ctx, latestSequence)
}