yay/pkg/db/mock/repo.go

61 lines
906 B
Go
Raw Normal View History

2020-08-17 02:19:18 +02:00
package mock
import (
"time"
2020-09-06 21:13:05 +02:00
"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-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
}