github.com/nextlinux/gosbom@v0.81.1-0.20230627115839-1ff50c281391/gosbom/formats/gosbomjson/model/document.go (about)

     1  package model
     2  
     3  // Document represents the gosbom 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  	Secrets               []Secrets      `json:"secrets,omitempty"` // note: must have omitempty
     9  	Source                Source         `json:"source"`            // Source represents the original object that was cataloged
    10  	Distro                LinuxRelease   `json:"distro"`            // Distro represents the Linux distribution that was detected from the source
    11  	Descriptor            Descriptor     `json:"descriptor"`        // Descriptor is a block containing self-describing information about gosbom
    12  	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
    13  }
    14  
    15  // Descriptor describes what created the document as well as surrounding metadata
    16  type Descriptor struct {
    17  	Name          string      `json:"name"`
    18  	Version       string      `json:"version"`
    19  	Configuration interface{} `json:"configuration,omitempty"`
    20  }
    21  
    22  type Schema struct {
    23  	Version string `json:"version"`
    24  	URL     string `json:"url"`
    25  }