Files
ocis/services/search/pkg/engine/mocks/Engine.go
T
Florian Schade 2da5274570 [full-ci] Search content extraction (#4305)
* introduce content package for resource content extractions
restructure search service to be able to handle different search engine providers
add config option for async file uploads, content extraction type and search engine

* document exported package members
fix tika extractor meta extraction to handle nil maps and unknown values
add generic method to get and cast search result hit fields
simplify event logging
2022-08-04 14:07:55 +02:00

147 lines
3.0 KiB
Go

// Code generated by mockery v2.14.0. 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, target
func (_m *Engine) Move(id string, target string) error {
ret := _m.Called(id, target)
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(id, 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
}