bomdag

package
v0.0.0-...-2d4f0a5 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EdgeDependencyType

func EdgeDependencyType(dependencyType BomDAGDependencyType) func(*graph.EdgeProperties)

Types

type BomDAG

type BomDAG struct {
	graph.Graph[BomDAGVertexHash, bomDAGVertex]
	Root BomDAGVertexHash // Hash of the root component
}

BomDAG represents a directed, acyclic graph of several interconnected components

func NewBomDAG

func NewBomDAG() BomDAG

func (*BomDAG) AddCDXComponent

func (bomDAG *BomDAG) AddCDXComponent(value cdx.Component, options ...func(*graph.VertexProperties)) (valueHash BomDAGVertexHash, err error)

Add a component to this graph; This should be mainly used to add components to the graph

func (*BomDAG) GetCDXComponents

func (bomDAG *BomDAG) GetCDXComponents() ([]cdx.Component, map[cdx.BOMReference][]string, error)

Generate slice of cyclonedx-go components from the graph; also return a map of dependencies (e.g. "bomref1" depends on "bomref2" and "bomref3")

func (*BomDAG) Merge

func (bomDAG *BomDAG) Merge(other BomDAG) error

Merge other into the BomDag this method was called on

func (*BomDAG) WriteToFile

func (bomDAG *BomDAG) WriteToFile(filenamePrefix string)

Write a graphical representation of the graph to a file

type BomDAGDependencyType

type BomDAGDependencyType string

Type defining the different types of dependencies that components can have in the BomDAG

const (
	BomDAGDependencyTypeDependsOn                                            BomDAGDependencyType = "dependsOn"
	BomDAGDependencyTypeCertificatePropertiesSignatureAlgorithmRef           BomDAGDependencyType = "CertificatePropertiesSignatureAlgorithmRef"
	BomDAGDependencyTypeCertificatePropertiesSubjectPublicKeyRef             BomDAGDependencyType = "CertificatePropertiesSubjectPublicKeyRef"
	BomDAGDependencyTypeRelatedCryptoMaterialPropertiesAlgorithmRef          BomDAGDependencyType = "RelatedCryptoMaterialPropertiesAlgorithmRef"
	BomDAGDependencyTypeRelatedCryptoMaterialPropertiesSecuredByAlgorithmRef BomDAGDependencyType = "RelatedCryptoMaterialPropertiessecuredByAlgorithmRef"
	BomDAGDependencyTypeProtocolPropertiesCryptoRefArrayElement              BomDAGDependencyType = "protocolPropertiescryptoRefArray"
	BomDAGDependencyTypeOccurrence                                           BomDAGDependencyType = "occurrence"
)

type BomDAGVertexHash

type BomDAGVertexHash = [8]byte

Type that hold the hash of a BomDAG vertex

Jump to

Keyboard shortcuts

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