github.com/lineaje-labs/syft@v0.98.1-0.20231227153149-9e393f60ff1b/syft/format/syftjson/model/document.go (about)

     1  package model
     2  
     3  // Document represents the syft cataloging findings as a JSON document
     4  type Document struct {
     5  	Artifacts             []Package      `json:"artifacts"` // Artifacts is the list of packages discovered and placed into the catalog
     6  	ArtifactRelationships []Relationship `json:"artifactRelationships"`
     7  	Files                 []File         `json:"files,omitempty"` // note: must have omitempty
     8  	Source                Source         `json:"source"`          // Source represents the original object that was cataloged
     9  	Distro                LinuxRelease   `json:"distro"`          // Distro represents the Linux distribution that was detected from the source
    10  	Descriptor            Descriptor     `json:"descriptor"`      // Descriptor is a block containing self-describing information about syft
    11  	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
    12  }
    13  
    14  // Descriptor describes what created the document as well as surrounding metadata
    15  type Descriptor struct {
    16  	Name          string      `json:"name"`
    17  	Version       string      `json:"version"`
    18  	Configuration interface{} `json:"configuration,omitempty"`
    19  }
    20  
    21  type Schema struct {
    22  	Version string `json:"version"`
    23  	URL     string `json:"url"`
    24  }