mirror of
https://github.com/Jguer/yay.git
synced 2024-11-07 01:27:21 +01:00
50 lines
1.1 KiB
Go
50 lines
1.1 KiB
Go
package db
|
|
|
|
import (
|
|
"time"
|
|
|
|
alpm "github.com/Jguer/go-alpm/v2"
|
|
)
|
|
|
|
type (
|
|
IPackage = alpm.IPackage
|
|
Depend = alpm.Depend
|
|
)
|
|
|
|
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
|
|
}
|
|
|
|
type Executor interface {
|
|
AlpmArchitectures() ([]string, error)
|
|
BiggestPackages() []IPackage
|
|
Cleanup()
|
|
IsCorrectVersionInstalled(string, string) bool
|
|
LastBuildTime() time.Time
|
|
LocalPackage(string) IPackage
|
|
LocalPackages() []IPackage
|
|
LocalSatisfierExists(string) bool
|
|
PackageConflicts(IPackage) []Depend
|
|
PackageDepends(IPackage) []Depend
|
|
PackageGroups(IPackage) []string
|
|
PackageOptionalDepends(IPackage) []Depend
|
|
PackageProvides(IPackage) []Depend
|
|
PackagesFromGroup(string) []IPackage
|
|
RefreshHandle() error
|
|
RepoUpgrades(bool) ([]Upgrade, error)
|
|
Repos() []string
|
|
SatisfierFromDB(string, string) IPackage
|
|
SyncPackage(string) IPackage
|
|
SyncPackages(...string) []IPackage
|
|
SyncSatisfier(string) IPackage
|
|
SyncSatisfierExists(string) bool
|
|
}
|