| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| mock "github.com/stretchr/testify/mock" |
| topicstore "go.skia.org/infra/rag/go/topicstore" |
| ) |
| |
| // TopicStore is an autogenerated mock type for the TopicStore type |
| type TopicStore struct { |
| mock.Mock |
| } |
| |
| // GetRepositories provides a mock function with given fields: ctx |
| func (_m *TopicStore) GetRepositories(ctx context.Context) ([]string, error) { |
| ret := _m.Called(ctx) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetRepositories") |
| } |
| |
| var r0 []string |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { |
| return rf(ctx) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context) []string); ok { |
| r0 = rf(ctx) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]string) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context) error); ok { |
| r1 = rf(ctx) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // ReadTopic provides a mock function with given fields: ctx, topicID, repository |
| func (_m *TopicStore) ReadTopic(ctx context.Context, topicID int64, repository string) (*topicstore.Topic, error) { |
| ret := _m.Called(ctx, topicID, repository) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for ReadTopic") |
| } |
| |
| var r0 *topicstore.Topic |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, int64, string) (*topicstore.Topic, error)); ok { |
| return rf(ctx, topicID, repository) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, int64, string) *topicstore.Topic); ok { |
| r0 = rf(ctx, topicID, repository) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*topicstore.Topic) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok { |
| r1 = rf(ctx, topicID, repository) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // SearchTopics provides a mock function with given fields: ctx, queryEmbedding, topicCount, repository |
| func (_m *TopicStore) SearchTopics(ctx context.Context, queryEmbedding []float32, topicCount int, repository string) ([]*topicstore.FoundTopic, error) { |
| ret := _m.Called(ctx, queryEmbedding, topicCount, repository) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for SearchTopics") |
| } |
| |
| var r0 []*topicstore.FoundTopic |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, []float32, int, string) ([]*topicstore.FoundTopic, error)); ok { |
| return rf(ctx, queryEmbedding, topicCount, repository) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, []float32, int, string) []*topicstore.FoundTopic); ok { |
| r0 = rf(ctx, queryEmbedding, topicCount, repository) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*topicstore.FoundTopic) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, []float32, int, string) error); ok { |
| r1 = rf(ctx, queryEmbedding, topicCount, repository) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // WriteTopic provides a mock function with given fields: ctx, topic |
| func (_m *TopicStore) WriteTopic(ctx context.Context, topic *topicstore.Topic) error { |
| ret := _m.Called(ctx, topic) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for WriteTopic") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, *topicstore.Topic) error); ok { |
| r0 = rf(ctx, topic) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // NewTopicStore creates a new instance of TopicStore. 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 NewTopicStore(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *TopicStore { |
| mock := &TopicStore{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |