mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-06 02:48:50 +00:00
feat(domain): define user repositories (#11059)
This pull request introduces a new set of domain models and repositories for managing users within the new v3 structure. The goal is to establish a clean, robust, and extensible foundation for user management. ### Summary This PR accomplishes the following: - **Polymorphic User Model**: Introduces a `User` model in user.go that can represent either a `Human` or a `Machine` user. This provides a unified way to handle different user types while allowing for specific attributes and logic for each. - **Repository Pattern**: Implements the repository pattern for accessing and manipulating user data. This decouples the business logic from the data storage implementation. The main repository interfaces (`UserRepository`, `HumanUserRepository`, `MachineUserRepository`) are now defined in `backend/v3/domain/user_repository.go`. - **Comprehensive User Models**: The user.go file now also defines the domain models for associated user data, including `UserMetadata`, `IdentityProviderLink`, `Passkey`, `PersonalAccessToken`, and `MachineKey`. - **Generic Verification and Check System**: Introduces verification.go and check.go to provide a standardized way of handling various verification flows (e.g., email verification, OTP checks). - **Generated Code**: Adds new generated files for enums (`humangender_enumer.go`, `machinekeytype_enumer.go`, `passkeytype_enumer.go`, `personalaccesstokentype_enumer.go`, `userstate_enumer.go`, `usertype_enumer.go`) and mocks for the new repositories. - **Session Domain Refactoring**: Updates the session domain (`backend/v3/domain/session*.go`) to align with the new user model structure. This foundational work paves the way for migrating user management logic to the new `v3` backend, with a more maintainable and testable architecture. part of #10224 --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Marco A. <[email protected]>
This commit is contained in:
co-authored by
Copilot
Marco A.
parent
5beeb5738a
commit
f5ce288ea5
@@ -24,6 +24,7 @@ import (
|
||||
type MockInstanceRepository struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockInstanceRepositoryMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockInstanceRepositoryMockRecorder is the mock recorder for MockInstanceRepository.
|
||||
@@ -120,17 +121,17 @@ func (c *MockInstanceRepositoryConsoleClientIDColumnCall) DoAndReturn(f func() d
|
||||
}
|
||||
|
||||
// Create mocks base method.
|
||||
func (m *MockInstanceRepository) Create(arg0 context.Context, arg1 database.QueryExecutor, arg2 *domain.Instance) error {
|
||||
func (m *MockInstanceRepository) Create(ctx context.Context, client database.QueryExecutor, instance *domain.Instance) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Create", arg0, arg1, arg2)
|
||||
ret := m.ctrl.Call(m, "Create", ctx, client, instance)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Create indicates an expected call of Create.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) Create(arg0, arg1, arg2 any) *MockInstanceRepositoryCreateCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) Create(ctx, client, instance any) *MockInstanceRepositoryCreateCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInstanceRepository)(nil).Create), arg0, arg1, arg2)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInstanceRepository)(nil).Create), ctx, client, instance)
|
||||
return &MockInstanceRepositoryCreateCall{Call: call}
|
||||
}
|
||||
|
||||
@@ -272,18 +273,18 @@ func (c *MockInstanceRepositoryDefaultOrgIDColumnCall) DoAndReturn(f func() data
|
||||
}
|
||||
|
||||
// Delete mocks base method.
|
||||
func (m *MockInstanceRepository) Delete(arg0 context.Context, arg1 database.QueryExecutor, arg2 string) (int64, error) {
|
||||
func (m *MockInstanceRepository) Delete(ctx context.Context, client database.QueryExecutor, id string) (int64, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Delete", arg0, arg1, arg2)
|
||||
ret := m.ctrl.Call(m, "Delete", ctx, client, id)
|
||||
ret0, _ := ret[0].(int64)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Delete indicates an expected call of Delete.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) Delete(arg0, arg1, arg2 any) *MockInstanceRepositoryDeleteCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) Delete(ctx, client, id any) *MockInstanceRepositoryDeleteCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInstanceRepository)(nil).Delete), arg0, arg1, arg2)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInstanceRepository)(nil).Delete), ctx, client, id)
|
||||
return &MockInstanceRepositoryDeleteCall{Call: call}
|
||||
}
|
||||
|
||||
@@ -311,17 +312,17 @@ func (c *MockInstanceRepositoryDeleteCall) DoAndReturn(f func(context.Context, d
|
||||
}
|
||||
|
||||
// ExistsDomain mocks base method.
|
||||
func (m *MockInstanceRepository) ExistsDomain(arg0 database.Condition) database.Condition {
|
||||
func (m *MockInstanceRepository) ExistsDomain(cond database.Condition) database.Condition {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ExistsDomain", arg0)
|
||||
ret := m.ctrl.Call(m, "ExistsDomain", cond)
|
||||
ret0, _ := ret[0].(database.Condition)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// ExistsDomain indicates an expected call of ExistsDomain.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) ExistsDomain(arg0 any) *MockInstanceRepositoryExistsDomainCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) ExistsDomain(cond any) *MockInstanceRepositoryExistsDomainCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExistsDomain", reflect.TypeOf((*MockInstanceRepository)(nil).ExistsDomain), arg0)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExistsDomain", reflect.TypeOf((*MockInstanceRepository)(nil).ExistsDomain), cond)
|
||||
return &MockInstanceRepositoryExistsDomainCall{Call: call}
|
||||
}
|
||||
|
||||
@@ -349,10 +350,10 @@ func (c *MockInstanceRepositoryExistsDomainCall) DoAndReturn(f func(database.Con
|
||||
}
|
||||
|
||||
// Get mocks base method.
|
||||
func (m *MockInstanceRepository) Get(arg0 context.Context, arg1 database.QueryExecutor, arg2 ...database.QueryOption) (*domain.Instance, error) {
|
||||
func (m *MockInstanceRepository) Get(ctx context.Context, client database.QueryExecutor, opts ...database.QueryOption) (*domain.Instance, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs := []any{ctx, client}
|
||||
for _, a := range opts {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "Get", varargs...)
|
||||
@@ -362,9 +363,9 @@ func (m *MockInstanceRepository) Get(arg0 context.Context, arg1 database.QueryEx
|
||||
}
|
||||
|
||||
// Get indicates an expected call of Get.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockInstanceRepositoryGetCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) Get(ctx, client any, opts ...any) *MockInstanceRepositoryGetCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
varargs := append([]any{ctx, client}, opts...)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInstanceRepository)(nil).Get), varargs...)
|
||||
return &MockInstanceRepositoryGetCall{Call: call}
|
||||
}
|
||||
@@ -469,17 +470,17 @@ func (c *MockInstanceRepositoryIDColumnCall) DoAndReturn(f func() database.Colum
|
||||
}
|
||||
|
||||
// IDCondition mocks base method.
|
||||
func (m *MockInstanceRepository) IDCondition(arg0 string) database.Condition {
|
||||
func (m *MockInstanceRepository) IDCondition(instanceID string) database.Condition {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "IDCondition", arg0)
|
||||
ret := m.ctrl.Call(m, "IDCondition", instanceID)
|
||||
ret0, _ := ret[0].(database.Condition)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// IDCondition indicates an expected call of IDCondition.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) IDCondition(arg0 any) *MockInstanceRepositoryIDConditionCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) IDCondition(instanceID any) *MockInstanceRepositoryIDConditionCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IDCondition", reflect.TypeOf((*MockInstanceRepository)(nil).IDCondition), arg0)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IDCondition", reflect.TypeOf((*MockInstanceRepository)(nil).IDCondition), instanceID)
|
||||
return &MockInstanceRepositoryIDConditionCall{Call: call}
|
||||
}
|
||||
|
||||
@@ -507,10 +508,10 @@ func (c *MockInstanceRepositoryIDConditionCall) DoAndReturn(f func(string) datab
|
||||
}
|
||||
|
||||
// List mocks base method.
|
||||
func (m *MockInstanceRepository) List(arg0 context.Context, arg1 database.QueryExecutor, arg2 ...database.QueryOption) ([]*domain.Instance, error) {
|
||||
func (m *MockInstanceRepository) List(ctx context.Context, client database.QueryExecutor, opts ...database.QueryOption) ([]*domain.Instance, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs := []any{ctx, client}
|
||||
for _, a := range opts {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "List", varargs...)
|
||||
@@ -520,9 +521,9 @@ func (m *MockInstanceRepository) List(arg0 context.Context, arg1 database.QueryE
|
||||
}
|
||||
|
||||
// List indicates an expected call of List.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockInstanceRepositoryListCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) List(ctx, client any, opts ...any) *MockInstanceRepositoryListCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
varargs := append([]any{ctx, client}, opts...)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInstanceRepository)(nil).List), varargs...)
|
||||
return &MockInstanceRepositoryListCall{Call: call}
|
||||
}
|
||||
@@ -627,17 +628,17 @@ func (c *MockInstanceRepositoryNameColumnCall) DoAndReturn(f func() database.Col
|
||||
}
|
||||
|
||||
// NameCondition mocks base method.
|
||||
func (m *MockInstanceRepository) NameCondition(arg0 database.TextOperation, arg1 string) database.Condition {
|
||||
func (m *MockInstanceRepository) NameCondition(op database.TextOperation, name string) database.Condition {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "NameCondition", arg0, arg1)
|
||||
ret := m.ctrl.Call(m, "NameCondition", op, name)
|
||||
ret0, _ := ret[0].(database.Condition)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// NameCondition indicates an expected call of NameCondition.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) NameCondition(arg0, arg1 any) *MockInstanceRepositoryNameConditionCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) NameCondition(op, name any) *MockInstanceRepositoryNameConditionCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NameCondition", reflect.TypeOf((*MockInstanceRepository)(nil).NameCondition), arg0, arg1)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NameCondition", reflect.TypeOf((*MockInstanceRepository)(nil).NameCondition), op, name)
|
||||
return &MockInstanceRepositoryNameConditionCall{Call: call}
|
||||
}
|
||||
|
||||
@@ -703,17 +704,17 @@ func (c *MockInstanceRepositoryPrimaryKeyColumnsCall) DoAndReturn(f func() []dat
|
||||
}
|
||||
|
||||
// PrimaryKeyCondition mocks base method.
|
||||
func (m *MockInstanceRepository) PrimaryKeyCondition(arg0 string) database.Condition {
|
||||
func (m *MockInstanceRepository) PrimaryKeyCondition(instanceID string) database.Condition {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "PrimaryKeyCondition", arg0)
|
||||
ret := m.ctrl.Call(m, "PrimaryKeyCondition", instanceID)
|
||||
ret0, _ := ret[0].(database.Condition)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// PrimaryKeyCondition indicates an expected call of PrimaryKeyCondition.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) PrimaryKeyCondition(arg0 any) *MockInstanceRepositoryPrimaryKeyConditionCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) PrimaryKeyCondition(instanceID any) *MockInstanceRepositoryPrimaryKeyConditionCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrimaryKeyCondition", reflect.TypeOf((*MockInstanceRepository)(nil).PrimaryKeyCondition), arg0)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrimaryKeyCondition", reflect.TypeOf((*MockInstanceRepository)(nil).PrimaryKeyCondition), instanceID)
|
||||
return &MockInstanceRepositoryPrimaryKeyConditionCall{Call: call}
|
||||
}
|
||||
|
||||
@@ -741,17 +742,17 @@ func (c *MockInstanceRepositoryPrimaryKeyConditionCall) DoAndReturn(f func(strin
|
||||
}
|
||||
|
||||
// SetConsoleAppID mocks base method.
|
||||
func (m *MockInstanceRepository) SetConsoleAppID(arg0 string) database.Change {
|
||||
func (m *MockInstanceRepository) SetConsoleAppID(id string) database.Change {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetConsoleAppID", arg0)
|
||||
ret := m.ctrl.Call(m, "SetConsoleAppID", id)
|
||||
ret0, _ := ret[0].(database.Change)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SetConsoleAppID indicates an expected call of SetConsoleAppID.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) SetConsoleAppID(arg0 any) *MockInstanceRepositorySetConsoleAppIDCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) SetConsoleAppID(id any) *MockInstanceRepositorySetConsoleAppIDCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConsoleAppID", reflect.TypeOf((*MockInstanceRepository)(nil).SetConsoleAppID), arg0)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConsoleAppID", reflect.TypeOf((*MockInstanceRepository)(nil).SetConsoleAppID), id)
|
||||
return &MockInstanceRepositorySetConsoleAppIDCall{Call: call}
|
||||
}
|
||||
|
||||
@@ -779,17 +780,17 @@ func (c *MockInstanceRepositorySetConsoleAppIDCall) DoAndReturn(f func(string) d
|
||||
}
|
||||
|
||||
// SetConsoleClientID mocks base method.
|
||||
func (m *MockInstanceRepository) SetConsoleClientID(arg0 string) database.Change {
|
||||
func (m *MockInstanceRepository) SetConsoleClientID(id string) database.Change {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetConsoleClientID", arg0)
|
||||
ret := m.ctrl.Call(m, "SetConsoleClientID", id)
|
||||
ret0, _ := ret[0].(database.Change)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SetConsoleClientID indicates an expected call of SetConsoleClientID.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) SetConsoleClientID(arg0 any) *MockInstanceRepositorySetConsoleClientIDCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) SetConsoleClientID(id any) *MockInstanceRepositorySetConsoleClientIDCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConsoleClientID", reflect.TypeOf((*MockInstanceRepository)(nil).SetConsoleClientID), arg0)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConsoleClientID", reflect.TypeOf((*MockInstanceRepository)(nil).SetConsoleClientID), id)
|
||||
return &MockInstanceRepositorySetConsoleClientIDCall{Call: call}
|
||||
}
|
||||
|
||||
@@ -855,17 +856,17 @@ func (c *MockInstanceRepositorySetDefaultLanguageCall) DoAndReturn(f func(langua
|
||||
}
|
||||
|
||||
// SetDefaultOrg mocks base method.
|
||||
func (m *MockInstanceRepository) SetDefaultOrg(arg0 string) database.Change {
|
||||
func (m *MockInstanceRepository) SetDefaultOrg(id string) database.Change {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetDefaultOrg", arg0)
|
||||
ret := m.ctrl.Call(m, "SetDefaultOrg", id)
|
||||
ret0, _ := ret[0].(database.Change)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SetDefaultOrg indicates an expected call of SetDefaultOrg.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) SetDefaultOrg(arg0 any) *MockInstanceRepositorySetDefaultOrgCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) SetDefaultOrg(id any) *MockInstanceRepositorySetDefaultOrgCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDefaultOrg", reflect.TypeOf((*MockInstanceRepository)(nil).SetDefaultOrg), arg0)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDefaultOrg", reflect.TypeOf((*MockInstanceRepository)(nil).SetDefaultOrg), id)
|
||||
return &MockInstanceRepositorySetDefaultOrgCall{Call: call}
|
||||
}
|
||||
|
||||
@@ -893,17 +894,17 @@ func (c *MockInstanceRepositorySetDefaultOrgCall) DoAndReturn(f func(string) dat
|
||||
}
|
||||
|
||||
// SetIAMProject mocks base method.
|
||||
func (m *MockInstanceRepository) SetIAMProject(arg0 string) database.Change {
|
||||
func (m *MockInstanceRepository) SetIAMProject(id string) database.Change {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetIAMProject", arg0)
|
||||
ret := m.ctrl.Call(m, "SetIAMProject", id)
|
||||
ret0, _ := ret[0].(database.Change)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SetIAMProject indicates an expected call of SetIAMProject.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) SetIAMProject(arg0 any) *MockInstanceRepositorySetIAMProjectCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) SetIAMProject(id any) *MockInstanceRepositorySetIAMProjectCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIAMProject", reflect.TypeOf((*MockInstanceRepository)(nil).SetIAMProject), arg0)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIAMProject", reflect.TypeOf((*MockInstanceRepository)(nil).SetIAMProject), id)
|
||||
return &MockInstanceRepositorySetIAMProjectCall{Call: call}
|
||||
}
|
||||
|
||||
@@ -931,17 +932,17 @@ func (c *MockInstanceRepositorySetIAMProjectCall) DoAndReturn(f func(string) dat
|
||||
}
|
||||
|
||||
// SetName mocks base method.
|
||||
func (m *MockInstanceRepository) SetName(arg0 string) database.Change {
|
||||
func (m *MockInstanceRepository) SetName(name string) database.Change {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetName", arg0)
|
||||
ret := m.ctrl.Call(m, "SetName", name)
|
||||
ret0, _ := ret[0].(database.Change)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SetName indicates an expected call of SetName.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) SetName(arg0 any) *MockInstanceRepositorySetNameCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) SetName(name any) *MockInstanceRepositorySetNameCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetName", reflect.TypeOf((*MockInstanceRepository)(nil).SetName), arg0)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetName", reflect.TypeOf((*MockInstanceRepository)(nil).SetName), name)
|
||||
return &MockInstanceRepositorySetNameCall{Call: call}
|
||||
}
|
||||
|
||||
@@ -1007,10 +1008,10 @@ func (c *MockInstanceRepositorySetUpdatedAtCall) DoAndReturn(f func(time.Time) d
|
||||
}
|
||||
|
||||
// Update mocks base method.
|
||||
func (m *MockInstanceRepository) Update(arg0 context.Context, arg1 database.QueryExecutor, arg2 string, arg3 ...database.Change) (int64, error) {
|
||||
func (m *MockInstanceRepository) Update(ctx context.Context, client database.QueryExecutor, id string, changes ...database.Change) (int64, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{arg0, arg1, arg2}
|
||||
for _, a := range arg3 {
|
||||
varargs := []any{ctx, client, id}
|
||||
for _, a := range changes {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "Update", varargs...)
|
||||
@@ -1020,9 +1021,9 @@ func (m *MockInstanceRepository) Update(arg0 context.Context, arg1 database.Quer
|
||||
}
|
||||
|
||||
// Update indicates an expected call of Update.
|
||||
func (mr *MockInstanceRepositoryMockRecorder) Update(arg0, arg1, arg2 any, arg3 ...any) *MockInstanceRepositoryUpdateCall {
|
||||
func (mr *MockInstanceRepositoryMockRecorder) Update(ctx, client, id any, changes ...any) *MockInstanceRepositoryUpdateCall {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
||||
varargs := append([]any{ctx, client, id}, changes...)
|
||||
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInstanceRepository)(nil).Update), varargs...)
|
||||
return &MockInstanceRepositoryUpdateCall{Call: call}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user