spdx

package
v0.0.0-...-c5f19f0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SPDXVersion         = "SPDX-2.2"
	DataLicense         = "CC0-1.0"
	SPDXIdentifier      = "DOCUMENT"
	DocumentNamespace   = "http://aquasecurity.github.io/trivy"
	CreatorOrganization = "aquasecurity"
	CreatorTool         = "trivy"
)
View Source
const (
	CategoryPackageManager = "PACKAGE-MANAGER"
	RefTypePurl            = "purl"

	PropertySchemaVersion = "SchemaVersion"

	// Image properties
	PropertySize       = "Size"
	PropertyImageID    = "ImageID"
	PropertyRepoDigest = "RepoDigest"
	PropertyDiffID     = "DiffID"
	PropertyRepoTag    = "RepoTag"

	// Package properties
	PropertyPkgID       = "PkgID"
	PropertyLayerDiffID = "LayerDiffID"
	PropertyLayerDigest = "LayerDigest"

	RelationShipContains  = "CONTAINS"
	RelationShipDescribe  = "DESCRIBES"
	RelationShipDependsOn = "DEPENDS_ON"

	ElementOperatingSystem = "OperatingSystem"
	ElementApplication     = "Application"
	ElementPackage         = "Package"
	ElementFile            = "File"
)

Variables

View Source
var (
	SourcePackagePrefix = "built package from"
)

Functions

func WithClock

func WithClock(clock clock.Clock) marshalOption

func WithHasher

func WithHasher(hasher Hash) marshalOption

func WithNewUUID

func WithNewUUID(newUUID newUUID) marshalOption

Types

type Hash

type Hash func(v interface{}, format hashstructure.Format, opts *hashstructure.HashOptions) (uint64, error)

type Marshaler

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

func NewMarshaler

func NewMarshaler(opts ...marshalOption) *Marshaler

func (*Marshaler) Marshal

func (m *Marshaler) Marshal(r types.Report) (*spdx.Document2_2, error)

type SPDX

type SPDX struct {
	*types.SBOM
}

func (*SPDX) UnmarshalJSON

func (s *SPDX) UnmarshalJSON(b []byte) error

type TVDecoder

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

func NewTVDecoder

func NewTVDecoder(r io.Reader) *TVDecoder

func (*TVDecoder) Decode

func (tv *TVDecoder) Decode(v interface{}) error

Jump to

Keyboard shortcuts

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