Documentation ¶
Index ¶
- Constants
- func MetadataType(metadata interface{}) string
- func NewFormatDecoder() sbom.FormatDecoder
- func NewFormatEncoder() sbom.FormatEncoder
- func NewFormatEncoderWithConfig(cfg EncoderConfig) (sbom.FormatEncoder, error)
- func ToFormatModel(s sbom.SBOM, cfg EncoderConfig) model.Document
- type EncoderConfig
Constants ¶
View Source
const ID sbom.FormatID = "syft-json"
Variables ¶
This section is empty.
Functions ¶
func MetadataType ¶ added in v0.97.0
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
Click to show internal directories.
Click to hide internal directories.