use global id generator (#142)

* use global id generator

* remove duplicate `UserRemoved`

Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
Fabi
2020-05-28 13:28:36 +02:00
committed by GitHub
co-authored by Livio Amstutz
parent 2758bf30b1
commit e3f9e9c05e
18 changed files with 69 additions and 76 deletions
@@ -2,15 +2,11 @@ package eventsourcing
import (
"context"
"github.com/caos/zitadel/internal/errors"
es_models "github.com/caos/zitadel/internal/eventstore/models"
org_model "github.com/caos/zitadel/internal/org/model"
"github.com/sony/sonyflake"
)
var idGenerator = sonyflake.NewSonyflake(sonyflake.Settings{})
func OrgByIDQuery(id string, latestSequence uint64) (*es_models.SearchQuery, error) {
if id == "" {
return nil, errors.ThrowPreconditionFailed(nil, "EVENT-dke74", "id should be filled")