yay/pkg/db/mock/repo.go

202 lines
4.1 KiB
Go
Raw Normal View History

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
PDB *DB
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-17 02:19:18 +02:00
func (p *Package) BuildDate() time.Time {
return p.PBuildDate
}
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-17 02:19:18 +02:00
func (p *Package) Description() string {
return p.PDescription
}
2020-08-17 02:19:18 +02:00
func (p *Package) ISize() int64 {
return p.PISize
}
2020-08-17 02:19:18 +02:00
func (p *Package) Name() string {
return p.PName
}
2020-08-17 02:19:18 +02:00
func (p *Package) ShouldIgnore() bool {
return p.PShouldIgnore
}
2020-08-17 02:19:18 +02:00
func (p *Package) Size() int64 {
return p.PSize
}
2020-08-17 02:19:18 +02:00
func (p *Package) Version() string {
return p.PVersion
}
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")
2020-10-01 13:38:03 +02:00
}
func (p *Package) Base64Signature() string {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
func (p *Package) Validation() alpm.Validation {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// Architecture returns the package target Architecture.
func (p *Package) Architecture() string {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// Backup returns a list of package backups.
func (p *Package) Backup() alpm.BackupList {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// Conflicts returns the conflicts of the package as a DependList.
func (p *Package) Conflicts() alpm.DependList {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// Depends returns the package's dependency list.
func (p *Package) Depends() alpm.DependList {
return alpm.DependList{}
2020-10-01 13:38:03 +02:00
}
// Depends returns the package's optional dependency list.
func (p *Package) OptionalDepends() alpm.DependList {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// Depends returns the package's check dependency list.
func (p *Package) CheckDepends() alpm.DependList {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// Depends returns the package's make dependency list.
func (p *Package) MakeDepends() alpm.DependList {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// Files returns the file list of the package.
func (p *Package) Files() []alpm.File {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
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")
2020-10-01 13:38:03 +02:00
}
// Groups returns the groups the package belongs to.
func (p *Package) Groups() alpm.StringList {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// InstallDate returns the package install date.
func (p *Package) InstallDate() time.Time {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// Licenses returns the package license list.
func (p *Package) Licenses() alpm.StringList {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// SHA256Sum returns package SHA256Sum.
func (p *Package) SHA256Sum() string {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// MD5Sum returns package MD5Sum.
func (p *Package) MD5Sum() string {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// Packager returns package packager name.
func (p *Package) Packager() string {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// Provides returns DependList of packages provides by package.
func (p *Package) Provides() alpm.DependList {
return alpm.DependList{}
2020-10-01 13:38:03 +02:00
}
// Origin returns package origin.
func (p *Package) Origin() alpm.PkgFrom {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// Replaces returns a DependList with the packages this package replaces.
func (p *Package) Replaces() alpm.DependList {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
// URL returns the upstream URL of the package.
func (p *Package) URL() string {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
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")
2020-10-01 13:38:03 +02:00
}
// 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")
2020-10-01 13:38:03 +02:00
}
// 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")
2020-10-01 13:38:03 +02:00
}
func (p *Package) Type() string {
panic("not implemented")
2020-10-01 13:38:03 +02:00
}
type DB struct {
alpm.IDB
name string
}
func NewDB(name string) *DB {
return &DB{name: name}
}
func (d *DB) Name() string {
return d.name
}