203 lines
7.2 KiB
Go
203 lines
7.2 KiB
Go
|
// Code generated by MockGen. DO NOT EDIT.
|
||
|
// Source: git.sch9.ru/new_gate/ms-auth/internal/users (interfaces: UseCase)
|
||
|
//
|
||
|
// Generated by this command:
|
||
|
//
|
||
|
// mockgen . UseCase
|
||
|
//
|
||
|
|
||
|
// Package mock_users is a generated GoMock package.
|
||
|
package mock_users
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
reflect "reflect"
|
||
|
|
||
|
models "git.sch9.ru/new_gate/ms-auth/internal/models"
|
||
|
gomock "go.uber.org/mock/gomock"
|
||
|
)
|
||
|
|
||
|
// MockUseCase is a mock of UseCase interface.
|
||
|
type MockUseCase struct {
|
||
|
ctrl *gomock.Controller
|
||
|
recorder *MockUseCaseMockRecorder
|
||
|
isgomock struct{}
|
||
|
}
|
||
|
|
||
|
// MockUseCaseMockRecorder is the mock recorder for MockUseCase.
|
||
|
type MockUseCaseMockRecorder struct {
|
||
|
mock *MockUseCase
|
||
|
}
|
||
|
|
||
|
// NewMockUseCase creates a new mock instance.
|
||
|
func NewMockUseCase(ctrl *gomock.Controller) *MockUseCase {
|
||
|
mock := &MockUseCase{ctrl: ctrl}
|
||
|
mock.recorder = &MockUseCaseMockRecorder{mock}
|
||
|
return mock
|
||
|
}
|
||
|
|
||
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
||
|
func (m *MockUseCase) EXPECT() *MockUseCaseMockRecorder {
|
||
|
return m.recorder
|
||
|
}
|
||
|
|
||
|
// CreateSession mocks base method.
|
||
|
func (m *MockUseCase) CreateSession(ctx context.Context, userId int32, role models.Role) (string, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "CreateSession", ctx, userId, role)
|
||
|
ret0, _ := ret[0].(string)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// CreateSession indicates an expected call of CreateSession.
|
||
|
func (mr *MockUseCaseMockRecorder) CreateSession(ctx, userId, role any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSession", reflect.TypeOf((*MockUseCase)(nil).CreateSession), ctx, userId, role)
|
||
|
}
|
||
|
|
||
|
// CreateUser mocks base method.
|
||
|
func (m *MockUseCase) CreateUser(ctx context.Context, username, password string, role models.Role) (int32, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "CreateUser", ctx, username, password, role)
|
||
|
ret0, _ := ret[0].(int32)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// CreateUser indicates an expected call of CreateUser.
|
||
|
func (mr *MockUseCaseMockRecorder) CreateUser(ctx, username, password, role any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUser", reflect.TypeOf((*MockUseCase)(nil).CreateUser), ctx, username, password, role)
|
||
|
}
|
||
|
|
||
|
// DeleteAllSessions mocks base method.
|
||
|
func (m *MockUseCase) DeleteAllSessions(ctx context.Context, userId int32) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "DeleteAllSessions", ctx, userId)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// DeleteAllSessions indicates an expected call of DeleteAllSessions.
|
||
|
func (mr *MockUseCaseMockRecorder) DeleteAllSessions(ctx, userId any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAllSessions", reflect.TypeOf((*MockUseCase)(nil).DeleteAllSessions), ctx, userId)
|
||
|
}
|
||
|
|
||
|
// DeleteSession mocks base method.
|
||
|
func (m *MockUseCase) DeleteSession(ctx context.Context, sessionId string) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "DeleteSession", ctx, sessionId)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// DeleteSession indicates an expected call of DeleteSession.
|
||
|
func (mr *MockUseCaseMockRecorder) DeleteSession(ctx, sessionId any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSession", reflect.TypeOf((*MockUseCase)(nil).DeleteSession), ctx, sessionId)
|
||
|
}
|
||
|
|
||
|
// DeleteUser mocks base method.
|
||
|
func (m *MockUseCase) DeleteUser(ctx context.Context, id int32) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "DeleteUser", ctx, id)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// DeleteUser indicates an expected call of DeleteUser.
|
||
|
func (mr *MockUseCaseMockRecorder) DeleteUser(ctx, id any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUser", reflect.TypeOf((*MockUseCase)(nil).DeleteUser), ctx, id)
|
||
|
}
|
||
|
|
||
|
// ReadSession mocks base method.
|
||
|
func (m *MockUseCase) ReadSession(ctx context.Context, sessionId string) (*models.Session, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "ReadSession", ctx, sessionId)
|
||
|
ret0, _ := ret[0].(*models.Session)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// ReadSession indicates an expected call of ReadSession.
|
||
|
func (mr *MockUseCaseMockRecorder) ReadSession(ctx, sessionId any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadSession", reflect.TypeOf((*MockUseCase)(nil).ReadSession), ctx, sessionId)
|
||
|
}
|
||
|
|
||
|
// ReadUserById mocks base method.
|
||
|
func (m *MockUseCase) ReadUserById(ctx context.Context, id int32) (*models.User, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "ReadUserById", ctx, id)
|
||
|
ret0, _ := ret[0].(*models.User)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// ReadUserById indicates an expected call of ReadUserById.
|
||
|
func (mr *MockUseCaseMockRecorder) ReadUserById(ctx, id any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserById", reflect.TypeOf((*MockUseCase)(nil).ReadUserById), ctx, id)
|
||
|
}
|
||
|
|
||
|
// ReadUserByUsername mocks base method.
|
||
|
func (m *MockUseCase) ReadUserByUsername(ctx context.Context, username string) (*models.User, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "ReadUserByUsername", ctx, username)
|
||
|
ret0, _ := ret[0].(*models.User)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// ReadUserByUsername indicates an expected call of ReadUserByUsername.
|
||
|
func (mr *MockUseCaseMockRecorder) ReadUserByUsername(ctx, username any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserByUsername", reflect.TypeOf((*MockUseCase)(nil).ReadUserByUsername), ctx, username)
|
||
|
}
|
||
|
|
||
|
// UpdateSession mocks base method.
|
||
|
func (m *MockUseCase) UpdateSession(ctx context.Context, sessionId string) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "UpdateSession", ctx, sessionId)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// UpdateSession indicates an expected call of UpdateSession.
|
||
|
func (mr *MockUseCaseMockRecorder) UpdateSession(ctx, sessionId any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSession", reflect.TypeOf((*MockUseCase)(nil).UpdateSession), ctx, sessionId)
|
||
|
}
|
||
|
|
||
|
// UpdateUser mocks base method.
|
||
|
func (m *MockUseCase) UpdateUser(ctx context.Context, id int32, username *string, role *models.Role) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "UpdateUser", ctx, id, username, role)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// UpdateUser indicates an expected call of UpdateUser.
|
||
|
func (mr *MockUseCaseMockRecorder) UpdateUser(ctx, id, username, role any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUser", reflect.TypeOf((*MockUseCase)(nil).UpdateUser), ctx, id, username, role)
|
||
|
}
|
||
|
|
||
|
// Verify mocks base method.
|
||
|
func (m *MockUseCase) Verify(ctx context.Context, sessionId string) (string, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "Verify", ctx, sessionId)
|
||
|
ret0, _ := ret[0].(string)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// Verify indicates an expected call of Verify.
|
||
|
func (mr *MockUseCaseMockRecorder) Verify(ctx, sessionId any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockUseCase)(nil).Verify), ctx, sessionId)
|
||
|
}
|