2020-08-17 02:19:18 +02:00
|
|
|
package mock
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2020-10-01 13:38:03 +02:00
|
|
|
alpm "github.com/Jguer/go-alpm/v2"
|
2020-08-17 02:19:18 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
type Package struct {
|
|
|
|
PBase string
|
|
|
|
PBuildDate time.Time
|
2020-09-06 21:13:05 +02:00
|
|
|
PDB alpm.IDB
|
2020-08-17 02:19:18 +02:00
|
|
|
PDescription string
|
|
|
|
PISize int64
|
|
|
|
PName string
|
|
|
|
PShouldIgnore bool
|
|
|
|
PSize int64
|
|
|
|
PVersion string
|
|
|
|
PReason alpm.PkgReason
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Package) Base() string {
|
|
|
|
return p.PBase
|
|
|
|
}
|
2020-08-21 02:39:52 +02:00
|
|
|
|
2020-08-17 02:19:18 +02:00
|
|
|
func (p *Package) BuildDate() time.Time {
|
|
|
|
return p.PBuildDate
|
|
|
|
}
|
2020-08-21 02:39:52 +02:00
|
|
|
|
2020-09-06 21:13:05 +02:00
|
|
|
func (p *Package) DB() alpm.IDB {
|
2020-08-17 02:19:18 +02:00
|
|
|
return p.PDB
|
|
|
|
}
|
2020-08-21 02:39:52 +02:00
|
|
|
|
2020-08-17 02:19:18 +02:00
|
|
|
func (p *Package) Description() string {
|
|
|
|
return p.PDescription
|
|
|
|
}
|
2020-08-21 02:39:52 +02:00
|
|
|
|
2020-08-17 02:19:18 +02:00
|
|
|
func (p *Package) ISize() int64 {
|
|
|
|
return p.PISize
|
|
|
|
}
|
2020-08-21 02:39:52 +02:00
|
|
|
|
2020-08-17 02:19:18 +02:00
|
|
|
func (p *Package) Name() string {
|
|
|
|
return p.PName
|
|
|
|
}
|
2020-08-21 02:39:52 +02:00
|
|
|
|
2020-08-17 02:19:18 +02:00
|
|
|
func (p *Package) ShouldIgnore() bool {
|
|
|
|
return p.PShouldIgnore
|
|
|
|
}
|
2020-08-21 02:39:52 +02:00
|
|
|
|
2020-08-17 02:19:18 +02:00
|
|
|
func (p *Package) Size() int64 {
|
|
|
|
return p.PSize
|
|
|
|
}
|
2020-08-21 02:39:52 +02:00
|
|
|
|
2020-08-17 02:19:18 +02:00
|
|
|
func (p *Package) Version() string {
|
|
|
|
return p.PVersion
|
|
|
|
}
|
2020-08-21 02:39:52 +02:00
|
|
|
|
2020-08-17 02:19:18 +02:00
|
|
|
func (p *Package) Reason() alpm.PkgReason {
|
|
|
|
return p.PReason
|
|
|
|
}
|
2020-10-01 13:38:03 +02:00
|
|
|
|
|
|
|
func (p *Package) FileName() string {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Package) Base64Signature() string {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Package) Validation() alpm.Validation {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Architecture returns the package target Architecture.
|
|
|
|
func (p *Package) Architecture() string {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Backup returns a list of package backups.
|
|
|
|
func (p *Package) Backup() alpm.BackupList {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Conflicts returns the conflicts of the package as a DependList.
|
|
|
|
func (p *Package) Conflicts() alpm.DependList {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Depends returns the package's dependency list.
|
|
|
|
func (p *Package) Depends() alpm.DependList {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Depends returns the package's optional dependency list.
|
|
|
|
func (p *Package) OptionalDepends() alpm.DependList {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Depends returns the package's check dependency list.
|
|
|
|
func (p *Package) CheckDepends() alpm.DependList {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Depends returns the package's make dependency list.
|
|
|
|
func (p *Package) MakeDepends() alpm.DependList {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Files returns the file list of the package.
|
|
|
|
func (p *Package) Files() []alpm.File {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
2021-08-11 20:13:28 +02:00
|
|
|
// ContainsFile checks if the path is in the package filelist.
|
2020-10-01 13:38:03 +02:00
|
|
|
func (p *Package) ContainsFile(path string) (alpm.File, error) {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Groups returns the groups the package belongs to.
|
|
|
|
func (p *Package) Groups() alpm.StringList {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// InstallDate returns the package install date.
|
|
|
|
func (p *Package) InstallDate() time.Time {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Licenses returns the package license list.
|
|
|
|
func (p *Package) Licenses() alpm.StringList {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// SHA256Sum returns package SHA256Sum.
|
|
|
|
func (p *Package) SHA256Sum() string {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// MD5Sum returns package MD5Sum.
|
|
|
|
func (p *Package) MD5Sum() string {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Packager returns package packager name.
|
|
|
|
func (p *Package) Packager() string {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Provides returns DependList of packages provides by package.
|
|
|
|
func (p *Package) Provides() alpm.DependList {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Origin returns package origin.
|
|
|
|
func (p *Package) Origin() alpm.PkgFrom {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// Replaces returns a DependList with the packages this package replaces.
|
|
|
|
func (p *Package) Replaces() alpm.DependList {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// URL returns the upstream URL of the package.
|
|
|
|
func (p *Package) URL() string {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
2021-08-11 20:13:28 +02:00
|
|
|
// ComputeRequiredBy returns the names of reverse dependencies of a package.
|
2020-10-01 13:38:03 +02:00
|
|
|
func (p *Package) ComputeRequiredBy() []string {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// ComputeOptionalFor returns the names of packages that optionally
|
2021-08-11 20:13:28 +02:00
|
|
|
// require the given package.
|
2020-10-01 13:38:03 +02:00
|
|
|
func (p *Package) ComputeOptionalFor() []string {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
// SyncNewVersion checks if there is a new version of the
|
|
|
|
// package in a given DBlist.
|
|
|
|
func (p *Package) SyncNewVersion(l alpm.IDBList) alpm.IPackage {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Package) Type() string {
|
|
|
|
panic("not implemented") // TODO: Implement
|
|
|
|
}
|