1
0
mirror of https://github.com/owncloud/ocis.git synced 2025-04-18 23:44:07 +03:00
Julian Koberg 0c0c8c5ca3 fix(ocis): update mockery to 2.52.3
Signed-off-by: Julian Koberg <jkoberg@MBP-Julian-Koberg.local>
2025-02-26 15:51:04 +01:00

387 lines
9.6 KiB
Go

// Code generated by mockery v2.52.3. DO NOT EDIT.
package mocks
import (
context "context"
engine "github.com/owncloud/ocis/v2/services/search/pkg/engine"
mock "github.com/stretchr/testify/mock"
v0 "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/search/v0"
)
// Engine is an autogenerated mock type for the Engine type
type Engine struct {
mock.Mock
}
type Engine_Expecter struct {
mock *mock.Mock
}
func (_m *Engine) EXPECT() *Engine_Expecter {
return &Engine_Expecter{mock: &_m.Mock}
}
// Delete provides a mock function with given fields: id
func (_m *Engine) Delete(id string) error {
ret := _m.Called(id)
if len(ret) == 0 {
panic("no return value specified for Delete")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(id)
} else {
r0 = ret.Error(0)
}
return r0
}
// Engine_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
type Engine_Delete_Call struct {
*mock.Call
}
// Delete is a helper method to define mock.On call
// - id string
func (_e *Engine_Expecter) Delete(id interface{}) *Engine_Delete_Call {
return &Engine_Delete_Call{Call: _e.mock.On("Delete", id)}
}
func (_c *Engine_Delete_Call) Run(run func(id string)) *Engine_Delete_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *Engine_Delete_Call) Return(_a0 error) *Engine_Delete_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Engine_Delete_Call) RunAndReturn(run func(string) error) *Engine_Delete_Call {
_c.Call.Return(run)
return _c
}
// DocCount provides a mock function with no fields
func (_m *Engine) DocCount() (uint64, error) {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for DocCount")
}
var r0 uint64
var r1 error
if rf, ok := ret.Get(0).(func() (uint64, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() uint64); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(uint64)
}
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Engine_DocCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DocCount'
type Engine_DocCount_Call struct {
*mock.Call
}
// DocCount is a helper method to define mock.On call
func (_e *Engine_Expecter) DocCount() *Engine_DocCount_Call {
return &Engine_DocCount_Call{Call: _e.mock.On("DocCount")}
}
func (_c *Engine_DocCount_Call) Run(run func()) *Engine_DocCount_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *Engine_DocCount_Call) Return(_a0 uint64, _a1 error) *Engine_DocCount_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *Engine_DocCount_Call) RunAndReturn(run func() (uint64, error)) *Engine_DocCount_Call {
_c.Call.Return(run)
return _c
}
// Move provides a mock function with given fields: id, parentid, target
func (_m *Engine) Move(id string, parentid string, target string) error {
ret := _m.Called(id, parentid, target)
if len(ret) == 0 {
panic("no return value specified for Move")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
r0 = rf(id, parentid, target)
} else {
r0 = ret.Error(0)
}
return r0
}
// Engine_Move_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Move'
type Engine_Move_Call struct {
*mock.Call
}
// Move is a helper method to define mock.On call
// - id string
// - parentid string
// - target string
func (_e *Engine_Expecter) Move(id interface{}, parentid interface{}, target interface{}) *Engine_Move_Call {
return &Engine_Move_Call{Call: _e.mock.On("Move", id, parentid, target)}
}
func (_c *Engine_Move_Call) Run(run func(id string, parentid string, target string)) *Engine_Move_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string), args[2].(string))
})
return _c
}
func (_c *Engine_Move_Call) Return(_a0 error) *Engine_Move_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Engine_Move_Call) RunAndReturn(run func(string, string, string) error) *Engine_Move_Call {
_c.Call.Return(run)
return _c
}
// Purge provides a mock function with given fields: id
func (_m *Engine) Purge(id string) error {
ret := _m.Called(id)
if len(ret) == 0 {
panic("no return value specified for Purge")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(id)
} else {
r0 = ret.Error(0)
}
return r0
}
// Engine_Purge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Purge'
type Engine_Purge_Call struct {
*mock.Call
}
// Purge is a helper method to define mock.On call
// - id string
func (_e *Engine_Expecter) Purge(id interface{}) *Engine_Purge_Call {
return &Engine_Purge_Call{Call: _e.mock.On("Purge", id)}
}
func (_c *Engine_Purge_Call) Run(run func(id string)) *Engine_Purge_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *Engine_Purge_Call) Return(_a0 error) *Engine_Purge_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Engine_Purge_Call) RunAndReturn(run func(string) error) *Engine_Purge_Call {
_c.Call.Return(run)
return _c
}
// Restore provides a mock function with given fields: id
func (_m *Engine) Restore(id string) error {
ret := _m.Called(id)
if len(ret) == 0 {
panic("no return value specified for Restore")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(id)
} else {
r0 = ret.Error(0)
}
return r0
}
// Engine_Restore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restore'
type Engine_Restore_Call struct {
*mock.Call
}
// Restore is a helper method to define mock.On call
// - id string
func (_e *Engine_Expecter) Restore(id interface{}) *Engine_Restore_Call {
return &Engine_Restore_Call{Call: _e.mock.On("Restore", id)}
}
func (_c *Engine_Restore_Call) Run(run func(id string)) *Engine_Restore_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *Engine_Restore_Call) Return(_a0 error) *Engine_Restore_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Engine_Restore_Call) RunAndReturn(run func(string) error) *Engine_Restore_Call {
_c.Call.Return(run)
return _c
}
// Search provides a mock function with given fields: ctx, req
func (_m *Engine) Search(ctx context.Context, req *v0.SearchIndexRequest) (*v0.SearchIndexResponse, error) {
ret := _m.Called(ctx, req)
if len(ret) == 0 {
panic("no return value specified for Search")
}
var r0 *v0.SearchIndexResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *v0.SearchIndexRequest) (*v0.SearchIndexResponse, error)); ok {
return rf(ctx, req)
}
if rf, ok := ret.Get(0).(func(context.Context, *v0.SearchIndexRequest) *v0.SearchIndexResponse); ok {
r0 = rf(ctx, req)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v0.SearchIndexResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *v0.SearchIndexRequest) error); ok {
r1 = rf(ctx, req)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Engine_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
type Engine_Search_Call struct {
*mock.Call
}
// Search is a helper method to define mock.On call
// - ctx context.Context
// - req *v0.SearchIndexRequest
func (_e *Engine_Expecter) Search(ctx interface{}, req interface{}) *Engine_Search_Call {
return &Engine_Search_Call{Call: _e.mock.On("Search", ctx, req)}
}
func (_c *Engine_Search_Call) Run(run func(ctx context.Context, req *v0.SearchIndexRequest)) *Engine_Search_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*v0.SearchIndexRequest))
})
return _c
}
func (_c *Engine_Search_Call) Return(_a0 *v0.SearchIndexResponse, _a1 error) *Engine_Search_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *Engine_Search_Call) RunAndReturn(run func(context.Context, *v0.SearchIndexRequest) (*v0.SearchIndexResponse, error)) *Engine_Search_Call {
_c.Call.Return(run)
return _c
}
// Upsert provides a mock function with given fields: id, r
func (_m *Engine) Upsert(id string, r engine.Resource) error {
ret := _m.Called(id, r)
if len(ret) == 0 {
panic("no return value specified for Upsert")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, engine.Resource) error); ok {
r0 = rf(id, r)
} else {
r0 = ret.Error(0)
}
return r0
}
// Engine_Upsert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upsert'
type Engine_Upsert_Call struct {
*mock.Call
}
// Upsert is a helper method to define mock.On call
// - id string
// - r engine.Resource
func (_e *Engine_Expecter) Upsert(id interface{}, r interface{}) *Engine_Upsert_Call {
return &Engine_Upsert_Call{Call: _e.mock.On("Upsert", id, r)}
}
func (_c *Engine_Upsert_Call) Run(run func(id string, r engine.Resource)) *Engine_Upsert_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(engine.Resource))
})
return _c
}
func (_c *Engine_Upsert_Call) Return(_a0 error) *Engine_Upsert_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Engine_Upsert_Call) RunAndReturn(run func(string, engine.Resource) error) *Engine_Upsert_Call {
_c.Call.Return(run)
return _c
}
// NewEngine creates a new instance of Engine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewEngine(t interface {
mock.TestingT
Cleanup(func())
}) *Engine {
mock := &Engine{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}