finalize json output & add schema (#118)

This commit is contained in:
Alex Goodman
2020-08-04 16:05:53 -04:00
committed by GitHub
parent 2560266e38
commit e2a874a277
23 changed files with 1129 additions and 500 deletions
+9 -9
View File
@@ -12,15 +12,15 @@ type ID int64
// Package represents an application or library that has been bundled into a distributable format
type Package struct {
id ID // this is set when a package is added to the catalog
Name string
Version string
FoundBy string
Source []file.Reference
Licenses []string
Language Language // TODO: should this support multiple languages as a slice?
Type Type
Metadata interface{}
id ID // this is set when a package is added to the catalog
Name string `json:"manifest"`
Version string `json:"version"`
FoundBy string `json:"found-by"`
Source []file.Reference `json:"sources"`
Licenses []string `json:"licenses"` // TODO: should we move this into metadata?
Language Language `json:"language"` // TODO: should this support multiple languages as a slice?
Type Type `json:"type"`
Metadata interface{} `json:"metadata,omitempty"`
}
func (p Package) ID() ID {