Files
zitadel/backend/v3/domain/mock/machine_user.mock.go
T
f5ce288ea5 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]>
2025-11-25 11:54:32 +01:00

1157 lines
44 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/zitadel/zitadel/backend/v3/domain (interfaces: MachineUserRepository)
//
// Generated by this command:
//
// mockgen -typed -package domainmock -destination ./mock/machine_user.mock.go . MachineUserRepository
//
// Package domainmock is a generated GoMock package.
package domainmock
import (
context "context"
reflect "reflect"
time "time"
domain "github.com/zitadel/zitadel/backend/v3/domain"
database "github.com/zitadel/zitadel/backend/v3/storage/database"
gomock "go.uber.org/mock/gomock"
)
// MockMachineUserRepository is a mock of MachineUserRepository interface.
type MockMachineUserRepository struct {
ctrl *gomock.Controller
recorder *MockMachineUserRepositoryMockRecorder
isgomock struct{}
}
// MockMachineUserRepositoryMockRecorder is the mock recorder for MockMachineUserRepository.
type MockMachineUserRepositoryMockRecorder struct {
mock *MockMachineUserRepository
}
// NewMockMachineUserRepository creates a new mock instance.
func NewMockMachineUserRepository(ctrl *gomock.Controller) *MockMachineUserRepository {
mock := &MockMachineUserRepository{ctrl: ctrl}
mock.recorder = &MockMachineUserRepositoryMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockMachineUserRepository) EXPECT() *MockMachineUserRepositoryMockRecorder {
return m.recorder
}
// AddKey mocks base method.
func (m *MockMachineUserRepository) AddKey(key *domain.MachineKey) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddKey", key)
ret0, _ := ret[0].(database.Change)
return ret0
}
// AddKey indicates an expected call of AddKey.
func (mr *MockMachineUserRepositoryMockRecorder) AddKey(key any) *MockMachineUserRepositoryAddKeyCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddKey", reflect.TypeOf((*MockMachineUserRepository)(nil).AddKey), key)
return &MockMachineUserRepositoryAddKeyCall{Call: call}
}
// MockMachineUserRepositoryAddKeyCall wrap *gomock.Call
type MockMachineUserRepositoryAddKeyCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryAddKeyCall) Return(arg0 database.Change) *MockMachineUserRepositoryAddKeyCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryAddKeyCall) Do(f func(*domain.MachineKey) database.Change) *MockMachineUserRepositoryAddKeyCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryAddKeyCall) DoAndReturn(f func(*domain.MachineKey) database.Change) *MockMachineUserRepositoryAddKeyCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// AddMetadata mocks base method.
func (m *MockMachineUserRepository) AddMetadata(metadata ...*domain.Metadata) database.Change {
m.ctrl.T.Helper()
varargs := []any{}
for _, a := range metadata {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "AddMetadata", varargs...)
ret0, _ := ret[0].(database.Change)
return ret0
}
// AddMetadata indicates an expected call of AddMetadata.
func (mr *MockMachineUserRepositoryMockRecorder) AddMetadata(metadata ...any) *MockMachineUserRepositoryAddMetadataCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMetadata", reflect.TypeOf((*MockMachineUserRepository)(nil).AddMetadata), metadata...)
return &MockMachineUserRepositoryAddMetadataCall{Call: call}
}
// MockMachineUserRepositoryAddMetadataCall wrap *gomock.Call
type MockMachineUserRepositoryAddMetadataCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryAddMetadataCall) Return(arg0 database.Change) *MockMachineUserRepositoryAddMetadataCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryAddMetadataCall) Do(f func(...*domain.Metadata) database.Change) *MockMachineUserRepositoryAddMetadataCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryAddMetadataCall) DoAndReturn(f func(...*domain.Metadata) database.Change) *MockMachineUserRepositoryAddMetadataCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// AddPersonalAccessToken mocks base method.
func (m *MockMachineUserRepository) AddPersonalAccessToken(pat *domain.PersonalAccessToken) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddPersonalAccessToken", pat)
ret0, _ := ret[0].(database.Change)
return ret0
}
// AddPersonalAccessToken indicates an expected call of AddPersonalAccessToken.
func (mr *MockMachineUserRepositoryMockRecorder) AddPersonalAccessToken(pat any) *MockMachineUserRepositoryAddPersonalAccessTokenCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPersonalAccessToken", reflect.TypeOf((*MockMachineUserRepository)(nil).AddPersonalAccessToken), pat)
return &MockMachineUserRepositoryAddPersonalAccessTokenCall{Call: call}
}
// MockMachineUserRepositoryAddPersonalAccessTokenCall wrap *gomock.Call
type MockMachineUserRepositoryAddPersonalAccessTokenCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryAddPersonalAccessTokenCall) Return(arg0 database.Change) *MockMachineUserRepositoryAddPersonalAccessTokenCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryAddPersonalAccessTokenCall) Do(f func(*domain.PersonalAccessToken) database.Change) *MockMachineUserRepositoryAddPersonalAccessTokenCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryAddPersonalAccessTokenCall) DoAndReturn(f func(*domain.PersonalAccessToken) database.Change) *MockMachineUserRepositoryAddPersonalAccessTokenCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// CreatedAtColumn mocks base method.
func (m *MockMachineUserRepository) CreatedAtColumn() database.Column {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreatedAtColumn")
ret0, _ := ret[0].(database.Column)
return ret0
}
// CreatedAtColumn indicates an expected call of CreatedAtColumn.
func (mr *MockMachineUserRepositoryMockRecorder) CreatedAtColumn() *MockMachineUserRepositoryCreatedAtColumnCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatedAtColumn", reflect.TypeOf((*MockMachineUserRepository)(nil).CreatedAtColumn))
return &MockMachineUserRepositoryCreatedAtColumnCall{Call: call}
}
// MockMachineUserRepositoryCreatedAtColumnCall wrap *gomock.Call
type MockMachineUserRepositoryCreatedAtColumnCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryCreatedAtColumnCall) Return(arg0 database.Column) *MockMachineUserRepositoryCreatedAtColumnCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryCreatedAtColumnCall) Do(f func() database.Column) *MockMachineUserRepositoryCreatedAtColumnCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryCreatedAtColumnCall) DoAndReturn(f func() database.Column) *MockMachineUserRepositoryCreatedAtColumnCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// ExistsMetadata mocks base method.
func (m *MockMachineUserRepository) ExistsMetadata(condition database.Condition) database.Condition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ExistsMetadata", condition)
ret0, _ := ret[0].(database.Condition)
return ret0
}
// ExistsMetadata indicates an expected call of ExistsMetadata.
func (mr *MockMachineUserRepositoryMockRecorder) ExistsMetadata(condition any) *MockMachineUserRepositoryExistsMetadataCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExistsMetadata", reflect.TypeOf((*MockMachineUserRepository)(nil).ExistsMetadata), condition)
return &MockMachineUserRepositoryExistsMetadataCall{Call: call}
}
// MockMachineUserRepositoryExistsMetadataCall wrap *gomock.Call
type MockMachineUserRepositoryExistsMetadataCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryExistsMetadataCall) Return(arg0 database.Condition) *MockMachineUserRepositoryExistsMetadataCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryExistsMetadataCall) Do(f func(database.Condition) database.Condition) *MockMachineUserRepositoryExistsMetadataCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryExistsMetadataCall) DoAndReturn(f func(database.Condition) database.Condition) *MockMachineUserRepositoryExistsMetadataCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// IDCondition mocks base method.
func (m *MockMachineUserRepository) IDCondition(userID string) database.Condition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IDCondition", userID)
ret0, _ := ret[0].(database.Condition)
return ret0
}
// IDCondition indicates an expected call of IDCondition.
func (mr *MockMachineUserRepositoryMockRecorder) IDCondition(userID any) *MockMachineUserRepositoryIDConditionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IDCondition", reflect.TypeOf((*MockMachineUserRepository)(nil).IDCondition), userID)
return &MockMachineUserRepositoryIDConditionCall{Call: call}
}
// MockMachineUserRepositoryIDConditionCall wrap *gomock.Call
type MockMachineUserRepositoryIDConditionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryIDConditionCall) Return(arg0 database.Condition) *MockMachineUserRepositoryIDConditionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryIDConditionCall) Do(f func(string) database.Condition) *MockMachineUserRepositoryIDConditionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryIDConditionCall) DoAndReturn(f func(string) database.Condition) *MockMachineUserRepositoryIDConditionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// InstanceIDCondition mocks base method.
func (m *MockMachineUserRepository) InstanceIDCondition(instanceID string) database.Condition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "InstanceIDCondition", instanceID)
ret0, _ := ret[0].(database.Condition)
return ret0
}
// InstanceIDCondition indicates an expected call of InstanceIDCondition.
func (mr *MockMachineUserRepositoryMockRecorder) InstanceIDCondition(instanceID any) *MockMachineUserRepositoryInstanceIDConditionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceIDCondition", reflect.TypeOf((*MockMachineUserRepository)(nil).InstanceIDCondition), instanceID)
return &MockMachineUserRepositoryInstanceIDConditionCall{Call: call}
}
// MockMachineUserRepositoryInstanceIDConditionCall wrap *gomock.Call
type MockMachineUserRepositoryInstanceIDConditionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryInstanceIDConditionCall) Return(arg0 database.Condition) *MockMachineUserRepositoryInstanceIDConditionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryInstanceIDConditionCall) Do(f func(string) database.Condition) *MockMachineUserRepositoryInstanceIDConditionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryInstanceIDConditionCall) DoAndReturn(f func(string) database.Condition) *MockMachineUserRepositoryInstanceIDConditionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// LoginNameCondition mocks base method.
func (m *MockMachineUserRepository) LoginNameCondition(op database.TextOperation, loginName string) database.Condition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LoginNameCondition", op, loginName)
ret0, _ := ret[0].(database.Condition)
return ret0
}
// LoginNameCondition indicates an expected call of LoginNameCondition.
func (mr *MockMachineUserRepositoryMockRecorder) LoginNameCondition(op, loginName any) *MockMachineUserRepositoryLoginNameConditionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoginNameCondition", reflect.TypeOf((*MockMachineUserRepository)(nil).LoginNameCondition), op, loginName)
return &MockMachineUserRepositoryLoginNameConditionCall{Call: call}
}
// MockMachineUserRepositoryLoginNameConditionCall wrap *gomock.Call
type MockMachineUserRepositoryLoginNameConditionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryLoginNameConditionCall) Return(arg0 database.Condition) *MockMachineUserRepositoryLoginNameConditionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryLoginNameConditionCall) Do(f func(database.TextOperation, string) database.Condition) *MockMachineUserRepositoryLoginNameConditionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryLoginNameConditionCall) DoAndReturn(f func(database.TextOperation, string) database.Condition) *MockMachineUserRepositoryLoginNameConditionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MetadataKeyCondition mocks base method.
func (m *MockMachineUserRepository) MetadataKeyCondition(key string) database.Condition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MetadataKeyCondition", key)
ret0, _ := ret[0].(database.Condition)
return ret0
}
// MetadataKeyCondition indicates an expected call of MetadataKeyCondition.
func (mr *MockMachineUserRepositoryMockRecorder) MetadataKeyCondition(key any) *MockMachineUserRepositoryMetadataKeyConditionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetadataKeyCondition", reflect.TypeOf((*MockMachineUserRepository)(nil).MetadataKeyCondition), key)
return &MockMachineUserRepositoryMetadataKeyConditionCall{Call: call}
}
// MockMachineUserRepositoryMetadataKeyConditionCall wrap *gomock.Call
type MockMachineUserRepositoryMetadataKeyConditionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryMetadataKeyConditionCall) Return(arg0 database.Condition) *MockMachineUserRepositoryMetadataKeyConditionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryMetadataKeyConditionCall) Do(f func(string) database.Condition) *MockMachineUserRepositoryMetadataKeyConditionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryMetadataKeyConditionCall) DoAndReturn(f func(string) database.Condition) *MockMachineUserRepositoryMetadataKeyConditionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MetadataValueCondition mocks base method.
func (m *MockMachineUserRepository) MetadataValueCondition(op database.BytesOperation, value []byte) database.Condition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MetadataValueCondition", op, value)
ret0, _ := ret[0].(database.Condition)
return ret0
}
// MetadataValueCondition indicates an expected call of MetadataValueCondition.
func (mr *MockMachineUserRepositoryMockRecorder) MetadataValueCondition(op, value any) *MockMachineUserRepositoryMetadataValueConditionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetadataValueCondition", reflect.TypeOf((*MockMachineUserRepository)(nil).MetadataValueCondition), op, value)
return &MockMachineUserRepositoryMetadataValueConditionCall{Call: call}
}
// MockMachineUserRepositoryMetadataValueConditionCall wrap *gomock.Call
type MockMachineUserRepositoryMetadataValueConditionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryMetadataValueConditionCall) Return(arg0 database.Condition) *MockMachineUserRepositoryMetadataValueConditionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryMetadataValueConditionCall) Do(f func(database.BytesOperation, []byte) database.Condition) *MockMachineUserRepositoryMetadataValueConditionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryMetadataValueConditionCall) DoAndReturn(f func(database.BytesOperation, []byte) database.Condition) *MockMachineUserRepositoryMetadataValueConditionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// OrgIDCondition mocks base method.
func (m *MockMachineUserRepository) OrgIDCondition(orgID string) database.Condition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OrgIDCondition", orgID)
ret0, _ := ret[0].(database.Condition)
return ret0
}
// OrgIDCondition indicates an expected call of OrgIDCondition.
func (mr *MockMachineUserRepositoryMockRecorder) OrgIDCondition(orgID any) *MockMachineUserRepositoryOrgIDConditionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OrgIDCondition", reflect.TypeOf((*MockMachineUserRepository)(nil).OrgIDCondition), orgID)
return &MockMachineUserRepositoryOrgIDConditionCall{Call: call}
}
// MockMachineUserRepositoryOrgIDConditionCall wrap *gomock.Call
type MockMachineUserRepositoryOrgIDConditionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryOrgIDConditionCall) Return(arg0 database.Condition) *MockMachineUserRepositoryOrgIDConditionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryOrgIDConditionCall) Do(f func(string) database.Condition) *MockMachineUserRepositoryOrgIDConditionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryOrgIDConditionCall) DoAndReturn(f func(string) database.Condition) *MockMachineUserRepositoryOrgIDConditionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// PrimaryKeyColumns mocks base method.
func (m *MockMachineUserRepository) PrimaryKeyColumns() []database.Column {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PrimaryKeyColumns")
ret0, _ := ret[0].([]database.Column)
return ret0
}
// PrimaryKeyColumns indicates an expected call of PrimaryKeyColumns.
func (mr *MockMachineUserRepositoryMockRecorder) PrimaryKeyColumns() *MockMachineUserRepositoryPrimaryKeyColumnsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrimaryKeyColumns", reflect.TypeOf((*MockMachineUserRepository)(nil).PrimaryKeyColumns))
return &MockMachineUserRepositoryPrimaryKeyColumnsCall{Call: call}
}
// MockMachineUserRepositoryPrimaryKeyColumnsCall wrap *gomock.Call
type MockMachineUserRepositoryPrimaryKeyColumnsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryPrimaryKeyColumnsCall) Return(arg0 []database.Column) *MockMachineUserRepositoryPrimaryKeyColumnsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryPrimaryKeyColumnsCall) Do(f func() []database.Column) *MockMachineUserRepositoryPrimaryKeyColumnsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryPrimaryKeyColumnsCall) DoAndReturn(f func() []database.Column) *MockMachineUserRepositoryPrimaryKeyColumnsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// PrimaryKeyCondition mocks base method.
func (m *MockMachineUserRepository) PrimaryKeyCondition(instanceID, userID string) database.Condition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PrimaryKeyCondition", instanceID, userID)
ret0, _ := ret[0].(database.Condition)
return ret0
}
// PrimaryKeyCondition indicates an expected call of PrimaryKeyCondition.
func (mr *MockMachineUserRepositoryMockRecorder) PrimaryKeyCondition(instanceID, userID any) *MockMachineUserRepositoryPrimaryKeyConditionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrimaryKeyCondition", reflect.TypeOf((*MockMachineUserRepository)(nil).PrimaryKeyCondition), instanceID, userID)
return &MockMachineUserRepositoryPrimaryKeyConditionCall{Call: call}
}
// MockMachineUserRepositoryPrimaryKeyConditionCall wrap *gomock.Call
type MockMachineUserRepositoryPrimaryKeyConditionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryPrimaryKeyConditionCall) Return(arg0 database.Condition) *MockMachineUserRepositoryPrimaryKeyConditionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryPrimaryKeyConditionCall) Do(f func(string, string) database.Condition) *MockMachineUserRepositoryPrimaryKeyConditionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryPrimaryKeyConditionCall) DoAndReturn(f func(string, string) database.Condition) *MockMachineUserRepositoryPrimaryKeyConditionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// RemoveKey mocks base method.
func (m *MockMachineUserRepository) RemoveKey(id string) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RemoveKey", id)
ret0, _ := ret[0].(database.Change)
return ret0
}
// RemoveKey indicates an expected call of RemoveKey.
func (mr *MockMachineUserRepositoryMockRecorder) RemoveKey(id any) *MockMachineUserRepositoryRemoveKeyCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveKey", reflect.TypeOf((*MockMachineUserRepository)(nil).RemoveKey), id)
return &MockMachineUserRepositoryRemoveKeyCall{Call: call}
}
// MockMachineUserRepositoryRemoveKeyCall wrap *gomock.Call
type MockMachineUserRepositoryRemoveKeyCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryRemoveKeyCall) Return(arg0 database.Change) *MockMachineUserRepositoryRemoveKeyCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryRemoveKeyCall) Do(f func(string) database.Change) *MockMachineUserRepositoryRemoveKeyCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryRemoveKeyCall) DoAndReturn(f func(string) database.Change) *MockMachineUserRepositoryRemoveKeyCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// RemoveMetadata mocks base method.
func (m *MockMachineUserRepository) RemoveMetadata(condition database.Condition) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RemoveMetadata", condition)
ret0, _ := ret[0].(database.Change)
return ret0
}
// RemoveMetadata indicates an expected call of RemoveMetadata.
func (mr *MockMachineUserRepositoryMockRecorder) RemoveMetadata(condition any) *MockMachineUserRepositoryRemoveMetadataCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveMetadata", reflect.TypeOf((*MockMachineUserRepository)(nil).RemoveMetadata), condition)
return &MockMachineUserRepositoryRemoveMetadataCall{Call: call}
}
// MockMachineUserRepositoryRemoveMetadataCall wrap *gomock.Call
type MockMachineUserRepositoryRemoveMetadataCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryRemoveMetadataCall) Return(arg0 database.Change) *MockMachineUserRepositoryRemoveMetadataCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryRemoveMetadataCall) Do(f func(database.Condition) database.Change) *MockMachineUserRepositoryRemoveMetadataCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryRemoveMetadataCall) DoAndReturn(f func(database.Condition) database.Change) *MockMachineUserRepositoryRemoveMetadataCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// RemovePersonalAccessToken mocks base method.
func (m *MockMachineUserRepository) RemovePersonalAccessToken(id string) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RemovePersonalAccessToken", id)
ret0, _ := ret[0].(database.Change)
return ret0
}
// RemovePersonalAccessToken indicates an expected call of RemovePersonalAccessToken.
func (mr *MockMachineUserRepositoryMockRecorder) RemovePersonalAccessToken(id any) *MockMachineUserRepositoryRemovePersonalAccessTokenCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePersonalAccessToken", reflect.TypeOf((*MockMachineUserRepository)(nil).RemovePersonalAccessToken), id)
return &MockMachineUserRepositoryRemovePersonalAccessTokenCall{Call: call}
}
// MockMachineUserRepositoryRemovePersonalAccessTokenCall wrap *gomock.Call
type MockMachineUserRepositoryRemovePersonalAccessTokenCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryRemovePersonalAccessTokenCall) Return(arg0 database.Change) *MockMachineUserRepositoryRemovePersonalAccessTokenCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryRemovePersonalAccessTokenCall) Do(f func(string) database.Change) *MockMachineUserRepositoryRemovePersonalAccessTokenCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryRemovePersonalAccessTokenCall) DoAndReturn(f func(string) database.Change) *MockMachineUserRepositoryRemovePersonalAccessTokenCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// SetAccessTokenType mocks base method.
func (m *MockMachineUserRepository) SetAccessTokenType(tokenType domain.PersonalAccessTokenType) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetAccessTokenType", tokenType)
ret0, _ := ret[0].(database.Change)
return ret0
}
// SetAccessTokenType indicates an expected call of SetAccessTokenType.
func (mr *MockMachineUserRepositoryMockRecorder) SetAccessTokenType(tokenType any) *MockMachineUserRepositorySetAccessTokenTypeCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccessTokenType", reflect.TypeOf((*MockMachineUserRepository)(nil).SetAccessTokenType), tokenType)
return &MockMachineUserRepositorySetAccessTokenTypeCall{Call: call}
}
// MockMachineUserRepositorySetAccessTokenTypeCall wrap *gomock.Call
type MockMachineUserRepositorySetAccessTokenTypeCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositorySetAccessTokenTypeCall) Return(arg0 database.Change) *MockMachineUserRepositorySetAccessTokenTypeCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositorySetAccessTokenTypeCall) Do(f func(domain.PersonalAccessTokenType) database.Change) *MockMachineUserRepositorySetAccessTokenTypeCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositorySetAccessTokenTypeCall) DoAndReturn(f func(domain.PersonalAccessTokenType) database.Change) *MockMachineUserRepositorySetAccessTokenTypeCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// SetDescription mocks base method.
func (m *MockMachineUserRepository) SetDescription(description string) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetDescription", description)
ret0, _ := ret[0].(database.Change)
return ret0
}
// SetDescription indicates an expected call of SetDescription.
func (mr *MockMachineUserRepositoryMockRecorder) SetDescription(description any) *MockMachineUserRepositorySetDescriptionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDescription", reflect.TypeOf((*MockMachineUserRepository)(nil).SetDescription), description)
return &MockMachineUserRepositorySetDescriptionCall{Call: call}
}
// MockMachineUserRepositorySetDescriptionCall wrap *gomock.Call
type MockMachineUserRepositorySetDescriptionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositorySetDescriptionCall) Return(arg0 database.Change) *MockMachineUserRepositorySetDescriptionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositorySetDescriptionCall) Do(f func(string) database.Change) *MockMachineUserRepositorySetDescriptionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositorySetDescriptionCall) DoAndReturn(f func(string) database.Change) *MockMachineUserRepositorySetDescriptionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// SetName mocks base method.
func (m *MockMachineUserRepository) SetName(name string) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetName", name)
ret0, _ := ret[0].(database.Change)
return ret0
}
// SetName indicates an expected call of SetName.
func (mr *MockMachineUserRepositoryMockRecorder) SetName(name any) *MockMachineUserRepositorySetNameCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetName", reflect.TypeOf((*MockMachineUserRepository)(nil).SetName), name)
return &MockMachineUserRepositorySetNameCall{Call: call}
}
// MockMachineUserRepositorySetNameCall wrap *gomock.Call
type MockMachineUserRepositorySetNameCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositorySetNameCall) Return(arg0 database.Change) *MockMachineUserRepositorySetNameCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositorySetNameCall) Do(f func(string) database.Change) *MockMachineUserRepositorySetNameCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositorySetNameCall) DoAndReturn(f func(string) database.Change) *MockMachineUserRepositorySetNameCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// SetSecret mocks base method.
func (m *MockMachineUserRepository) SetSecret(secret *string) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetSecret", secret)
ret0, _ := ret[0].(database.Change)
return ret0
}
// SetSecret indicates an expected call of SetSecret.
func (mr *MockMachineUserRepositoryMockRecorder) SetSecret(secret any) *MockMachineUserRepositorySetSecretCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSecret", reflect.TypeOf((*MockMachineUserRepository)(nil).SetSecret), secret)
return &MockMachineUserRepositorySetSecretCall{Call: call}
}
// MockMachineUserRepositorySetSecretCall wrap *gomock.Call
type MockMachineUserRepositorySetSecretCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositorySetSecretCall) Return(arg0 database.Change) *MockMachineUserRepositorySetSecretCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositorySetSecretCall) Do(f func(*string) database.Change) *MockMachineUserRepositorySetSecretCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositorySetSecretCall) DoAndReturn(f func(*string) database.Change) *MockMachineUserRepositorySetSecretCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// SetState mocks base method.
func (m *MockMachineUserRepository) SetState(state domain.UserState) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetState", state)
ret0, _ := ret[0].(database.Change)
return ret0
}
// SetState indicates an expected call of SetState.
func (mr *MockMachineUserRepositoryMockRecorder) SetState(state any) *MockMachineUserRepositorySetStateCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetState", reflect.TypeOf((*MockMachineUserRepository)(nil).SetState), state)
return &MockMachineUserRepositorySetStateCall{Call: call}
}
// MockMachineUserRepositorySetStateCall wrap *gomock.Call
type MockMachineUserRepositorySetStateCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositorySetStateCall) Return(arg0 database.Change) *MockMachineUserRepositorySetStateCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositorySetStateCall) Do(f func(domain.UserState) database.Change) *MockMachineUserRepositorySetStateCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositorySetStateCall) DoAndReturn(f func(domain.UserState) database.Change) *MockMachineUserRepositorySetStateCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// SetUpdatedAt mocks base method.
func (m *MockMachineUserRepository) SetUpdatedAt(updatedAt time.Time) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetUpdatedAt", updatedAt)
ret0, _ := ret[0].(database.Change)
return ret0
}
// SetUpdatedAt indicates an expected call of SetUpdatedAt.
func (mr *MockMachineUserRepositoryMockRecorder) SetUpdatedAt(updatedAt any) *MockMachineUserRepositorySetUpdatedAtCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpdatedAt", reflect.TypeOf((*MockMachineUserRepository)(nil).SetUpdatedAt), updatedAt)
return &MockMachineUserRepositorySetUpdatedAtCall{Call: call}
}
// MockMachineUserRepositorySetUpdatedAtCall wrap *gomock.Call
type MockMachineUserRepositorySetUpdatedAtCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositorySetUpdatedAtCall) Return(arg0 database.Change) *MockMachineUserRepositorySetUpdatedAtCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositorySetUpdatedAtCall) Do(f func(time.Time) database.Change) *MockMachineUserRepositorySetUpdatedAtCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositorySetUpdatedAtCall) DoAndReturn(f func(time.Time) database.Change) *MockMachineUserRepositorySetUpdatedAtCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// SetUsername mocks base method.
func (m *MockMachineUserRepository) SetUsername(username string) database.Change {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetUsername", username)
ret0, _ := ret[0].(database.Change)
return ret0
}
// SetUsername indicates an expected call of SetUsername.
func (mr *MockMachineUserRepositoryMockRecorder) SetUsername(username any) *MockMachineUserRepositorySetUsernameCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUsername", reflect.TypeOf((*MockMachineUserRepository)(nil).SetUsername), username)
return &MockMachineUserRepositorySetUsernameCall{Call: call}
}
// MockMachineUserRepositorySetUsernameCall wrap *gomock.Call
type MockMachineUserRepositorySetUsernameCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositorySetUsernameCall) Return(arg0 database.Change) *MockMachineUserRepositorySetUsernameCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositorySetUsernameCall) Do(f func(string) database.Change) *MockMachineUserRepositorySetUsernameCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositorySetUsernameCall) DoAndReturn(f func(string) database.Change) *MockMachineUserRepositorySetUsernameCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// StateColumn mocks base method.
func (m *MockMachineUserRepository) StateColumn() database.Column {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateColumn")
ret0, _ := ret[0].(database.Column)
return ret0
}
// StateColumn indicates an expected call of StateColumn.
func (mr *MockMachineUserRepositoryMockRecorder) StateColumn() *MockMachineUserRepositoryStateColumnCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateColumn", reflect.TypeOf((*MockMachineUserRepository)(nil).StateColumn))
return &MockMachineUserRepositoryStateColumnCall{Call: call}
}
// MockMachineUserRepositoryStateColumnCall wrap *gomock.Call
type MockMachineUserRepositoryStateColumnCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryStateColumnCall) Return(arg0 database.Column) *MockMachineUserRepositoryStateColumnCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryStateColumnCall) Do(f func() database.Column) *MockMachineUserRepositoryStateColumnCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryStateColumnCall) DoAndReturn(f func() database.Column) *MockMachineUserRepositoryStateColumnCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// StateCondition mocks base method.
func (m *MockMachineUserRepository) StateCondition(state domain.UserState) database.Condition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateCondition", state)
ret0, _ := ret[0].(database.Condition)
return ret0
}
// StateCondition indicates an expected call of StateCondition.
func (mr *MockMachineUserRepositoryMockRecorder) StateCondition(state any) *MockMachineUserRepositoryStateConditionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateCondition", reflect.TypeOf((*MockMachineUserRepository)(nil).StateCondition), state)
return &MockMachineUserRepositoryStateConditionCall{Call: call}
}
// MockMachineUserRepositoryStateConditionCall wrap *gomock.Call
type MockMachineUserRepositoryStateConditionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryStateConditionCall) Return(arg0 database.Condition) *MockMachineUserRepositoryStateConditionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryStateConditionCall) Do(f func(domain.UserState) database.Condition) *MockMachineUserRepositoryStateConditionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryStateConditionCall) DoAndReturn(f func(domain.UserState) database.Condition) *MockMachineUserRepositoryStateConditionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// TypeCondition mocks base method.
func (m *MockMachineUserRepository) TypeCondition(userType domain.UserType) database.Condition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "TypeCondition", userType)
ret0, _ := ret[0].(database.Condition)
return ret0
}
// TypeCondition indicates an expected call of TypeCondition.
func (mr *MockMachineUserRepositoryMockRecorder) TypeCondition(userType any) *MockMachineUserRepositoryTypeConditionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TypeCondition", reflect.TypeOf((*MockMachineUserRepository)(nil).TypeCondition), userType)
return &MockMachineUserRepositoryTypeConditionCall{Call: call}
}
// MockMachineUserRepositoryTypeConditionCall wrap *gomock.Call
type MockMachineUserRepositoryTypeConditionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryTypeConditionCall) Return(arg0 database.Condition) *MockMachineUserRepositoryTypeConditionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryTypeConditionCall) Do(f func(domain.UserType) database.Condition) *MockMachineUserRepositoryTypeConditionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryTypeConditionCall) DoAndReturn(f func(domain.UserType) database.Condition) *MockMachineUserRepositoryTypeConditionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Update mocks base method.
func (m *MockMachineUserRepository) Update(ctx context.Context, client database.QueryExecutor, condition database.Condition, changes ...database.Change) (int64, error) {
m.ctrl.T.Helper()
varargs := []any{ctx, client, condition}
for _, a := range changes {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Update", varargs...)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Update indicates an expected call of Update.
func (mr *MockMachineUserRepositoryMockRecorder) Update(ctx, client, condition any, changes ...any) *MockMachineUserRepositoryUpdateCall {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, client, condition}, changes...)
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockMachineUserRepository)(nil).Update), varargs...)
return &MockMachineUserRepositoryUpdateCall{Call: call}
}
// MockMachineUserRepositoryUpdateCall wrap *gomock.Call
type MockMachineUserRepositoryUpdateCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryUpdateCall) Return(arg0 int64, arg1 error) *MockMachineUserRepositoryUpdateCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryUpdateCall) Do(f func(context.Context, database.QueryExecutor, database.Condition, ...database.Change) (int64, error)) *MockMachineUserRepositoryUpdateCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryUpdateCall) DoAndReturn(f func(context.Context, database.QueryExecutor, database.Condition, ...database.Change) (int64, error)) *MockMachineUserRepositoryUpdateCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// UsernameColumn mocks base method.
func (m *MockMachineUserRepository) UsernameColumn() database.Column {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UsernameColumn")
ret0, _ := ret[0].(database.Column)
return ret0
}
// UsernameColumn indicates an expected call of UsernameColumn.
func (mr *MockMachineUserRepositoryMockRecorder) UsernameColumn() *MockMachineUserRepositoryUsernameColumnCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UsernameColumn", reflect.TypeOf((*MockMachineUserRepository)(nil).UsernameColumn))
return &MockMachineUserRepositoryUsernameColumnCall{Call: call}
}
// MockMachineUserRepositoryUsernameColumnCall wrap *gomock.Call
type MockMachineUserRepositoryUsernameColumnCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryUsernameColumnCall) Return(arg0 database.Column) *MockMachineUserRepositoryUsernameColumnCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryUsernameColumnCall) Do(f func() database.Column) *MockMachineUserRepositoryUsernameColumnCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryUsernameColumnCall) DoAndReturn(f func() database.Column) *MockMachineUserRepositoryUsernameColumnCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// UsernameCondition mocks base method.
func (m *MockMachineUserRepository) UsernameCondition(op database.TextOperation, username string) database.Condition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UsernameCondition", op, username)
ret0, _ := ret[0].(database.Condition)
return ret0
}
// UsernameCondition indicates an expected call of UsernameCondition.
func (mr *MockMachineUserRepositoryMockRecorder) UsernameCondition(op, username any) *MockMachineUserRepositoryUsernameConditionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UsernameCondition", reflect.TypeOf((*MockMachineUserRepository)(nil).UsernameCondition), op, username)
return &MockMachineUserRepositoryUsernameConditionCall{Call: call}
}
// MockMachineUserRepositoryUsernameConditionCall wrap *gomock.Call
type MockMachineUserRepositoryUsernameConditionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMachineUserRepositoryUsernameConditionCall) Return(arg0 database.Condition) *MockMachineUserRepositoryUsernameConditionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMachineUserRepositoryUsernameConditionCall) Do(f func(database.TextOperation, string) database.Condition) *MockMachineUserRepositoryUsernameConditionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMachineUserRepositoryUsernameConditionCall) DoAndReturn(f func(database.TextOperation, string) database.Condition) *MockMachineUserRepositoryUsernameConditionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}