diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-09 11:11:49 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-09 11:11:49 +0300 |
| commit | 8c32cd117abe79f4ee6cff3a950ffc35c95faeff (patch) | |
| tree | 5b63a4789351da4f2d9c1cd2e7007f67d43b3371 /internal/repository/mock.go | |
| parent | 59c8870061465142306e7a6e5d3fcb344686cfe9 (diff) | |
Refine media browsing and set covers
Diffstat (limited to 'internal/repository/mock.go')
| -rw-r--r-- | internal/repository/mock.go | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/internal/repository/mock.go b/internal/repository/mock.go index d715984..d7b61a4 100644 --- a/internal/repository/mock.go +++ b/internal/repository/mock.go @@ -904,6 +904,11 @@ func (m *MockStore) GetFeedBySetID(ctx context.Context, setID int64) (*model.Pod return m.PodcastRepo.GetFeedBySetID(ctx, setID) } +// ListFeedsBySetID implements PodcastRepo. +func (m *MockStore) ListFeedsBySetID(ctx context.Context, setID int64) ([]model.PodcastFeed, error) { + return m.PodcastRepo.ListFeedsBySetID(ctx, setID) +} + // ListFeeds implements PodcastRepo. func (m *MockStore) ListFeeds(ctx context.Context) ([]model.PodcastFeed, error) { return m.PodcastRepo.ListFeeds(ctx) @@ -966,11 +971,12 @@ type MockPodcastRepo struct { DeleteFeedFunc func(ctx context.Context, id int64) error GetFeedByIDFunc func(ctx context.Context, id int64) (*model.PodcastFeed, error) GetFeedBySetIDFunc func(ctx context.Context, setID int64) (*model.PodcastFeed, error) + ListFeedsBySetIDFunc func(ctx context.Context, setID int64) ([]model.PodcastFeed, error) ListFeedsFunc func(ctx context.Context) ([]model.PodcastFeed, error) ListFeedsNeedingCheckFunc func(ctx context.Context, before time.Time) ([]model.PodcastFeed, error) - CreateEpisodeFunc func(ctx context.Context, episode *model.PodcastEpisode) (int64, error) - GetEpisodeByIDFunc func(ctx context.Context, id int64) (*model.PodcastEpisode, error) + CreateEpisodeFunc func(ctx context.Context, episode *model.PodcastEpisode) (int64, error) + GetEpisodeByIDFunc func(ctx context.Context, id int64) (*model.PodcastEpisode, error) GetEpisodeByGUIDFunc func(ctx context.Context, feedID int64, guid string) (*model.PodcastEpisode, error) ListEpisodesByFeedFunc func(ctx context.Context, feedID int64, limit, offset int) ([]model.PodcastEpisode, error) UpdateEpisodeMediaFunc func(ctx context.Context, episodeID, mediaID int64, fileName string) error @@ -1021,6 +1027,14 @@ func (m *MockPodcastRepo) GetFeedBySetID(ctx context.Context, setID int64) (*mod return nil, nil } +// ListFeedsBySetID calls ListFeedsBySetIDFunc or returns nil. +func (m *MockPodcastRepo) ListFeedsBySetID(ctx context.Context, setID int64) ([]model.PodcastFeed, error) { + if m.ListFeedsBySetIDFunc != nil { + return m.ListFeedsBySetIDFunc(ctx, setID) + } + return nil, nil +} + // ListFeeds calls ListFeedsFunc or returns nil. func (m *MockPodcastRepo) ListFeeds(ctx context.Context) ([]model.PodcastFeed, error) { if m.ListFeedsFunc != nil { |
