Add -json flag to mirror list|show

Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
This commit is contained in:
Joshua Colson
2021-09-21 14:37:13 -07:00
committed by Lorenzo Bolla
parent d582f9bab2
commit 129eb8644d
17 changed files with 816 additions and 12 deletions
+2 -2
View File
@@ -52,10 +52,10 @@ const (
PackageTypeInstaller = "installer"
)
// Special arhictectures
// Special architectures
const (
ArchitectureAll = "all"
ArhictectureAny = "any"
ArchitectureAny = "any"
ArchitectureSource = "source"
)
+3 -1
View File
@@ -52,7 +52,7 @@ type RemoteRepo struct {
// Last update date
LastDownloadDate time.Time
// Checksums for release files
ReleaseFiles map[string]utils.ChecksumInfo
ReleaseFiles map[string]utils.ChecksumInfo `json:"-"` // exclude from json output
// Filter for packages
Filter string
// Status marks state of repository (being updated, no action)
@@ -71,6 +71,8 @@ type RemoteRepo struct {
DownloadUdebs bool
// Should we download installer files?
DownloadInstaller bool
// Packages for json output
Packages []string `codec:"-" json:",omitempty"`
// "Snapshot" of current list of packages
packageRefs *PackageRefList
// Parsed archived root