ingredient/info: Add Fetcher concept

This commit is contained in:
Tom Wiesing 2022-10-19 10:50:40 +02:00
parent a6501b42c7
commit 52559e4d68
No known key found for this signature in database
22 changed files with 447 additions and 328 deletions

View file

@ -0,0 +1,18 @@
package info
import "github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
type SnapshotsFetcher struct {
ingredient.Base
Info *Info
}
func (lbr *SnapshotsFetcher) Fetch(flags ingredient.FetchFlags, info *ingredient.Information) (err error) {
if flags.Quick {
return
}
info.Snapshots, _ = lbr.Snapshots()
return
}