relationship

package
v1.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByFileOwnershipOverlapWorker added in v1.5.0

func ByFileOwnershipOverlapWorker(accessor sbomsync.Accessor)

func EvidentBy added in v1.5.0

func EvidentBy(catalog *pkg.Collection) []artifact.Relationship

func ExcludeBinariesByFileOwnershipOverlap added in v1.5.0

func ExcludeBinariesByFileOwnershipOverlap(accessor sbomsync.Accessor)

func RemoveRelationshipsByID

func RemoveRelationshipsByID(relationships []artifact.Relationship, id artifact.ID) []artifact.Relationship

TODO: put under test...

func Sort

func Sort(rels []artifact.Relationship)

Sort takes a set of package-to-package relationships and sorts them in a stable order by name and version. Note: this does not consider package-to-other, other-to-package, or other-to-other relationships. TODO: ideally this should be replaced with a more type-agnostic sort function that resides in the artifact package.

func ToSource added in v1.5.0

Types

type Index added in v1.5.0

type Index struct {
	// contains filtered or unexported fields
}

Index indexes relationships, preventing duplicates

func NewIndex added in v1.5.0

func NewIndex(relationships ...artifact.Relationship) *Index

NewIndex returns a new relationship Index

func (*Index) Add added in v1.5.0

func (i *Index) Add(relationships ...artifact.Relationship)

Add adds all the given relationships to the index, without adding duplicates

func (*Index) All added in v1.10.0

All returns a sorted set of relationships matching all types, or all relationships if no types specified

func (*Index) Contains added in v1.10.0

func (i *Index) Contains(r artifact.Relationship) bool

Contains indicates the relationship is present in this index

func (*Index) Coordinates added in v1.10.0

func (i *Index) Coordinates(identifiable artifact.Identifiable, types ...artifact.RelationshipType) []file.Coordinates

Coordinates returns all coordinates for the provided identifiable for provided relationship types If no types are provided, all relationship types are considered.

func (*Index) From added in v1.10.0

func (i *Index) From(identifiable artifact.Identifiable, types ...artifact.RelationshipType) []artifact.Relationship

From returns all relationships from the given identifiable, with specified types

func (*Index) References added in v1.10.0

func (i *Index) References(identifiable artifact.Identifiable, types ...artifact.RelationshipType) []artifact.Relationship

References returns all relationships that reference to or from the given identifiable

func (*Index) Remove added in v1.13.0

func (i *Index) Remove(id artifact.ID)

func (*Index) Replace added in v1.13.0

func (i *Index) Replace(ogID artifact.ID, replacement artifact.Identifiable)

func (*Index) To added in v1.10.0

func (i *Index) To(identifiable artifact.Identifiable, types ...artifact.RelationshipType) []artifact.Relationship

To returns all relationships to the given identifiable, with specified types

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL