mocks

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	mock.Mock
}

Store is an autogenerated mock type for the Store type

func NewStore

func NewStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *Store

NewStore creates a new instance of Store. 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 (*Store) EXPECT

func (_m *Store) EXPECT() *Store_Expecter

func (*Store) EnsureIndex

func (_m *Store) EnsureIndex(ctx context.Context, dimension int) error

EnsureIndex provides a mock function with given fields: ctx, dimension

func (*Store) GetExact added in v0.2.4

func (_m *Store) GetExact(ctx context.Context, ruleID string, key string) (string, bool, error)

GetExact provides a mock function with given fields: ctx, ruleID, key

func (*Store) Lookup

func (_m *Store) Lookup(ctx context.Context, ruleID string, emb *embedding.Embedding, topK int) ([]semantic.Candidate, error)

Lookup provides a mock function with given fields: ctx, ruleID, emb, topK

func (*Store) PutExact added in v0.2.4

func (_m *Store) PutExact(ctx context.Context, ruleID string, key string, response string, ttl time.Duration) error

PutExact provides a mock function with given fields: ctx, ruleID, key, response, ttl

func (*Store) Store

func (_m *Store) Store(ctx context.Context, entry semantic.Entry) error

Store provides a mock function with given fields: ctx, entry

type Store_EnsureIndex_Call

type Store_EnsureIndex_Call struct {
	*mock.Call
}

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

func (*Store_EnsureIndex_Call) Return

func (*Store_EnsureIndex_Call) Run

func (_c *Store_EnsureIndex_Call) Run(run func(ctx context.Context, dimension int)) *Store_EnsureIndex_Call

func (*Store_EnsureIndex_Call) RunAndReturn

func (_c *Store_EnsureIndex_Call) RunAndReturn(run func(context.Context, int) error) *Store_EnsureIndex_Call

type Store_Expecter

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

func (*Store_Expecter) EnsureIndex

func (_e *Store_Expecter) EnsureIndex(ctx interface{}, dimension interface{}) *Store_EnsureIndex_Call

EnsureIndex is a helper method to define mock.On call

  • ctx context.Context
  • dimension int

func (*Store_Expecter) GetExact added in v0.2.4

func (_e *Store_Expecter) GetExact(ctx interface{}, ruleID interface{}, key interface{}) *Store_GetExact_Call

GetExact is a helper method to define mock.On call

  • ctx context.Context
  • ruleID string
  • key string

func (*Store_Expecter) Lookup

func (_e *Store_Expecter) Lookup(ctx interface{}, ruleID interface{}, emb interface{}, topK interface{}) *Store_Lookup_Call

Lookup is a helper method to define mock.On call

  • ctx context.Context
  • ruleID string
  • emb *embedding.Embedding
  • topK int

func (*Store_Expecter) PutExact added in v0.2.4

func (_e *Store_Expecter) PutExact(ctx interface{}, ruleID interface{}, key interface{}, response interface{}, ttl interface{}) *Store_PutExact_Call

PutExact is a helper method to define mock.On call

  • ctx context.Context
  • ruleID string
  • key string
  • response string
  • ttl time.Duration

func (*Store_Expecter) Store

func (_e *Store_Expecter) Store(ctx interface{}, entry interface{}) *Store_Store_Call

Store is a helper method to define mock.On call

  • ctx context.Context
  • entry semantic.Entry

type Store_GetExact_Call added in v0.2.4

type Store_GetExact_Call struct {
	*mock.Call
}

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

func (*Store_GetExact_Call) Return added in v0.2.4

func (_c *Store_GetExact_Call) Return(_a0 string, _a1 bool, _a2 error) *Store_GetExact_Call

func (*Store_GetExact_Call) Run added in v0.2.4

func (_c *Store_GetExact_Call) Run(run func(ctx context.Context, ruleID string, key string)) *Store_GetExact_Call

func (*Store_GetExact_Call) RunAndReturn added in v0.2.4

type Store_Lookup_Call

type Store_Lookup_Call struct {
	*mock.Call
}

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

func (*Store_Lookup_Call) Return

func (*Store_Lookup_Call) Run

func (_c *Store_Lookup_Call) Run(run func(ctx context.Context, ruleID string, emb *embedding.Embedding, topK int)) *Store_Lookup_Call

func (*Store_Lookup_Call) RunAndReturn

type Store_PutExact_Call added in v0.2.4

type Store_PutExact_Call struct {
	*mock.Call
}

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

func (*Store_PutExact_Call) Return added in v0.2.4

func (*Store_PutExact_Call) Run added in v0.2.4

func (_c *Store_PutExact_Call) Run(run func(ctx context.Context, ruleID string, key string, response string, ttl time.Duration)) *Store_PutExact_Call

func (*Store_PutExact_Call) RunAndReturn added in v0.2.4

type Store_Store_Call

type Store_Store_Call struct {
	*mock.Call
}

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

func (*Store_Store_Call) Return

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

func (*Store_Store_Call) Run

func (_c *Store_Store_Call) Run(run func(ctx context.Context, entry semantic.Entry)) *Store_Store_Call

func (*Store_Store_Call) RunAndReturn

func (_c *Store_Store_Call) RunAndReturn(run func(context.Context, semantic.Entry) error) *Store_Store_Call

Jump to

Keyboard shortcuts

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