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
|
2020-08-01 00:01:01 +02:00
|
|
|
ISize() int64
|
2020-08-01 01:20:00 +02:00
|
|
|
Name() string
|
|
|
|
ShouldIgnore() bool
|
2020-08-01 00:01:01 +02:00
|
|
|
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
|
2020-08-19 00:30:15 +02:00
|
|
|
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
|
|
|
|
}
|