Add FindPackages()

The version inmemory is optimized, while the boltdb implementation is
not.

It returns a list of the same package but with all the versions present
in the db.
This commit is contained in:
Ettore Di Giacinto
2019-12-06 16:29:15 +01:00
committed by Ettore Di Giacinto
parent 556668fcc4
commit 57181d7cbf
3 changed files with 79 additions and 9 deletions

View File

@@ -33,6 +33,7 @@ type PackageSet interface {
GetPackage(ID string) (Package, error)
Clean() error
FindPackage(Package) (Package, error)
FindPackages(p Package) ([]Package, error)
UpdatePackage(p Package) error
GetAllPackages(packages chan Package) error
RemovePackage(Package) error