Documentation
¶
Index ¶
- type Store
- func (_m *Store) EXPECT() *Store_Expecter
- func (_m *Store) EnsureIndex(ctx context.Context, dimension int) error
- func (_m *Store) GetExact(ctx context.Context, ruleID string, key string) (string, bool, error)
- func (_m *Store) Lookup(ctx context.Context, ruleID string, emb *embedding.Embedding, topK int) ([]semantic.Candidate, error)
- func (_m *Store) PutExact(ctx context.Context, ruleID string, key string, response string, ...) error
- func (_m *Store) Store(ctx context.Context, entry semantic.Entry) error
- type Store_EnsureIndex_Call
- type Store_Expecter
- func (_e *Store_Expecter) EnsureIndex(ctx interface{}, dimension interface{}) *Store_EnsureIndex_Call
- func (_e *Store_Expecter) GetExact(ctx interface{}, ruleID interface{}, key interface{}) *Store_GetExact_Call
- func (_e *Store_Expecter) Lookup(ctx interface{}, ruleID interface{}, emb interface{}, topK interface{}) *Store_Lookup_Call
- func (_e *Store_Expecter) PutExact(ctx interface{}, ruleID interface{}, key interface{}, response interface{}, ...) *Store_PutExact_Call
- func (_e *Store_Expecter) Store(ctx interface{}, entry interface{}) *Store_Store_Call
- type Store_GetExact_Call
- func (_c *Store_GetExact_Call) Return(_a0 string, _a1 bool, _a2 error) *Store_GetExact_Call
- func (_c *Store_GetExact_Call) Run(run func(ctx context.Context, ruleID string, key string)) *Store_GetExact_Call
- func (_c *Store_GetExact_Call) RunAndReturn(run func(context.Context, string, string) (string, bool, error)) *Store_GetExact_Call
- type Store_Lookup_Call
- type Store_PutExact_Call
- func (_c *Store_PutExact_Call) Return(_a0 error) *Store_PutExact_Call
- func (_c *Store_PutExact_Call) Run(run func(ctx context.Context, ruleID string, key string, response string, ...)) *Store_PutExact_Call
- func (_c *Store_PutExact_Call) RunAndReturn(run func(context.Context, string, string, string, time.Duration) error) *Store_PutExact_Call
- type Store_Store_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
Store is an autogenerated mock type for the Store type
func NewStore ¶
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 ¶
EnsureIndex provides a mock function with given fields: ctx, dimension
func (*Store) GetExact ¶ added in v0.2.4
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
type Store_EnsureIndex_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 (_c *Store_EnsureIndex_Call) Return(_a0 error) *Store_EnsureIndex_Call
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
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
func (_c *Store_GetExact_Call) RunAndReturn(run func(context.Context, string, string) (string, bool, error)) *Store_GetExact_Call
type Store_Lookup_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 (_c *Store_Lookup_Call) Return(_a0 []semantic.Candidate, _a1 error) *Store_Lookup_Call
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
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 (_c *Store_PutExact_Call) Return(_a0 error) *Store_PutExact_Call
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
func (_c *Store_PutExact_Call) RunAndReturn(run func(context.Context, string, string, string, time.Duration) error) *Store_PutExact_Call
type Store_Store_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