Documentation
¶
Index ¶
- type Creator
- type Creator_Expecter
- type Creator_Generate_Call
- type Repository
- func (_m *Repository) Count(ctx context.Context, index string, keyQuery string) (int, error)
- func (_m *Repository) EXPECT() *Repository_Expecter
- func (_m *Repository) GetByTargetID(ctx context.Context, targetID string) (*embedding.Embedding, error)
- func (_m *Repository) Search(ctx context.Context, index string, query string, ...) ([]embedding.SearchResult, error)
- func (_m *Repository) Store(ctx context.Context, targetID string, embeddingData *embedding.Embedding, ...) error
- func (_m *Repository) StoreWithHMSet(ctx context.Context, index string, key string, gatewayID string, ...) error
- type Repository_Count_Call
- func (_c *Repository_Count_Call) Return(_a0 int, _a1 error) *Repository_Count_Call
- func (_c *Repository_Count_Call) Run(run func(ctx context.Context, index string, keyQuery string)) *Repository_Count_Call
- func (_c *Repository_Count_Call) RunAndReturn(run func(context.Context, string, string) (int, error)) *Repository_Count_Call
- type Repository_Expecter
- func (_e *Repository_Expecter) Count(ctx interface{}, index interface{}, keyQuery interface{}) *Repository_Count_Call
- func (_e *Repository_Expecter) GetByTargetID(ctx interface{}, targetID interface{}) *Repository_GetByTargetID_Call
- func (_e *Repository_Expecter) Search(ctx interface{}, index interface{}, query interface{}, ...) *Repository_Search_Call
- func (_e *Repository_Expecter) Store(ctx interface{}, targetID interface{}, embeddingData interface{}, ...) *Repository_Store_Call
- func (_e *Repository_Expecter) StoreWithHMSet(ctx interface{}, index interface{}, key interface{}, gatewayID interface{}, ...) *Repository_StoreWithHMSet_Call
- type Repository_GetByTargetID_Call
- func (_c *Repository_GetByTargetID_Call) Return(_a0 *embedding.Embedding, _a1 error) *Repository_GetByTargetID_Call
- func (_c *Repository_GetByTargetID_Call) Run(run func(ctx context.Context, targetID string)) *Repository_GetByTargetID_Call
- func (_c *Repository_GetByTargetID_Call) RunAndReturn(run func(context.Context, string) (*embedding.Embedding, error)) *Repository_GetByTargetID_Call
- type Repository_Search_Call
- func (_c *Repository_Search_Call) Return(_a0 []embedding.SearchResult, _a1 error) *Repository_Search_Call
- func (_c *Repository_Search_Call) Run(run func(ctx context.Context, index string, query string, ...)) *Repository_Search_Call
- func (_c *Repository_Search_Call) RunAndReturn(...) *Repository_Search_Call
- type Repository_StoreWithHMSet_Call
- func (_c *Repository_StoreWithHMSet_Call) Return(_a0 error) *Repository_StoreWithHMSet_Call
- func (_c *Repository_StoreWithHMSet_Call) Run(run func(ctx context.Context, index string, key string, gatewayID string, ...)) *Repository_StoreWithHMSet_Call
- func (_c *Repository_StoreWithHMSet_Call) RunAndReturn(...) *Repository_StoreWithHMSet_Call
- type Repository_Store_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Creator ¶
Creator is an autogenerated mock type for the Creator type
func NewCreator ¶
NewCreator creates a new instance of Creator. 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 (*Creator) EXPECT ¶
func (_m *Creator) EXPECT() *Creator_Expecter
type Creator_Expecter ¶
type Creator_Expecter struct {
// contains filtered or unexported fields
}
func (*Creator_Expecter) Generate ¶
func (_e *Creator_Expecter) Generate(ctx interface{}, text interface{}, model interface{}, cfg interface{}) *Creator_Generate_Call
Generate is a helper method to define mock.On call
- ctx context.Context
- text string
- model string
- cfg *embedding.Config
type Creator_Generate_Call ¶
Creator_Generate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Generate'
func (*Creator_Generate_Call) Return ¶
func (_c *Creator_Generate_Call) Return(_a0 *embedding.Embedding, _a1 error) *Creator_Generate_Call
func (*Creator_Generate_Call) Run ¶
func (_c *Creator_Generate_Call) Run(run func(ctx context.Context, text string, model string, cfg *embedding.Config)) *Creator_Generate_Call
func (*Creator_Generate_Call) RunAndReturn ¶
type Repository ¶
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶
func NewRepository(t interface {
mock.TestingT
Cleanup(func())
}) *Repository
NewRepository creates a new instance of Repository. 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 (*Repository) EXPECT ¶
func (_m *Repository) EXPECT() *Repository_Expecter
func (*Repository) GetByTargetID ¶
func (_m *Repository) GetByTargetID(ctx context.Context, targetID string) (*embedding.Embedding, error)
GetByTargetID provides a mock function with given fields: ctx, targetID
func (*Repository) Search ¶
func (_m *Repository) Search(ctx context.Context, index string, query string, embeddingData *embedding.Embedding) ([]embedding.SearchResult, error)
Search provides a mock function with given fields: ctx, index, query, embeddingData
type Repository_Count_Call ¶
Repository_Count_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Count'
func (*Repository_Count_Call) Return ¶
func (_c *Repository_Count_Call) Return(_a0 int, _a1 error) *Repository_Count_Call
func (*Repository_Count_Call) Run ¶
func (_c *Repository_Count_Call) Run(run func(ctx context.Context, index string, keyQuery string)) *Repository_Count_Call
func (*Repository_Count_Call) RunAndReturn ¶
func (_c *Repository_Count_Call) RunAndReturn(run func(context.Context, string, string) (int, error)) *Repository_Count_Call
type Repository_Expecter ¶
type Repository_Expecter struct {
// contains filtered or unexported fields
}
func (*Repository_Expecter) Count ¶
func (_e *Repository_Expecter) Count(ctx interface{}, index interface{}, keyQuery interface{}) *Repository_Count_Call
Count is a helper method to define mock.On call
- ctx context.Context
- index string
- keyQuery string
func (*Repository_Expecter) GetByTargetID ¶
func (_e *Repository_Expecter) GetByTargetID(ctx interface{}, targetID interface{}) *Repository_GetByTargetID_Call
GetByTargetID is a helper method to define mock.On call
- ctx context.Context
- targetID string
func (*Repository_Expecter) Search ¶
func (_e *Repository_Expecter) Search(ctx interface{}, index interface{}, query interface{}, embeddingData interface{}) *Repository_Search_Call
Search is a helper method to define mock.On call
- ctx context.Context
- index string
- query string
- embeddingData *embedding.Embedding
func (*Repository_Expecter) Store ¶
func (_e *Repository_Expecter) Store(ctx interface{}, targetID interface{}, embeddingData interface{}, key interface{}) *Repository_Store_Call
Store is a helper method to define mock.On call
- ctx context.Context
- targetID string
- embeddingData *embedding.Embedding
- key string
func (*Repository_Expecter) StoreWithHMSet ¶
func (_e *Repository_Expecter) StoreWithHMSet(ctx interface{}, index interface{}, key interface{}, gatewayID interface{}, embeddingData interface{}, data interface{}) *Repository_StoreWithHMSet_Call
StoreWithHMSet is a helper method to define mock.On call
- ctx context.Context
- index string
- key string
- gatewayID string
- embeddingData *embedding.Embedding
- data []byte
type Repository_GetByTargetID_Call ¶
Repository_GetByTargetID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByTargetID'
func (*Repository_GetByTargetID_Call) Return ¶
func (_c *Repository_GetByTargetID_Call) Return(_a0 *embedding.Embedding, _a1 error) *Repository_GetByTargetID_Call
func (*Repository_GetByTargetID_Call) Run ¶
func (_c *Repository_GetByTargetID_Call) Run(run func(ctx context.Context, targetID string)) *Repository_GetByTargetID_Call
func (*Repository_GetByTargetID_Call) RunAndReturn ¶
func (_c *Repository_GetByTargetID_Call) RunAndReturn(run func(context.Context, string) (*embedding.Embedding, error)) *Repository_GetByTargetID_Call
type Repository_Search_Call ¶
Repository_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
func (*Repository_Search_Call) Return ¶
func (_c *Repository_Search_Call) Return(_a0 []embedding.SearchResult, _a1 error) *Repository_Search_Call
func (*Repository_Search_Call) Run ¶
func (_c *Repository_Search_Call) Run(run func(ctx context.Context, index string, query string, embeddingData *embedding.Embedding)) *Repository_Search_Call
func (*Repository_Search_Call) RunAndReturn ¶
func (_c *Repository_Search_Call) RunAndReturn(run func(context.Context, string, string, *embedding.Embedding) ([]embedding.SearchResult, error)) *Repository_Search_Call
type Repository_StoreWithHMSet_Call ¶
Repository_StoreWithHMSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoreWithHMSet'
func (*Repository_StoreWithHMSet_Call) Return ¶
func (_c *Repository_StoreWithHMSet_Call) Return(_a0 error) *Repository_StoreWithHMSet_Call
func (*Repository_StoreWithHMSet_Call) Run ¶
func (_c *Repository_StoreWithHMSet_Call) Run(run func(ctx context.Context, index string, key string, gatewayID string, embeddingData *embedding.Embedding, data []byte)) *Repository_StoreWithHMSet_Call
func (*Repository_StoreWithHMSet_Call) RunAndReturn ¶
type Repository_Store_Call ¶
Repository_Store_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Store'
func (*Repository_Store_Call) Return ¶
func (_c *Repository_Store_Call) Return(_a0 error) *Repository_Store_Call
func (*Repository_Store_Call) Run ¶
func (_c *Repository_Store_Call) Run(run func(ctx context.Context, targetID string, embeddingData *embedding.Embedding, key string)) *Repository_Store_Call
func (*Repository_Store_Call) RunAndReturn ¶
func (_c *Repository_Store_Call) RunAndReturn(run func(context.Context, string, *embedding.Embedding, string) error) *Repository_Store_Call