mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 05:52:51 +00:00
# Which Problems Are Solved `@zitadel/api:generate-go` failed due to duplicate generated files. https://github.com/zitadel/zitadel/pull/11820 removed the old generated file and added a generate command to the `internal/crypto/crypto.go` file. However, there was already a `internal/crypto/generate.go` with a different output file name (the old file). # How the Problems Are Solved Removed the `internal/crypto/generate.go` file and moved the second generate into `internal/crypto/code.go`. # Additional Changes Noticed that mockgen is an old version and updated it. Also then checked all other tools and updated them. # Additional Context - relates to #11820 - noted internally
176 lines
5.8 KiB
Go
176 lines
5.8 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/zitadel/zitadel/internal/eventstore (interfaces: Querier,Pusher)
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -package mock -destination ./repository.mock.go github.com/zitadel/zitadel/internal/eventstore Querier,Pusher
|
|
//
|
|
|
|
// Package mock is a generated GoMock package.
|
|
package mock
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
|
|
decimal "github.com/shopspring/decimal"
|
|
database "github.com/zitadel/zitadel/backend/v3/storage/database"
|
|
database0 "github.com/zitadel/zitadel/internal/database"
|
|
eventstore "github.com/zitadel/zitadel/internal/eventstore"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockQuerier is a mock of Querier interface.
|
|
type MockQuerier struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockQuerierMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockQuerierMockRecorder is the mock recorder for MockQuerier.
|
|
type MockQuerierMockRecorder struct {
|
|
mock *MockQuerier
|
|
}
|
|
|
|
// NewMockQuerier creates a new mock instance.
|
|
func NewMockQuerier(ctrl *gomock.Controller) *MockQuerier {
|
|
mock := &MockQuerier{ctrl: ctrl}
|
|
mock.recorder = &MockQuerierMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockQuerier) EXPECT() *MockQuerierMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Client mocks base method.
|
|
func (m *MockQuerier) Client() *database0.DB {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Client")
|
|
ret0, _ := ret[0].(*database0.DB)
|
|
return ret0
|
|
}
|
|
|
|
// Client indicates an expected call of Client.
|
|
func (mr *MockQuerierMockRecorder) Client() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Client", reflect.TypeOf((*MockQuerier)(nil).Client))
|
|
}
|
|
|
|
// FilterToReducer mocks base method.
|
|
func (m *MockQuerier) FilterToReducer(ctx context.Context, searchQuery *eventstore.SearchQueryBuilder, r eventstore.Reducer) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "FilterToReducer", ctx, searchQuery, r)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// FilterToReducer indicates an expected call of FilterToReducer.
|
|
func (mr *MockQuerierMockRecorder) FilterToReducer(ctx, searchQuery, r any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilterToReducer", reflect.TypeOf((*MockQuerier)(nil).FilterToReducer), ctx, searchQuery, r)
|
|
}
|
|
|
|
// Health mocks base method.
|
|
func (m *MockQuerier) Health(ctx context.Context) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Health", ctx)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Health indicates an expected call of Health.
|
|
func (mr *MockQuerierMockRecorder) Health(ctx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Health", reflect.TypeOf((*MockQuerier)(nil).Health), ctx)
|
|
}
|
|
|
|
// InstanceIDs mocks base method.
|
|
func (m *MockQuerier) InstanceIDs(ctx context.Context, queryFactory *eventstore.SearchQueryBuilder) ([]string, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "InstanceIDs", ctx, queryFactory)
|
|
ret0, _ := ret[0].([]string)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// InstanceIDs indicates an expected call of InstanceIDs.
|
|
func (mr *MockQuerierMockRecorder) InstanceIDs(ctx, queryFactory any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceIDs", reflect.TypeOf((*MockQuerier)(nil).InstanceIDs), ctx, queryFactory)
|
|
}
|
|
|
|
// LatestPosition mocks base method.
|
|
func (m *MockQuerier) LatestPosition(ctx context.Context, queryFactory *eventstore.SearchQueryBuilder) (decimal.Decimal, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "LatestPosition", ctx, queryFactory)
|
|
ret0, _ := ret[0].(decimal.Decimal)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// LatestPosition indicates an expected call of LatestPosition.
|
|
func (mr *MockQuerierMockRecorder) LatestPosition(ctx, queryFactory any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestPosition", reflect.TypeOf((*MockQuerier)(nil).LatestPosition), ctx, queryFactory)
|
|
}
|
|
|
|
// MockPusher is a mock of Pusher interface.
|
|
type MockPusher struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockPusherMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockPusherMockRecorder is the mock recorder for MockPusher.
|
|
type MockPusherMockRecorder struct {
|
|
mock *MockPusher
|
|
}
|
|
|
|
// NewMockPusher creates a new mock instance.
|
|
func NewMockPusher(ctrl *gomock.Controller) *MockPusher {
|
|
mock := &MockPusher{ctrl: ctrl}
|
|
mock.recorder = &MockPusherMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockPusher) EXPECT() *MockPusherMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Health mocks base method.
|
|
func (m *MockPusher) Health(ctx context.Context) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Health", ctx)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Health indicates an expected call of Health.
|
|
func (mr *MockPusherMockRecorder) Health(ctx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Health", reflect.TypeOf((*MockPusher)(nil).Health), ctx)
|
|
}
|
|
|
|
// Push mocks base method.
|
|
func (m *MockPusher) Push(ctx context.Context, client database.QueryExecutor, commands ...eventstore.Command) ([]eventstore.Event, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx, client}
|
|
for _, a := range commands {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "Push", varargs...)
|
|
ret0, _ := ret[0].([]eventstore.Event)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Push indicates an expected call of Push.
|
|
func (mr *MockPusherMockRecorder) Push(ctx, client any, commands ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx, client}, commands...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Push", reflect.TypeOf((*MockPusher)(nil).Push), varargs...)
|
|
}
|