Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONDocument ¶
type JSONDocument struct {
// note: poweruser.JSONDocument is meant to always be a superset of packages.JSONDocument, any additional fields
// here should be optional by supplying "omitempty" on these fields hint to the jsonschema generator to not
// require these fields. As an accepted rule in this repo all collections should still be initialized in the
// context of being used in a JSON document.
FileClassifications []JSONFileClassifications `json:"fileClassifications,omitempty"` // note: must have omitempty
FileContents []JSONFileContents `json:"fileContents,omitempty"` // note: must have omitempty
FileMetadata []JSONFileMetadata `json:"fileMetadata,omitempty"` // note: must have omitempty
Secrets []JSONSecrets `json:"secrets,omitempty"` // note: must have omitempty
packages.JSONDocument
}
func NewJSONDocument ¶
func NewJSONDocument(config JSONDocumentConfig) (JSONDocument, error)
NewJSONDocument creates and populates a new JSON document struct from the given cataloging results.
type JSONDocumentConfig ¶
type JSONDocumentConfig struct {
ApplicationConfig config.Application
PackageCatalog *pkg.Catalog
FileMetadata map[source.Location]source.FileMetadata
FileDigests map[source.Location][]file.Digest
FileClassifications map[source.Location][]file.Classification
FileContents map[source.Location]string
Secrets map[source.Location][]file.SearchResult
Distro *distro.Distro
SourceMetadata source.Metadata
}
type JSONFileClassifications ¶
type JSONFileClassifications struct {
Location source.Location `json:"location"`
Classification file.Classification `json:"classification"`
}
func NewJSONFileClassifications ¶
func NewJSONFileClassifications(data map[source.Location][]file.Classification) []JSONFileClassifications
type JSONFileContents ¶
type JSONFileContents struct {
Location source.Location `json:"location"`
Contents string `json:"contents"`
}
func NewJSONFileContents ¶
func NewJSONFileContents(data map[source.Location]string) []JSONFileContents
type JSONFileMetadata ¶
type JSONFileMetadata struct {
Location source.Location `json:"location"`
Metadata JSONFileMetadataEntry `json:"metadata"`
}
func NewJSONFileMetadata ¶
func NewJSONFileMetadata(data map[source.Location]source.FileMetadata, digests map[source.Location][]file.Digest) ([]JSONFileMetadata, error)
type JSONFileMetadataEntry ¶
type JSONPresenter ¶
type JSONPresenter struct {
// contains filtered or unexported fields
}
JSONPresenter is a JSON presentation object for the syft results
func NewJSONPresenter ¶
func NewJSONPresenter(config JSONDocumentConfig) *JSONPresenter
NewJSONPresenter creates a new JSON presenter object for the given cataloging results.
type JSONSecrets ¶
type JSONSecrets struct {
Location source.Location `json:"location"`
Secrets []file.SearchResult `json:"secrets"`
}
func NewJSONSecrets ¶
func NewJSONSecrets(data map[source.Location][]file.SearchResult) []JSONSecrets
Click to show internal directories.
Click to hide internal directories.