Documentation
¶
Index ¶
- func ByFileOwnershipOverlapWorker(accessor sbomsync.Accessor)
- func EvidentBy(catalog *pkg.Collection) []artifact.Relationship
- func ExcludeBinariesByFileOwnershipOverlap(accessor sbomsync.Accessor)
- func RemoveRelationshipsByID(relationships []artifact.Relationship, id artifact.ID) []artifact.Relationship
- func Sort(rels []artifact.Relationship)
- func ToSource(src artifact.Identifiable, c *pkg.Collection) []artifact.Relationship
- type Index
- func (i *Index) Add(r artifact.Relationship) bool
- func (i *Index) AddAll(rs ...artifact.Relationship)
- func (i *Index) AllUniqueRelationships() []artifact.Relationship
- func (i *Index) ExistingRelationships() []artifact.Relationship
- func (i *Index) NewRelationships() []artifact.Relationship
- func (i *Index) Track(r artifact.Relationship) bool
- func (i *Index) TrackAll(rs ...artifact.Relationship)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByFileOwnershipOverlapWorker ¶ added in v1.5.0
func EvidentBy ¶ added in v1.5.0
func EvidentBy(catalog *pkg.Collection) []artifact.Relationship
func ExcludeBinariesByFileOwnershipOverlap ¶ added in v1.5.0
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
func ToSource(src artifact.Identifiable, c *pkg.Collection) []artifact.Relationship
Types ¶
type Index ¶ added in v1.5.0
type Index struct {
// contains filtered or unexported fields
}
func NewIndex ¶ added in v1.5.0
func NewIndex(existing ...artifact.Relationship) *Index
func (*Index) Add ¶ added in v1.5.0
func (i *Index) Add(r artifact.Relationship) bool
Add a new relationship to the index, returning true if the relationship is new to the index, false otherwise (thus is a duplicate).
func (*Index) AddAll ¶ added in v1.5.0
func (i *Index) AddAll(rs ...artifact.Relationship)
func (*Index) AllUniqueRelationships ¶ added in v1.5.0
func (i *Index) AllUniqueRelationships() []artifact.Relationship
func (*Index) ExistingRelationships ¶ added in v1.5.0
func (i *Index) ExistingRelationships() []artifact.Relationship
func (*Index) NewRelationships ¶ added in v1.5.0
func (i *Index) NewRelationships() []artifact.Relationship
func (*Index) Track ¶ added in v1.5.0
func (i *Index) Track(r artifact.Relationship) bool
Track this relationship as "exists" in the index (this is used to prevent duplicate relationships from being added). returns true if the relationship is new to the index, false otherwise.
func (*Index) TrackAll ¶ added in v1.5.0
func (i *Index) TrackAll(rs ...artifact.Relationship)