Add -json flag to mirror list|show

Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
This commit is contained in:
Joshua Colson authored and Lorenzo Bolla committed 2021-09-24 10:29:33 +02:00
1 parent d582f9bab2
commit 129eb8644d
17 files changed
+816 -12

No files matched your search

+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