Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BOM ¶
type BOM struct { XMLName xml.Name `xml:"bom"` GeneratedAt string `json:"generated_at" xml:"generatedAt"` ProjectName string `json:"project_name" xml:"projectName"` Dependencies []Dependency `json:"dependencies" xml:"dependencies>dependency"` }
func (*BOM) ExportCycloneDX ¶ added in v1.0.1
ExportCycloneDX exports the BOM in CycloneDX format
func (*BOM) ExportJSON ¶
ExportJSON exports the BOM as JSON
func (*BOM) ToCycloneDX ¶ added in v1.0.1
func (b *BOM) ToCycloneDX() (*CycloneDXBOM, error)
ToCycloneDX converts the BOM to CycloneDX format
type Component ¶ added in v1.0.1
type Component struct { Type string `xml:"type,attr"` BOMRef string `xml:"bom-ref,attr"` Name string `xml:"name"` Version string `xml:"version"` Publisher string `xml:"publisher,omitempty"` Description string `xml:"description,omitempty"` Licenses []License `xml:"licenses>license,omitempty"` PackageURL string `xml:"purl,omitempty"` ExternalRefs []ExternalRef `xml:"externalReferences>reference,omitempty"` }
type CycloneDXBOM ¶ added in v1.0.1
type CycloneDXBOM struct { XMLName xml.Name `xml:"bom"` XMLNS string `xml:"xmlns,attr"` Version int `xml:"version,attr"` SerialNumber string `xml:"serialNumber,attr"` Metadata Metadata `xml:"metadata"` Components []Component `xml:"components>component"` Dependencies []BOMRef `xml:"dependencies>dependency"` }
CycloneDX BOM format version 1.4
type Dependency ¶
type ExternalRef ¶ added in v1.0.1
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator represents a BOM generator instance
func NewGenerator ¶
NewGenerator creates a new BOM generator for the specified project path
Click to show internal directories.
Click to hide internal directories.