mirror of
https://github.com/elyby/chrly.git
synced 2024-12-23 21:50:03 +05:30
f120064fe3
Added tests to jwt package Reworked redis backend implementation Skin repository now have methods to remove skins by user id or username
132 lines
4.7 KiB
Go
132 lines
4.7 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: interfaces/repositories.go
|
|
|
|
package mock_interfaces
|
|
|
|
import (
|
|
model "elyby/minecraft-skinsystem/model"
|
|
gomock "github.com/golang/mock/gomock"
|
|
reflect "reflect"
|
|
)
|
|
|
|
// MockSkinsRepository is a mock of SkinsRepository interface
|
|
type MockSkinsRepository struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockSkinsRepositoryMockRecorder
|
|
}
|
|
|
|
// MockSkinsRepositoryMockRecorder is the mock recorder for MockSkinsRepository
|
|
type MockSkinsRepositoryMockRecorder struct {
|
|
mock *MockSkinsRepository
|
|
}
|
|
|
|
// NewMockSkinsRepository creates a new mock instance
|
|
func NewMockSkinsRepository(ctrl *gomock.Controller) *MockSkinsRepository {
|
|
mock := &MockSkinsRepository{ctrl: ctrl}
|
|
mock.recorder = &MockSkinsRepositoryMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
func (_m *MockSkinsRepository) EXPECT() *MockSkinsRepositoryMockRecorder {
|
|
return _m.recorder
|
|
}
|
|
|
|
// FindByUsername mocks base method
|
|
func (_m *MockSkinsRepository) FindByUsername(username string) (*model.Skin, error) {
|
|
ret := _m.ctrl.Call(_m, "FindByUsername", username)
|
|
ret0, _ := ret[0].(*model.Skin)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// FindByUsername indicates an expected call of FindByUsername
|
|
func (_mr *MockSkinsRepositoryMockRecorder) FindByUsername(arg0 interface{}) *gomock.Call {
|
|
return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "FindByUsername", reflect.TypeOf((*MockSkinsRepository)(nil).FindByUsername), arg0)
|
|
}
|
|
|
|
// FindByUserId mocks base method
|
|
func (_m *MockSkinsRepository) FindByUserId(id int) (*model.Skin, error) {
|
|
ret := _m.ctrl.Call(_m, "FindByUserId", id)
|
|
ret0, _ := ret[0].(*model.Skin)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// FindByUserId indicates an expected call of FindByUserId
|
|
func (_mr *MockSkinsRepositoryMockRecorder) FindByUserId(arg0 interface{}) *gomock.Call {
|
|
return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "FindByUserId", reflect.TypeOf((*MockSkinsRepository)(nil).FindByUserId), arg0)
|
|
}
|
|
|
|
// Save mocks base method
|
|
func (_m *MockSkinsRepository) Save(skin *model.Skin) error {
|
|
ret := _m.ctrl.Call(_m, "Save", skin)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Save indicates an expected call of Save
|
|
func (_mr *MockSkinsRepositoryMockRecorder) Save(arg0 interface{}) *gomock.Call {
|
|
return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "Save", reflect.TypeOf((*MockSkinsRepository)(nil).Save), arg0)
|
|
}
|
|
|
|
// RemoveByUserId mocks base method
|
|
func (_m *MockSkinsRepository) RemoveByUserId(id int) error {
|
|
ret := _m.ctrl.Call(_m, "RemoveByUserId", id)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// RemoveByUserId indicates an expected call of RemoveByUserId
|
|
func (_mr *MockSkinsRepositoryMockRecorder) RemoveByUserId(arg0 interface{}) *gomock.Call {
|
|
return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "RemoveByUserId", reflect.TypeOf((*MockSkinsRepository)(nil).RemoveByUserId), arg0)
|
|
}
|
|
|
|
// RemoveByUsername mocks base method
|
|
func (_m *MockSkinsRepository) RemoveByUsername(username string) error {
|
|
ret := _m.ctrl.Call(_m, "RemoveByUsername", username)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// RemoveByUsername indicates an expected call of RemoveByUsername
|
|
func (_mr *MockSkinsRepositoryMockRecorder) RemoveByUsername(arg0 interface{}) *gomock.Call {
|
|
return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "RemoveByUsername", reflect.TypeOf((*MockSkinsRepository)(nil).RemoveByUsername), arg0)
|
|
}
|
|
|
|
// MockCapesRepository is a mock of CapesRepository interface
|
|
type MockCapesRepository struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockCapesRepositoryMockRecorder
|
|
}
|
|
|
|
// MockCapesRepositoryMockRecorder is the mock recorder for MockCapesRepository
|
|
type MockCapesRepositoryMockRecorder struct {
|
|
mock *MockCapesRepository
|
|
}
|
|
|
|
// NewMockCapesRepository creates a new mock instance
|
|
func NewMockCapesRepository(ctrl *gomock.Controller) *MockCapesRepository {
|
|
mock := &MockCapesRepository{ctrl: ctrl}
|
|
mock.recorder = &MockCapesRepositoryMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
func (_m *MockCapesRepository) EXPECT() *MockCapesRepositoryMockRecorder {
|
|
return _m.recorder
|
|
}
|
|
|
|
// FindByUsername mocks base method
|
|
func (_m *MockCapesRepository) FindByUsername(username string) (*model.Cape, error) {
|
|
ret := _m.ctrl.Call(_m, "FindByUsername", username)
|
|
ret0, _ := ret[0].(*model.Cape)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// FindByUsername indicates an expected call of FindByUsername
|
|
func (_mr *MockCapesRepositoryMockRecorder) FindByUsername(arg0 interface{}) *gomock.Call {
|
|
return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "FindByUsername", reflect.TypeOf((*MockCapesRepository)(nil).FindByUsername), arg0)
|
|
}
|