add new package-of relationship

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman 2021-11-17 13:40:59 -05:00
parent 4d5997981c
commit f8a874a3de
No known key found for this signature in database
GPG Key ID: 5CB45AE22BAB7EA7

View File

@ -1,17 +1,22 @@
package artifact package artifact
const ( const (
// OwnershipByFileOverlapRelationship indicates that the parent package claims ownership of a child package since // OwnershipByFileOverlapRelationship (supports package-to-package linkages) indicates that the parent package
// the parent metadata indicates overlap with a location that a cataloger found the child package by. This is // claims ownership of a child package since the parent metadata indicates overlap with a location that a
// by definition a package-to-package relationship and is created only after all package cataloging has been completed. // cataloger found the child package by. This relationship must be created only after all package cataloging
// has been completed.
OwnershipByFileOverlapRelationship RelationshipType = "ownership-by-file-overlap" OwnershipByFileOverlapRelationship RelationshipType = "ownership-by-file-overlap"
// PackageOfRelationship (supports any-to-package linkages) is a proxy for the SPDX 2.2 PACKAGE_OF
// relationship which is defined as: "to be used when artifact X is used as a package as part of package Y"
PackageOfRelationship RelationshipType = "package-of"
) )
type RelationshipType string type RelationshipType string
type Relationship struct { type Relationship struct {
From Identifiable `json:"from"` From Identifiable
To Identifiable `json:"to"` To Identifiable
Type RelationshipType `json:"type"` Type RelationshipType
Data interface{} `json:"data,omitempty"` Data interface{}
} }