github.com/anchore/syft@v1.38.2/syft/format/syftjson/model/relationship.go (about)

     1  package model
     2  
     3  // Relationship represents a directed relationship between two artifacts in the SBOM, such as package-contains-file or package-depends-on-package.
     4  type Relationship struct {
     5  	// Parent is the ID of the parent artifact in this relationship.
     6  	Parent string `json:"parent"`
     7  
     8  	// Child is the ID of the child artifact in this relationship.
     9  	Child string `json:"child"`
    10  
    11  	// Type is the relationship type (e.g., "contains", "dependency-of", "ancestor-of").
    12  	Type string `json:"type"`
    13  
    14  	// Metadata contains additional relationship-specific metadata.
    15  	Metadata interface{} `json:"metadata,omitempty"`
    16  }