Add boltdb implementation for packageset and db

This commit is contained in:
Ettore Di Giacinto
2019-10-28 17:12:29 +01:00
committed by Ettore Di Giacinto
parent da8734ed6a
commit c3197d70fc
10 changed files with 248 additions and 33 deletions

View File

@@ -18,12 +18,14 @@ package pkg
// Database is a merely simple in-memory db.
// FIXME: Use a proper structure or delegate to third-party
type PackageDatabase interface {
PackageSet
Get(s string) (string, error)
Set(k, v string) error
Create([]byte) (string, error)
Retrieve(ID string) ([]byte, error)
GetPackage(ID string) (Package, error)
CreatePackage(p Package) (string, error)
FindPackage(name, version string) (Package, error)
UpdatePackage(p Package) error
}