mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-23 13:30:14 -05:00
147 lines
3.1 KiB
Go
147 lines
3.1 KiB
Go
// Code generated by mockery v2.14.1. 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
|
|
}
|
|
|
|
// Delete provides a mock function with given fields: id
|
|
func (_m *Engine) Delete(id string) error {
|
|
ret := _m.Called(id)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// DocCount provides a mock function with given fields:
|
|
func (_m *Engine) DocCount() (uint64, error) {
|
|
ret := _m.Called()
|
|
|
|
var r0 uint64
|
|
if rf, ok := ret.Get(0).(func() uint64); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(uint64)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// 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)
|
|
|
|
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
|
|
}
|
|
|
|
// Purge provides a mock function with given fields: id
|
|
func (_m *Engine) Purge(id string) error {
|
|
ret := _m.Called(id)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Restore provides a mock function with given fields: id
|
|
func (_m *Engine) Restore(id string) error {
|
|
ret := _m.Called(id)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// 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)
|
|
|
|
var r0 *v0.SearchIndexResponse
|
|
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)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
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
|
|
}
|
|
|
|
// 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)
|
|
|
|
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
|
|
}
|
|
|
|
type mockConstructorTestingTNewEngine interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// 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.
|
|
func NewEngine(t mockConstructorTestingTNewEngine) *Engine {
|
|
mock := &Engine{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|