use global id generator (#142)

* use global id generator

* remove duplicate `UserRemoved`

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2020-05-28 13:28:36 +02:00
committed by GitHub
parent 2758bf30b1
commit e3f9e9c05e
18 changed files with 69 additions and 76 deletions

View File

@@ -2,17 +2,16 @@ package eventsourcing
import (
"encoding/json"
"github.com/caos/zitadel/internal/id"
"time"
"github.com/golang/mock/gomock"
"github.com/sony/sonyflake"
mock_cache "github.com/caos/zitadel/internal/cache/mock"
"github.com/caos/zitadel/internal/crypto"
"github.com/caos/zitadel/internal/eventstore/mock"
es_models "github.com/caos/zitadel/internal/eventstore/models"
global_model "github.com/caos/zitadel/internal/model"
"github.com/caos/zitadel/internal/user/repository/eventsourcing/model"
"github.com/golang/mock/gomock"
)
func GetMockedEventstore(ctrl *gomock.Controller, mockEs *mock.MockEventstore) *UserEventstore {
@@ -52,8 +51,8 @@ func GetMockCache(ctrl *gomock.Controller) *UserCache {
return &UserCache{userCache: mockCache}
}
func GetSonyFlacke() *sonyflake.Sonyflake {
return sonyflake.NewSonyflake(sonyflake.Settings{})
func GetSonyFlacke() id.Generator {
return id.SonyFlakeGenerator
}
func GetMockPwGenerator(ctrl *gomock.Controller) crypto.Generator {