mocks

package
v1.1.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	mock.Mock
}

Engine is an autogenerated mock type for the Engine type

func NewEngine

func NewEngine(t interface {
	mock.TestingT
	Cleanup(func())
}) *Engine

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 (*Engine) Delete

func (_m *Engine) Delete(id string) error

Delete provides a mock function with given fields: id

func (*Engine) DocCount

func (_m *Engine) DocCount() (uint64, error)

DocCount provides a mock function with no fields

func (*Engine) EXPECT

func (_m *Engine) EXPECT() *Engine_Expecter

func (*Engine) Move

func (_m *Engine) Move(id string, parentid string, target string) error

Move provides a mock function with given fields: id, parentid, target

func (*Engine) Purge

func (_m *Engine) Purge(id string) error

Purge provides a mock function with given fields: id

func (*Engine) Restore

func (_m *Engine) Restore(id string) error

Restore provides a mock function with given fields: id

func (*Engine) Search

Search provides a mock function with given fields: ctx, req

func (*Engine) Upsert

func (_m *Engine) Upsert(id string, r engine.Resource) error

Upsert provides a mock function with given fields: id, r

type Engine_Delete_Call

type Engine_Delete_Call struct {
	*mock.Call
}

Engine_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'

func (*Engine_Delete_Call) Return

func (_c *Engine_Delete_Call) Return(_a0 error) *Engine_Delete_Call

func (*Engine_Delete_Call) Run

func (_c *Engine_Delete_Call) Run(run func(id string)) *Engine_Delete_Call

func (*Engine_Delete_Call) RunAndReturn

func (_c *Engine_Delete_Call) RunAndReturn(run func(string) error) *Engine_Delete_Call

type Engine_DocCount_Call

type Engine_DocCount_Call struct {
	*mock.Call
}

Engine_DocCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DocCount'

func (*Engine_DocCount_Call) Return

func (_c *Engine_DocCount_Call) Return(_a0 uint64, _a1 error) *Engine_DocCount_Call

func (*Engine_DocCount_Call) Run

func (_c *Engine_DocCount_Call) Run(run func()) *Engine_DocCount_Call

func (*Engine_DocCount_Call) RunAndReturn

func (_c *Engine_DocCount_Call) RunAndReturn(run func() (uint64, error)) *Engine_DocCount_Call

type Engine_Expecter

type Engine_Expecter struct {
	// contains filtered or unexported fields
}

func (*Engine_Expecter) Delete

func (_e *Engine_Expecter) Delete(id interface{}) *Engine_Delete_Call

Delete is a helper method to define mock.On call

  • id string

func (*Engine_Expecter) DocCount

func (_e *Engine_Expecter) DocCount() *Engine_DocCount_Call

DocCount is a helper method to define mock.On call

func (*Engine_Expecter) Move

func (_e *Engine_Expecter) Move(id interface{}, parentid interface{}, target interface{}) *Engine_Move_Call

Move is a helper method to define mock.On call

  • id string
  • parentid string
  • target string

func (*Engine_Expecter) Purge

func (_e *Engine_Expecter) Purge(id interface{}) *Engine_Purge_Call

Purge is a helper method to define mock.On call

  • id string

func (*Engine_Expecter) Restore

func (_e *Engine_Expecter) Restore(id interface{}) *Engine_Restore_Call

Restore is a helper method to define mock.On call

  • id string

func (*Engine_Expecter) Search

func (_e *Engine_Expecter) Search(ctx interface{}, req interface{}) *Engine_Search_Call

Search is a helper method to define mock.On call

  • ctx context.Context
  • req *v0.SearchIndexRequest

func (*Engine_Expecter) Upsert

func (_e *Engine_Expecter) Upsert(id interface{}, r interface{}) *Engine_Upsert_Call

Upsert is a helper method to define mock.On call

  • id string
  • r engine.Resource

type Engine_Move_Call

type Engine_Move_Call struct {
	*mock.Call
}

Engine_Move_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Move'

func (*Engine_Move_Call) Return

func (_c *Engine_Move_Call) Return(_a0 error) *Engine_Move_Call

func (*Engine_Move_Call) Run

func (_c *Engine_Move_Call) Run(run func(id string, parentid string, target string)) *Engine_Move_Call

func (*Engine_Move_Call) RunAndReturn

func (_c *Engine_Move_Call) RunAndReturn(run func(string, string, string) error) *Engine_Move_Call

type Engine_Purge_Call

type Engine_Purge_Call struct {
	*mock.Call
}

Engine_Purge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Purge'

func (*Engine_Purge_Call) Return

func (_c *Engine_Purge_Call) Return(_a0 error) *Engine_Purge_Call

func (*Engine_Purge_Call) Run

func (_c *Engine_Purge_Call) Run(run func(id string)) *Engine_Purge_Call

func (*Engine_Purge_Call) RunAndReturn

func (_c *Engine_Purge_Call) RunAndReturn(run func(string) error) *Engine_Purge_Call

type Engine_Restore_Call

type Engine_Restore_Call struct {
	*mock.Call
}

Engine_Restore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restore'

func (*Engine_Restore_Call) Return

func (*Engine_Restore_Call) Run

func (_c *Engine_Restore_Call) Run(run func(id string)) *Engine_Restore_Call

func (*Engine_Restore_Call) RunAndReturn

func (_c *Engine_Restore_Call) RunAndReturn(run func(string) error) *Engine_Restore_Call

type Engine_Search_Call

type Engine_Search_Call struct {
	*mock.Call
}

Engine_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'

func (*Engine_Search_Call) Return

func (*Engine_Search_Call) Run

func (*Engine_Search_Call) RunAndReturn

type Engine_Upsert_Call

type Engine_Upsert_Call struct {
	*mock.Call
}

Engine_Upsert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upsert'

func (*Engine_Upsert_Call) Return

func (_c *Engine_Upsert_Call) Return(_a0 error) *Engine_Upsert_Call

func (*Engine_Upsert_Call) Run

func (_c *Engine_Upsert_Call) Run(run func(id string, r engine.Resource)) *Engine_Upsert_Call

func (*Engine_Upsert_Call) RunAndReturn

func (_c *Engine_Upsert_Call) RunAndReturn(run func(string, engine.Resource) error) *Engine_Upsert_Call

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL