yay/pkg/db/executor.go

48 lines
1.1 KiB
Go
Raw Normal View History

2020-07-29 01:53:25 +02:00
package db
2020-08-01 01:20:00 +02:00
import (
"time"
2020-10-01 13:38:03 +02:00
alpm "github.com/Jguer/go-alpm/v2"
2020-08-01 01:20:00 +02:00
)
2020-07-29 01:53:25 +02:00
2021-02-16 15:27:08 +01:00
type IPackage = alpm.IPackage
type Depend = alpm.Depend
2021-02-26 16:01:34 +01:00
func VerCmp(a, b string) int {
return alpm.VerCmp(a, b)
}
type Upgrade struct {
Name string
Repository string
LocalVersion string
RemoteVersion string
Reason alpm.PkgReason
}
2020-08-16 23:41:38 +02:00
type Executor interface {
AlpmArchitectures() ([]string, error)
2021-02-16 15:27:08 +01:00
BiggestPackages() []IPackage
2020-08-16 23:41:38 +02:00
Cleanup()
IsCorrectVersionInstalled(string, string) bool
LastBuildTime() time.Time
2021-02-16 15:27:08 +01:00
LocalPackage(string) IPackage
LocalPackages() []IPackage
2020-08-16 23:41:38 +02:00
LocalSatisfierExists(string) bool
2021-02-16 15:27:08 +01:00
PackageConflicts(IPackage) []Depend
PackageDepends(IPackage) []Depend
SatisfierFromDB(string, string) IPackage
PackageGroups(IPackage) []string
PackageOptionalDepends(IPackage) []Depend
PackageProvides(IPackage) []Depend
PackagesFromGroup(string) []IPackage
2020-08-16 23:41:38 +02:00
RefreshHandle() error
RepoUpgrades(bool) ([]Upgrade, error)
2021-02-16 15:27:08 +01:00
SyncPackage(string) IPackage
SyncPackages(...string) []IPackage
SyncSatisfier(string) IPackage
2020-08-16 23:41:38 +02:00
SyncSatisfierExists(string) bool
2021-04-19 13:43:13 +02:00
Repos() []string
2020-08-16 23:41:38 +02:00
}