(ctx context.Context, feedID string, cb func(episode *model.Episode) error)
| 227 | } |
| 228 | |
| 229 | func (b *Badger) WalkEpisodes(ctx context.Context, feedID string, cb func(episode *model.Episode) error) error { |
| 230 | return b.db.View(func(txn *badger.Txn) error { |
| 231 | return b.walkEpisodes(txn, feedID, cb) |
| 232 | }) |
| 233 | } |
| 234 | |
| 235 | func (b *Badger) walkEpisodes(txn *badger.Txn, feedID string, cb func(episode *model.Episode) error) error { |
| 236 | opts := badger.DefaultIteratorOptions |