Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶ added in v0.8.0
Descriptor describes what created the document as well as surrounding metadata
type Distribution ¶ added in v0.6.0
type Distribution struct { Name string `json:"name"` // Name of the Linux distribution Version string `json:"version"` // Version of the Linux distribution (major or major.minor version) IDLike string `json:"idLike"` // the ID_LIKE field found within the /etc/os-release file }
Distribution provides information about a detected Linux Distribution.
func NewDistribution ¶ added in v0.8.0
func NewDistribution(d *distro.Distro) Distribution
NewDistribution creates a struct with the Linux distribution to be represented in JSON.
type Document ¶
type Document struct { Artifacts []Package `json:"artifacts"` // Artifacts is the list of packages discovered and placed into the catalog Source Source `json:"source"` // Source represents the original object that was cataloged Distro Distribution `json:"distro"` // Distro represents the Linux distribution that was detected from the source Descriptor Descriptor `json:"descriptor"` // Descriptor is a block containing self-describing information about syft Schema Schema `json:"schema"` // Schema is a block reserved for defining the version for the shape of this JSON document and where to find the schema document to validate the shape }
Document represents the syft cataloging findings as a JSON document
type Package ¶ added in v0.8.0
type Package struct {
// contains filtered or unexported fields
}
Package represents a pkg.Package object specialized for JSON marshaling and unmarshaling.
func NewPackage ¶ added in v0.8.0
NewPackage crates a new Package from the given pkg.Package.
func (Package) ToPackage ¶ added in v0.8.0
ToPackage generates a pkg.Package from the current Package.
func (*Package) UnmarshalJSON ¶ added in v0.8.0
UnmarshalJSON is a custom unmarshaller for handling basic values and values with ambiguous types. nolint:funlen
type Presenter ¶
type Presenter struct {
// contains filtered or unexported fields
}
Presenter is a JSON presentation object for the syft results
func NewPresenter ¶
NewPresenter creates a new JSON presenter object for the given cataloging results.
type Source ¶
type Source struct { Type string `json:"type"` Target interface{} `json:"target"` }
Source object represents the thing that was cataloged
func (*Source) ToSourceMetadata ¶ added in v0.8.0
ToSourceMetadata takes a source object represented from JSON and creates a source.Metadata object.
func (*Source) UnmarshalJSON ¶ added in v0.8.0
UnmarshalJSON populates a source object from JSON bytes.