From 3dc33cbc1f5fccfcec2476c1a9c63f79fb2ef9ed Mon Sep 17 00:00:00 2001 From: Vincent Boutour Date: Tue, 9 Aug 2022 19:11:01 +0200 Subject: [PATCH] refactor: missing file Signed-off-by: Vincent Boutour --- pkg/mocks/interfaces.go | 998 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 998 insertions(+) create mode 100644 pkg/mocks/interfaces.go diff --git a/pkg/mocks/interfaces.go b/pkg/mocks/interfaces.go new file mode 100644 index 00000000..00dbd665 --- /dev/null +++ b/pkg/mocks/interfaces.go @@ -0,0 +1,998 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: interfaces.go + +// Package mocks is a generated GoMock package. +package mocks + +import ( + context "context" + reflect "reflect" + + model "github.com/ViBiOh/auth/v2/pkg/model" + model0 "github.com/ViBiOh/ketchup/pkg/model" + semver "github.com/ViBiOh/ketchup/pkg/semver" + model1 "github.com/ViBiOh/mailer/pkg/model" + gomock "github.com/golang/mock/gomock" +) + +// Mailer is a mock of Mailer interface. +type Mailer struct { + ctrl *gomock.Controller + recorder *MailerMockRecorder +} + +// MailerMockRecorder is the mock recorder for Mailer. +type MailerMockRecorder struct { + mock *Mailer +} + +// NewMailer creates a new mock instance. +func NewMailer(ctrl *gomock.Controller) *Mailer { + mock := &Mailer{ctrl: ctrl} + mock.recorder = &MailerMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *Mailer) EXPECT() *MailerMockRecorder { + return m.recorder +} + +// Enabled mocks base method. +func (m *Mailer) Enabled() bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Enabled") + ret0, _ := ret[0].(bool) + return ret0 +} + +// Enabled indicates an expected call of Enabled. +func (mr *MailerMockRecorder) Enabled() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Enabled", reflect.TypeOf((*Mailer)(nil).Enabled)) +} + +// Send mocks base method. +func (m *Mailer) Send(arg0 context.Context, arg1 model1.MailRequest) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Send", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// Send indicates an expected call of Send. +func (mr *MailerMockRecorder) Send(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*Mailer)(nil).Send), arg0, arg1) +} + +// AuthService is a mock of AuthService interface. +type AuthService struct { + ctrl *gomock.Controller + recorder *AuthServiceMockRecorder +} + +// AuthServiceMockRecorder is the mock recorder for AuthService. +type AuthServiceMockRecorder struct { + mock *AuthService +} + +// NewAuthService creates a new mock instance. +func NewAuthService(ctrl *gomock.Controller) *AuthService { + mock := &AuthService{ctrl: ctrl} + mock.recorder = &AuthServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *AuthService) EXPECT() *AuthServiceMockRecorder { + return m.recorder +} + +// Check mocks base method. +func (m *AuthService) Check(arg0 context.Context, arg1, arg2 model.User) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Check", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// Check indicates an expected call of Check. +func (mr *AuthServiceMockRecorder) Check(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*AuthService)(nil).Check), arg0, arg1, arg2) +} + +// Create mocks base method. +func (m *AuthService) Create(arg0 context.Context, arg1 model.User) (model.User, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret0, _ := ret[0].(model.User) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *AuthServiceMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*AuthService)(nil).Create), arg0, arg1) +} + +// UserService is a mock of UserService interface. +type UserService struct { + ctrl *gomock.Controller + recorder *UserServiceMockRecorder +} + +// UserServiceMockRecorder is the mock recorder for UserService. +type UserServiceMockRecorder struct { + mock *UserService +} + +// NewUserService creates a new mock instance. +func NewUserService(ctrl *gomock.Controller) *UserService { + mock := &UserService{ctrl: ctrl} + mock.recorder = &UserServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *UserService) EXPECT() *UserServiceMockRecorder { + return m.recorder +} + +// StoreInContext mocks base method. +func (m *UserService) StoreInContext(arg0 context.Context) context.Context { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "StoreInContext", arg0) + ret0, _ := ret[0].(context.Context) + return ret0 +} + +// StoreInContext indicates an expected call of StoreInContext. +func (mr *UserServiceMockRecorder) StoreInContext(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreInContext", reflect.TypeOf((*UserService)(nil).StoreInContext), arg0) +} + +// UserStore is a mock of UserStore interface. +type UserStore struct { + ctrl *gomock.Controller + recorder *UserStoreMockRecorder +} + +// UserStoreMockRecorder is the mock recorder for UserStore. +type UserStoreMockRecorder struct { + mock *UserStore +} + +// NewUserStore creates a new mock instance. +func NewUserStore(ctrl *gomock.Controller) *UserStore { + mock := &UserStore{ctrl: ctrl} + mock.recorder = &UserStoreMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *UserStore) EXPECT() *UserStoreMockRecorder { + return m.recorder +} + +// Count mocks base method. +func (m *UserStore) Count(arg0 context.Context) (uint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Count", arg0) + ret0, _ := ret[0].(uint64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Count indicates an expected call of Count. +func (mr *UserStoreMockRecorder) Count(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Count", reflect.TypeOf((*UserStore)(nil).Count), arg0) +} + +// Create mocks base method. +func (m *UserStore) Create(arg0 context.Context, arg1 model0.User) (model0.Identifier, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret0, _ := ret[0].(model0.Identifier) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *UserStoreMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*UserStore)(nil).Create), arg0, arg1) +} + +// DoAtomic mocks base method. +func (m *UserStore) DoAtomic(arg0 context.Context, arg1 func(context.Context) error) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DoAtomic", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// DoAtomic indicates an expected call of DoAtomic. +func (mr *UserStoreMockRecorder) DoAtomic(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoAtomic", reflect.TypeOf((*UserStore)(nil).DoAtomic), arg0, arg1) +} + +// GetByEmail mocks base method. +func (m *UserStore) GetByEmail(arg0 context.Context, arg1 string) (model0.User, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetByEmail", arg0, arg1) + ret0, _ := ret[0].(model0.User) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByEmail indicates an expected call of GetByEmail. +func (mr *UserStoreMockRecorder) GetByEmail(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByEmail", reflect.TypeOf((*UserStore)(nil).GetByEmail), arg0, arg1) +} + +// GetByLoginID mocks base method. +func (m *UserStore) GetByLoginID(arg0 context.Context, arg1 uint64) (model0.User, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetByLoginID", arg0, arg1) + ret0, _ := ret[0].(model0.User) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByLoginID indicates an expected call of GetByLoginID. +func (mr *UserStoreMockRecorder) GetByLoginID(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByLoginID", reflect.TypeOf((*UserStore)(nil).GetByLoginID), arg0, arg1) +} + +// ListReminderUsers mocks base method. +func (m *UserStore) ListReminderUsers(ctx context.Context) ([]model0.User, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListReminderUsers", ctx) + ret0, _ := ret[0].([]model0.User) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListReminderUsers indicates an expected call of ListReminderUsers. +func (mr *UserStoreMockRecorder) ListReminderUsers(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListReminderUsers", reflect.TypeOf((*UserStore)(nil).ListReminderUsers), ctx) +} + +// GenericProvider is a mock of GenericProvider interface. +type GenericProvider struct { + ctrl *gomock.Controller + recorder *GenericProviderMockRecorder +} + +// GenericProviderMockRecorder is the mock recorder for GenericProvider. +type GenericProviderMockRecorder struct { + mock *GenericProvider +} + +// NewGenericProvider creates a new mock instance. +func NewGenericProvider(ctrl *gomock.Controller) *GenericProvider { + mock := &GenericProvider{ctrl: ctrl} + mock.recorder = &GenericProviderMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *GenericProvider) EXPECT() *GenericProviderMockRecorder { + return m.recorder +} + +// LatestVersions mocks base method. +func (m *GenericProvider) LatestVersions(arg0 context.Context, arg1 string, arg2 []string) (map[string]semver.Version, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "LatestVersions", arg0, arg1, arg2) + ret0, _ := ret[0].(map[string]semver.Version) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// LatestVersions indicates an expected call of LatestVersions. +func (mr *GenericProviderMockRecorder) LatestVersions(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestVersions", reflect.TypeOf((*GenericProvider)(nil).LatestVersions), arg0, arg1, arg2) +} + +// HelmProvider is a mock of HelmProvider interface. +type HelmProvider struct { + ctrl *gomock.Controller + recorder *HelmProviderMockRecorder +} + +// HelmProviderMockRecorder is the mock recorder for HelmProvider. +type HelmProviderMockRecorder struct { + mock *HelmProvider +} + +// NewHelmProvider creates a new mock instance. +func NewHelmProvider(ctrl *gomock.Controller) *HelmProvider { + mock := &HelmProvider{ctrl: ctrl} + mock.recorder = &HelmProviderMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *HelmProvider) EXPECT() *HelmProviderMockRecorder { + return m.recorder +} + +// FetchIndex mocks base method. +func (m *HelmProvider) FetchIndex(arg0 context.Context, arg1 string, arg2 map[string][]string) (map[string]map[string]semver.Version, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "FetchIndex", arg0, arg1, arg2) + ret0, _ := ret[0].(map[string]map[string]semver.Version) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// FetchIndex indicates an expected call of FetchIndex. +func (mr *HelmProviderMockRecorder) FetchIndex(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchIndex", reflect.TypeOf((*HelmProvider)(nil).FetchIndex), arg0, arg1, arg2) +} + +// LatestVersions mocks base method. +func (m *HelmProvider) LatestVersions(arg0 context.Context, arg1, arg2 string, arg3 []string) (map[string]semver.Version, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "LatestVersions", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(map[string]semver.Version) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// LatestVersions indicates an expected call of LatestVersions. +func (mr *HelmProviderMockRecorder) LatestVersions(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestVersions", reflect.TypeOf((*HelmProvider)(nil).LatestVersions), arg0, arg1, arg2, arg3) +} + +// RepositoryService is a mock of RepositoryService interface. +type RepositoryService struct { + ctrl *gomock.Controller + recorder *RepositoryServiceMockRecorder +} + +// RepositoryServiceMockRecorder is the mock recorder for RepositoryService. +type RepositoryServiceMockRecorder struct { + mock *RepositoryService +} + +// NewRepositoryService creates a new mock instance. +func NewRepositoryService(ctrl *gomock.Controller) *RepositoryService { + mock := &RepositoryService{ctrl: ctrl} + mock.recorder = &RepositoryServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *RepositoryService) EXPECT() *RepositoryServiceMockRecorder { + return m.recorder +} + +// Clean mocks base method. +func (m *RepositoryService) Clean(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Clean", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Clean indicates an expected call of Clean. +func (mr *RepositoryServiceMockRecorder) Clean(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clean", reflect.TypeOf((*RepositoryService)(nil).Clean), arg0) +} + +// GetOrCreate mocks base method. +func (m *RepositoryService) GetOrCreate(arg0 context.Context, arg1 model0.RepositoryKind, arg2, arg3, arg4 string) (model0.Repository, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetOrCreate", arg0, arg1, arg2, arg3, arg4) + ret0, _ := ret[0].(model0.Repository) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOrCreate indicates an expected call of GetOrCreate. +func (mr *RepositoryServiceMockRecorder) GetOrCreate(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrCreate", reflect.TypeOf((*RepositoryService)(nil).GetOrCreate), arg0, arg1, arg2, arg3, arg4) +} + +// LatestVersions mocks base method. +func (m *RepositoryService) LatestVersions(arg0 context.Context, arg1 model0.Repository) (map[string]semver.Version, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "LatestVersions", arg0, arg1) + ret0, _ := ret[0].(map[string]semver.Version) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// LatestVersions indicates an expected call of LatestVersions. +func (mr *RepositoryServiceMockRecorder) LatestVersions(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestVersions", reflect.TypeOf((*RepositoryService)(nil).LatestVersions), arg0, arg1) +} + +// List mocks base method. +func (m *RepositoryService) List(arg0 context.Context, arg1 uint, arg2 string) ([]model0.Repository, uint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", arg0, arg1, arg2) + ret0, _ := ret[0].([]model0.Repository) + ret1, _ := ret[1].(uint64) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// List indicates an expected call of List. +func (mr *RepositoryServiceMockRecorder) List(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*RepositoryService)(nil).List), arg0, arg1, arg2) +} + +// ListByKinds mocks base method. +func (m *RepositoryService) ListByKinds(arg0 context.Context, arg1 uint, arg2 string, arg3 ...model0.RepositoryKind) ([]model0.Repository, uint64, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListByKinds", varargs...) + ret0, _ := ret[0].([]model0.Repository) + ret1, _ := ret[1].(uint64) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// ListByKinds indicates an expected call of ListByKinds. +func (mr *RepositoryServiceMockRecorder) ListByKinds(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByKinds", reflect.TypeOf((*RepositoryService)(nil).ListByKinds), varargs...) +} + +// Suggest mocks base method. +func (m *RepositoryService) Suggest(arg0 context.Context, arg1 []model0.Identifier, arg2 uint64) ([]model0.Repository, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Suggest", arg0, arg1, arg2) + ret0, _ := ret[0].([]model0.Repository) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Suggest indicates an expected call of Suggest. +func (mr *RepositoryServiceMockRecorder) Suggest(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Suggest", reflect.TypeOf((*RepositoryService)(nil).Suggest), arg0, arg1, arg2) +} + +// Update mocks base method. +func (m *RepositoryService) Update(arg0 context.Context, arg1 model0.Repository) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// Update indicates an expected call of Update. +func (mr *RepositoryServiceMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*RepositoryService)(nil).Update), arg0, arg1) +} + +// RepositoryStore is a mock of RepositoryStore interface. +type RepositoryStore struct { + ctrl *gomock.Controller + recorder *RepositoryStoreMockRecorder +} + +// RepositoryStoreMockRecorder is the mock recorder for RepositoryStore. +type RepositoryStoreMockRecorder struct { + mock *RepositoryStore +} + +// NewRepositoryStore creates a new mock instance. +func NewRepositoryStore(ctrl *gomock.Controller) *RepositoryStore { + mock := &RepositoryStore{ctrl: ctrl} + mock.recorder = &RepositoryStoreMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *RepositoryStore) EXPECT() *RepositoryStoreMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *RepositoryStore) Create(ctx context.Context, o model0.Repository) (model0.Identifier, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", ctx, o) + ret0, _ := ret[0].(model0.Identifier) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *RepositoryStoreMockRecorder) Create(ctx, o interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*RepositoryStore)(nil).Create), ctx, o) +} + +// DeleteUnused mocks base method. +func (m *RepositoryStore) DeleteUnused(ctx context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteUnused", ctx) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteUnused indicates an expected call of DeleteUnused. +func (mr *RepositoryStoreMockRecorder) DeleteUnused(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUnused", reflect.TypeOf((*RepositoryStore)(nil).DeleteUnused), ctx) +} + +// DeleteUnusedVersions mocks base method. +func (m *RepositoryStore) DeleteUnusedVersions(ctx context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteUnusedVersions", ctx) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteUnusedVersions indicates an expected call of DeleteUnusedVersions. +func (mr *RepositoryStoreMockRecorder) DeleteUnusedVersions(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUnusedVersions", reflect.TypeOf((*RepositoryStore)(nil).DeleteUnusedVersions), ctx) +} + +// DoAtomic mocks base method. +func (m *RepositoryStore) DoAtomic(ctx context.Context, action func(context.Context) error) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DoAtomic", ctx, action) + ret0, _ := ret[0].(error) + return ret0 +} + +// DoAtomic indicates an expected call of DoAtomic. +func (mr *RepositoryStoreMockRecorder) DoAtomic(ctx, action interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoAtomic", reflect.TypeOf((*RepositoryStore)(nil).DoAtomic), ctx, action) +} + +// Get mocks base method. +func (m *RepositoryStore) Get(ctx context.Context, id model0.Identifier, forUpdate bool) (model0.Repository, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, id, forUpdate) + ret0, _ := ret[0].(model0.Repository) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *RepositoryStoreMockRecorder) Get(ctx, id, forUpdate interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*RepositoryStore)(nil).Get), ctx, id, forUpdate) +} + +// GetByName mocks base method. +func (m *RepositoryStore) GetByName(ctx context.Context, repositoryKind model0.RepositoryKind, name, part string) (model0.Repository, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetByName", ctx, repositoryKind, name, part) + ret0, _ := ret[0].(model0.Repository) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *RepositoryStoreMockRecorder) GetByName(ctx, repositoryKind, name, part interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*RepositoryStore)(nil).GetByName), ctx, repositoryKind, name, part) +} + +// List mocks base method. +func (m *RepositoryStore) List(ctx context.Context, pageSize uint, last string) ([]model0.Repository, uint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", ctx, pageSize, last) + ret0, _ := ret[0].([]model0.Repository) + ret1, _ := ret[1].(uint64) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// List indicates an expected call of List. +func (mr *RepositoryStoreMockRecorder) List(ctx, pageSize, last interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*RepositoryStore)(nil).List), ctx, pageSize, last) +} + +// ListByKinds mocks base method. +func (m *RepositoryStore) ListByKinds(ctx context.Context, pageSize uint, last string, kinds ...model0.RepositoryKind) ([]model0.Repository, uint64, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, pageSize, last} + for _, a := range kinds { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListByKinds", varargs...) + ret0, _ := ret[0].([]model0.Repository) + ret1, _ := ret[1].(uint64) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// ListByKinds indicates an expected call of ListByKinds. +func (mr *RepositoryStoreMockRecorder) ListByKinds(ctx, pageSize, last interface{}, kinds ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, pageSize, last}, kinds...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByKinds", reflect.TypeOf((*RepositoryStore)(nil).ListByKinds), varargs...) +} + +// Suggest mocks base method. +func (m *RepositoryStore) Suggest(ctx context.Context, ignoreIds []model0.Identifier, count uint64) ([]model0.Repository, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Suggest", ctx, ignoreIds, count) + ret0, _ := ret[0].([]model0.Repository) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Suggest indicates an expected call of Suggest. +func (mr *RepositoryStoreMockRecorder) Suggest(ctx, ignoreIds, count interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Suggest", reflect.TypeOf((*RepositoryStore)(nil).Suggest), ctx, ignoreIds, count) +} + +// UpdateVersions mocks base method. +func (m *RepositoryStore) UpdateVersions(ctx context.Context, o model0.Repository) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateVersions", ctx, o) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateVersions indicates an expected call of UpdateVersions. +func (mr *RepositoryStoreMockRecorder) UpdateVersions(ctx, o interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVersions", reflect.TypeOf((*RepositoryStore)(nil).UpdateVersions), ctx, o) +} + +// KetchupService is a mock of KetchupService interface. +type KetchupService struct { + ctrl *gomock.Controller + recorder *KetchupServiceMockRecorder +} + +// KetchupServiceMockRecorder is the mock recorder for KetchupService. +type KetchupServiceMockRecorder struct { + mock *KetchupService +} + +// NewKetchupService creates a new mock instance. +func NewKetchupService(ctrl *gomock.Controller) *KetchupService { + mock := &KetchupService{ctrl: ctrl} + mock.recorder = &KetchupServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *KetchupService) EXPECT() *KetchupServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *KetchupService) Create(ctx context.Context, item model0.Ketchup) (model0.Ketchup, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", ctx, item) + ret0, _ := ret[0].(model0.Ketchup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *KetchupServiceMockRecorder) Create(ctx, item interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*KetchupService)(nil).Create), ctx, item) +} + +// Delete mocks base method. +func (m *KetchupService) Delete(ctx context.Context, item model0.Ketchup) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, item) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *KetchupServiceMockRecorder) Delete(ctx, item interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*KetchupService)(nil).Delete), ctx, item) +} + +// List mocks base method. +func (m *KetchupService) List(ctx context.Context, pageSize uint, last string) ([]model0.Ketchup, uint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", ctx, pageSize, last) + ret0, _ := ret[0].([]model0.Ketchup) + ret1, _ := ret[1].(uint64) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// List indicates an expected call of List. +func (mr *KetchupServiceMockRecorder) List(ctx, pageSize, last interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*KetchupService)(nil).List), ctx, pageSize, last) +} + +// ListForRepositories mocks base method. +func (m *KetchupService) ListForRepositories(ctx context.Context, repositories []model0.Repository, frequencies ...model0.KetchupFrequency) ([]model0.Ketchup, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, repositories} + for _, a := range frequencies { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListForRepositories", varargs...) + ret0, _ := ret[0].([]model0.Ketchup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListForRepositories indicates an expected call of ListForRepositories. +func (mr *KetchupServiceMockRecorder) ListForRepositories(ctx, repositories interface{}, frequencies ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, repositories}, frequencies...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListForRepositories", reflect.TypeOf((*KetchupService)(nil).ListForRepositories), varargs...) +} + +// ListOutdated mocks base method. +func (m *KetchupService) ListOutdated(ctx context.Context, users ...model0.User) ([]model0.Ketchup, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx} + for _, a := range users { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOutdated", varargs...) + ret0, _ := ret[0].([]model0.Ketchup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOutdated indicates an expected call of ListOutdated. +func (mr *KetchupServiceMockRecorder) ListOutdated(ctx interface{}, users ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx}, users...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOutdated", reflect.TypeOf((*KetchupService)(nil).ListOutdated), varargs...) +} + +// Update mocks base method. +func (m *KetchupService) Update(ctx context.Context, oldPattern string, item model0.Ketchup) (model0.Ketchup, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", ctx, oldPattern, item) + ret0, _ := ret[0].(model0.Ketchup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *KetchupServiceMockRecorder) Update(ctx, oldPattern, item interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*KetchupService)(nil).Update), ctx, oldPattern, item) +} + +// UpdateAll mocks base method. +func (m *KetchupService) UpdateAll(ctx context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateAll", ctx) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateAll indicates an expected call of UpdateAll. +func (mr *KetchupServiceMockRecorder) UpdateAll(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAll", reflect.TypeOf((*KetchupService)(nil).UpdateAll), ctx) +} + +// UpdateVersion mocks base method. +func (m *KetchupService) UpdateVersion(ctx context.Context, userID, repositoryID model0.Identifier, pattern, version string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateVersion", ctx, userID, repositoryID, pattern, version) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateVersion indicates an expected call of UpdateVersion. +func (mr *KetchupServiceMockRecorder) UpdateVersion(ctx, userID, repositoryID, pattern, version interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVersion", reflect.TypeOf((*KetchupService)(nil).UpdateVersion), ctx, userID, repositoryID, pattern, version) +} + +// KetchupStore is a mock of KetchupStore interface. +type KetchupStore struct { + ctrl *gomock.Controller + recorder *KetchupStoreMockRecorder +} + +// KetchupStoreMockRecorder is the mock recorder for KetchupStore. +type KetchupStoreMockRecorder struct { + mock *KetchupStore +} + +// NewKetchupStore creates a new mock instance. +func NewKetchupStore(ctrl *gomock.Controller) *KetchupStore { + mock := &KetchupStore{ctrl: ctrl} + mock.recorder = &KetchupStoreMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *KetchupStore) EXPECT() *KetchupStoreMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *KetchupStore) Create(ctx context.Context, o model0.Ketchup) (model0.Identifier, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", ctx, o) + ret0, _ := ret[0].(model0.Identifier) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *KetchupStoreMockRecorder) Create(ctx, o interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*KetchupStore)(nil).Create), ctx, o) +} + +// Delete mocks base method. +func (m *KetchupStore) Delete(ctx context.Context, o model0.Ketchup) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, o) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *KetchupStoreMockRecorder) Delete(ctx, o interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*KetchupStore)(nil).Delete), ctx, o) +} + +// DoAtomic mocks base method. +func (m *KetchupStore) DoAtomic(ctx context.Context, action func(context.Context) error) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DoAtomic", ctx, action) + ret0, _ := ret[0].(error) + return ret0 +} + +// DoAtomic indicates an expected call of DoAtomic. +func (mr *KetchupStoreMockRecorder) DoAtomic(ctx, action interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoAtomic", reflect.TypeOf((*KetchupStore)(nil).DoAtomic), ctx, action) +} + +// GetByRepository mocks base method. +func (m *KetchupStore) GetByRepository(ctx context.Context, id model0.Identifier, pattern string, forUpdate bool) (model0.Ketchup, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetByRepository", ctx, id, pattern, forUpdate) + ret0, _ := ret[0].(model0.Ketchup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByRepository indicates an expected call of GetByRepository. +func (mr *KetchupStoreMockRecorder) GetByRepository(ctx, id, pattern, forUpdate interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByRepository", reflect.TypeOf((*KetchupStore)(nil).GetByRepository), ctx, id, pattern, forUpdate) +} + +// List mocks base method. +func (m *KetchupStore) List(ctx context.Context, page uint, last string) ([]model0.Ketchup, uint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", ctx, page, last) + ret0, _ := ret[0].([]model0.Ketchup) + ret1, _ := ret[1].(uint64) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// List indicates an expected call of List. +func (mr *KetchupStoreMockRecorder) List(ctx, page, last interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*KetchupStore)(nil).List), ctx, page, last) +} + +// ListByRepositoriesIDAndFrequencies mocks base method. +func (m *KetchupStore) ListByRepositoriesIDAndFrequencies(ctx context.Context, ids []model0.Identifier, frequencies ...model0.KetchupFrequency) ([]model0.Ketchup, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, ids} + for _, a := range frequencies { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListByRepositoriesIDAndFrequencies", varargs...) + ret0, _ := ret[0].([]model0.Ketchup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListByRepositoriesIDAndFrequencies indicates an expected call of ListByRepositoriesIDAndFrequencies. +func (mr *KetchupStoreMockRecorder) ListByRepositoriesIDAndFrequencies(ctx, ids interface{}, frequencies ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, ids}, frequencies...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByRepositoriesIDAndFrequencies", reflect.TypeOf((*KetchupStore)(nil).ListByRepositoriesIDAndFrequencies), varargs...) +} + +// ListOutdated mocks base method. +func (m *KetchupStore) ListOutdated(ctx context.Context, usersIds ...model0.Identifier) ([]model0.Ketchup, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx} + for _, a := range usersIds { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOutdated", varargs...) + ret0, _ := ret[0].([]model0.Ketchup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOutdated indicates an expected call of ListOutdated. +func (mr *KetchupStoreMockRecorder) ListOutdated(ctx interface{}, usersIds ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx}, usersIds...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOutdated", reflect.TypeOf((*KetchupStore)(nil).ListOutdated), varargs...) +} + +// Update mocks base method. +func (m *KetchupStore) Update(ctx context.Context, o model0.Ketchup, oldPattern string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", ctx, o, oldPattern) + ret0, _ := ret[0].(error) + return ret0 +} + +// Update indicates an expected call of Update. +func (mr *KetchupStoreMockRecorder) Update(ctx, o, oldPattern interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*KetchupStore)(nil).Update), ctx, o, oldPattern) +} + +// UpdateAll mocks base method. +func (m *KetchupStore) UpdateAll(ctx context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateAll", ctx) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateAll indicates an expected call of UpdateAll. +func (mr *KetchupStoreMockRecorder) UpdateAll(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAll", reflect.TypeOf((*KetchupStore)(nil).UpdateAll), ctx) +} + +// UpdateVersion mocks base method. +func (m *KetchupStore) UpdateVersion(ctx context.Context, userID, repositoryID model0.Identifier, pattern, version string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateVersion", ctx, userID, repositoryID, pattern, version) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateVersion indicates an expected call of UpdateVersion. +func (mr *KetchupStoreMockRecorder) UpdateVersion(ctx, userID, repositoryID, pattern, version interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVersion", reflect.TypeOf((*KetchupStore)(nil).UpdateVersion), ctx, userID, repositoryID, pattern, version) +}