repo.go 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. package mock
  2. import (
  3. "time"
  4. alpm "github.com/Jguer/go-alpm/v2"
  5. )
  6. type Package struct {
  7. PBase string
  8. PBuildDate time.Time
  9. PDB alpm.IDB
  10. PDescription string
  11. PISize int64
  12. PName string
  13. PShouldIgnore bool
  14. PSize int64
  15. PVersion string
  16. PReason alpm.PkgReason
  17. }
  18. func (p *Package) Base() string {
  19. return p.PBase
  20. }
  21. func (p *Package) BuildDate() time.Time {
  22. return p.PBuildDate
  23. }
  24. func (p *Package) DB() alpm.IDB {
  25. return p.PDB
  26. }
  27. func (p *Package) Description() string {
  28. return p.PDescription
  29. }
  30. func (p *Package) ISize() int64 {
  31. return p.PISize
  32. }
  33. func (p *Package) Name() string {
  34. return p.PName
  35. }
  36. func (p *Package) ShouldIgnore() bool {
  37. return p.PShouldIgnore
  38. }
  39. func (p *Package) Size() int64 {
  40. return p.PSize
  41. }
  42. func (p *Package) Version() string {
  43. return p.PVersion
  44. }
  45. func (p *Package) Reason() alpm.PkgReason {
  46. return p.PReason
  47. }
  48. func (p *Package) FileName() string {
  49. panic("not implemented") // TODO: Implement
  50. }
  51. func (p *Package) Base64Signature() string {
  52. panic("not implemented") // TODO: Implement
  53. }
  54. func (p *Package) Validation() alpm.Validation {
  55. panic("not implemented") // TODO: Implement
  56. }
  57. // Architecture returns the package target Architecture.
  58. func (p *Package) Architecture() string {
  59. panic("not implemented") // TODO: Implement
  60. }
  61. // Backup returns a list of package backups.
  62. func (p *Package) Backup() alpm.BackupList {
  63. panic("not implemented") // TODO: Implement
  64. }
  65. // Conflicts returns the conflicts of the package as a DependList.
  66. func (p *Package) Conflicts() alpm.DependList {
  67. panic("not implemented") // TODO: Implement
  68. }
  69. // Depends returns the package's dependency list.
  70. func (p *Package) Depends() alpm.DependList {
  71. panic("not implemented") // TODO: Implement
  72. }
  73. // Depends returns the package's optional dependency list.
  74. func (p *Package) OptionalDepends() alpm.DependList {
  75. panic("not implemented") // TODO: Implement
  76. }
  77. // Depends returns the package's check dependency list.
  78. func (p *Package) CheckDepends() alpm.DependList {
  79. panic("not implemented") // TODO: Implement
  80. }
  81. // Depends returns the package's make dependency list.
  82. func (p *Package) MakeDepends() alpm.DependList {
  83. panic("not implemented") // TODO: Implement
  84. }
  85. // Files returns the file list of the package.
  86. func (p *Package) Files() []alpm.File {
  87. panic("not implemented") // TODO: Implement
  88. }
  89. // ContainsFile checks if the path is in the package filelist.
  90. func (p *Package) ContainsFile(path string) (alpm.File, error) {
  91. panic("not implemented") // TODO: Implement
  92. }
  93. // Groups returns the groups the package belongs to.
  94. func (p *Package) Groups() alpm.StringList {
  95. panic("not implemented") // TODO: Implement
  96. }
  97. // InstallDate returns the package install date.
  98. func (p *Package) InstallDate() time.Time {
  99. panic("not implemented") // TODO: Implement
  100. }
  101. // Licenses returns the package license list.
  102. func (p *Package) Licenses() alpm.StringList {
  103. panic("not implemented") // TODO: Implement
  104. }
  105. // SHA256Sum returns package SHA256Sum.
  106. func (p *Package) SHA256Sum() string {
  107. panic("not implemented") // TODO: Implement
  108. }
  109. // MD5Sum returns package MD5Sum.
  110. func (p *Package) MD5Sum() string {
  111. panic("not implemented") // TODO: Implement
  112. }
  113. // Packager returns package packager name.
  114. func (p *Package) Packager() string {
  115. panic("not implemented") // TODO: Implement
  116. }
  117. // Provides returns DependList of packages provides by package.
  118. func (p *Package) Provides() alpm.DependList {
  119. panic("not implemented") // TODO: Implement
  120. }
  121. // Origin returns package origin.
  122. func (p *Package) Origin() alpm.PkgFrom {
  123. panic("not implemented") // TODO: Implement
  124. }
  125. // Replaces returns a DependList with the packages this package replaces.
  126. func (p *Package) Replaces() alpm.DependList {
  127. panic("not implemented") // TODO: Implement
  128. }
  129. // URL returns the upstream URL of the package.
  130. func (p *Package) URL() string {
  131. panic("not implemented") // TODO: Implement
  132. }
  133. // ComputeRequiredBy returns the names of reverse dependencies of a package.
  134. func (p *Package) ComputeRequiredBy() []string {
  135. panic("not implemented") // TODO: Implement
  136. }
  137. // ComputeOptionalFor returns the names of packages that optionally
  138. // require the given package.
  139. func (p *Package) ComputeOptionalFor() []string {
  140. panic("not implemented") // TODO: Implement
  141. }
  142. // SyncNewVersion checks if there is a new version of the
  143. // package in a given DBlist.
  144. func (p *Package) SyncNewVersion(l alpm.IDBList) alpm.IPackage {
  145. panic("not implemented") // TODO: Implement
  146. }
  147. func (p *Package) Type() string {
  148. panic("not implemented") // TODO: Implement
  149. }