mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
* remove power-user document shape Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * add power-user specific fields to syft-json format Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * port remaining spdx-json relationships to sbom model Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * add coordinate set Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * add SBOM file path helper Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * use internal mimetype helper in go binary cataloger Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * add new package-of relationship Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * update json schema to v2 Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * replace power-user presenter with syft-json format Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * fix tests and linting Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * remove "package-of" relationship (in favor of "contains") Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * add tests for spdx22json format encoding enhancements Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * update TODO and log entries Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * introduce sbom.Descriptor Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
26 lines
854 B
Go
26 lines
854 B
Go
package model
|
|
|
|
import (
|
|
"github.com/anchore/syft/syft/file"
|
|
|
|
"github.com/anchore/syft/syft/source"
|
|
)
|
|
|
|
type File struct {
|
|
ID string `json:"id"`
|
|
Location source.Coordinates `json:"location"`
|
|
Metadata *FileMetadataEntry `json:"metadata,omitempty"`
|
|
Contents string `json:"contents,omitempty"`
|
|
Digests []file.Digest `json:"digests,omitempty"`
|
|
Classifications []file.Classification `json:"classifications,omitempty"`
|
|
}
|
|
|
|
type FileMetadataEntry struct {
|
|
Mode int `json:"mode"`
|
|
Type source.FileType `json:"type"`
|
|
LinkDestination string `json:"linkDestination,omitempty"`
|
|
UserID int `json:"userID"`
|
|
GroupID int `json:"groupID"`
|
|
MIMEType string `json:"mimeType"`
|
|
}
|