cyclonedx

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	BOMRef             string              `json:"bom-ref"`
	Type               string              `json:"type"`
	Name               string              `json:"name"`
	Version            string              `json:"version"`
	Description        string              `json:"description"`
	PUrl               string              `json:"purl"`
	Hashes             []Hash              `json:"hashes,omitempty"`
	ExternalReferences []ExternalReference `json:"externalReferences,omitempty"`
	Licenses           []License           `json:"licenses,omitempty"`
	Components         []Component         `json:"components,omitempty"`
}

type CycloneDX

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

func New

func New(fs apkfs.FullFS) CycloneDX

func (*CycloneDX) Ext

func (cdx *CycloneDX) Ext() string

func (*CycloneDX) Generate

func (cdx *CycloneDX) Generate(opts *options.Options, path string) error

Generate writes a CycloneDX sbom in path

func (*CycloneDX) GenerateIndex added in v0.5.0

func (cdx *CycloneDX) GenerateIndex(opts *options.Options, path string) error

func (*CycloneDX) Key

func (cdx *CycloneDX) Key() string

type Dependency

type Dependency struct {
	Ref       string   `json:"ref"`
	DependsOn []string `json:"dependsOn"`
}

type Document

type Document struct {
	BOMFormat    string       `json:"bomFormat"`
	SpecVersion  string       `json:"specVersion"`
	Version      int          `json:"version"`
	Components   []Component  `json:"components,omitempty"`
	Dependencies []Dependency `json:"dependencies,omitempty"`
}

TODO(kaniini): Move most of this over to gitlab.alpinelinux.org/alpine/go.

type ExternalReference

type ExternalReference struct {
	URL  string `json:"url"`
	Type string `json:"type"`
}

type Hash added in v0.5.0

type Hash struct {
	Algorithm HashAlgorithm `json:"alg"`
	Value     string        `json:"content"`
}

type HashAlgorithm added in v0.5.0

type HashAlgorithm string

type License

type License struct {
	Expression string `json:"expression"`
}

Jump to

Keyboard shortcuts

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