yay/pkg/db/executor.go

46 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-09-06 21:13:05 +02:00
"github.com/Jguer/go-alpm/v2"
2020-08-16 23:41:38 +02:00
"github.com/Jguer/yay/v10/pkg/upgrade"
2020-08-01 01:20:00 +02:00
)
2020-07-29 01:53:25 +02:00
type RepoPackage interface {
Base() string
2020-08-01 01:20:00 +02:00
BuildDate() time.Time
2020-09-06 21:13:05 +02:00
DB() alpm.IDB
2020-08-01 01:20:00 +02:00
Description() string
ISize() int64
2020-08-01 01:20:00 +02:00
Name() string
ShouldIgnore() bool
Size() int64
2020-08-01 01:20:00 +02:00
Version() string
2020-08-04 22:00:07 +02:00
Reason() alpm.PkgReason
2020-07-29 01:53:25 +02:00
}
2020-08-16 23:41:38 +02:00
type Executor interface {
AlpmArch() (string, error)
BiggestPackages() []RepoPackage
Cleanup()
IsCorrectVersionInstalled(string, string) bool
LastBuildTime() time.Time
LocalPackage(string) RepoPackage
LocalPackages() []RepoPackage
LocalSatisfierExists(string) bool
PackageConflicts(RepoPackage) []alpm.Depend
PackageDepends(RepoPackage) []alpm.Depend
SatisfierFromDB(string, string) RepoPackage
2020-08-16 23:41:38 +02:00
PackageGroups(RepoPackage) []string
PackageOptionalDepends(RepoPackage) []alpm.Depend
PackageProvides(RepoPackage) []alpm.Depend
PackagesFromGroup(string) []RepoPackage
RefreshHandle() error
RepoUpgrades(bool) (upgrade.UpSlice, error)
SyncPackages(...string) []RepoPackage
SyncSatisfier(string) RepoPackage
SyncSatisfierExists(string) bool
}