github.com/anchore/syft@v1.38.2/internal/capabilities/pkgtestobservation/model.go (about) 1 package pkgtestobservation 2 3 import "time" 4 5 // Observations represents capability observations during testing 6 type Observations struct { 7 License bool `json:"license"` 8 Relationships Relationship `json:"relationships"` 9 FileListing Count `json:"file_listing"` 10 FileDigests Count `json:"file_digests"` 11 IntegrityHash Count `json:"integrity_hash"` 12 } 13 14 // Relationship tracks dependency relationship observations 15 type Relationship struct { 16 Found bool `json:"found"` 17 Count int `json:"count"` 18 } 19 20 // Count tracks whether a capability was found and how many times 21 type Count struct { 22 Found bool `json:"found"` 23 Count int `json:"count"` 24 } 25 26 // Test is the root structure for test-observations.json 27 type Test struct { 28 Package string `json:"package"` 29 UpdatedAt time.Time `json:"updated_at"` 30 Catalogers map[string]*Cataloger `json:"catalogers"` 31 Parsers map[string]*Parser `json:"parsers"` 32 } 33 34 // Parser captures all observations for a parser 35 type Parser struct { 36 MetadataTypes []string `json:"metadata_types"` 37 PackageTypes []string `json:"package_types"` 38 Observations Observations `json:"observations"` 39 } 40 41 // Cataloger captures all observations for a cataloger 42 type Cataloger struct { 43 MetadataTypes []string `json:"metadata_types"` 44 PackageTypes []string `json:"package_types"` 45 Observations Observations `json:"observations"` 46 }