github.com/quay/claircore@v1.5.28/package.go (about) 1 package claircore 2 3 import "github.com/quay/claircore/pkg/cpe" 4 5 type Package struct { 6 // unique ID of this package. this will be created as discovered by the library 7 // and used for persistence and hash map indexes 8 ID string `json:"id"` 9 // the name of the package 10 Name string `json:"name"` 11 // the version of the package 12 Version string `json:"version"` 13 // type of package. currently expectations are binary or source 14 Kind string `json:"kind,omitempty"` 15 // if type is a binary package a source package maybe present which built this binary package. 16 // must be a pointer to support recursive type: 17 Source *Package `json:"source,omitempty"` 18 // the file system path or prefix where this package resides 19 PackageDB string `json:"-"` 20 // a location in the layer where the package is located, this is useful for language packages. 21 Filepath string `json:"-"` 22 // a hint on which repository this package was downloaded from 23 RepositoryHint string `json:"-"` 24 // NormalizedVersion is a representation of a version string that's 25 // correctly ordered when compared with other representations from the same 26 // producer. 27 NormalizedVersion Version `json:"normalized_version,omitempty"` 28 // Module and stream which this package is part of 29 Module string `json:"module,omitempty"` 30 // Package architecture 31 Arch string `json:"arch,omitempty"` 32 // CPE name for package 33 CPE cpe.WFN `json:"cpe,omitempty"` 34 } 35 36 const ( 37 BINARY = "binary" 38 SOURCE = "source" 39 )