syftjson

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const ID sbom.FormatID = "syft-json"

Variables

This section is empty.

Functions

func MetadataType

func MetadataType(metadata interface{}) string

MetadataType infers the metadata type value based on the pkg.Metadata payload.

func NewFormatDecoder

func NewFormatDecoder() sbom.FormatDecoder

func NewFormatEncoder

func NewFormatEncoder() sbom.FormatEncoder

func NewFormatEncoderWithConfig

func NewFormatEncoderWithConfig(cfg EncoderConfig) (sbom.FormatEncoder, error)

func ToFormatModel

func ToFormatModel(s sbom.SBOM, cfg EncoderConfig) model.Document

ToFormatModel transforms the sbom import a format-specific model.

Types

type EncoderConfig

type EncoderConfig struct {
	Legacy bool // transform the output to the legacy syft-json format (pre v1.0 changes, enumerated in the README.md)
	Pretty bool // don't include spaces and newlines; same as jq -c
}

func DefaultEncoderConfig

func DefaultEncoderConfig() EncoderConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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