Documentation
¶
Index ¶
- Constants
- func Decode(reader io.Reader) (*sbom.SBOM, sbom.FormatID, string, error)
- func Decoders() []sbom.FormatDecoder
- func Encode(s sbom.SBOM, f sbom.FormatEncoder) ([]byte, error)
- func Encoders() []sbom.FormatEncoder
- func Identify(reader io.Reader) (sbom.FormatID, string)
- func NewDecoderCollection(decoders ...sbom.FormatDecoder) sbom.FormatDecoder
- type DecoderCollection
- type EncoderCollection
- type EncodersConfig
Constants ¶
View Source
const AllVersions = "all-versions"
Variables ¶
This section is empty.
Functions ¶
func Decoders ¶ added in v0.95.0
func Decoders() []sbom.FormatDecoder
func Encode ¶ added in v0.95.0
Encode takes all SBOM elements and a format option and encodes an SBOM document.
func Encoders ¶ added in v0.102.0
func Encoders() []sbom.FormatEncoder
func Identify ¶ added in v0.95.0
Identify takes a set of bytes and attempts to identify the format of the SBOM.
func NewDecoderCollection ¶ added in v0.95.0
func NewDecoderCollection(decoders ...sbom.FormatDecoder) sbom.FormatDecoder
Types ¶
type DecoderCollection ¶ added in v0.95.0
type DecoderCollection struct {
// contains filtered or unexported fields
}
type EncoderCollection ¶ added in v0.95.0
type EncoderCollection struct {
// contains filtered or unexported fields
}
func NewEncoderCollection ¶ added in v0.95.0
func NewEncoderCollection(encoders ...sbom.FormatEncoder) *EncoderCollection
func (EncoderCollection) Aliases ¶ added in v0.95.0
func (e EncoderCollection) Aliases() []string
Aliases returns all format aliases represented in the collection (where an ID would be "spdx-tag-value" the alias would be "spdx").
func (EncoderCollection) Get ¶ added in v0.95.0
func (e EncoderCollection) Get(name string, version string) sbom.FormatEncoder
Get returns the contained encoder for a given format name and version.
func (EncoderCollection) GetByString ¶ added in v0.95.0
func (e EncoderCollection) GetByString(s string) sbom.FormatEncoder
GetByString accepts a name@version string, such as:
- json
- spdx-json@2.1
- cdx@1.5
func (EncoderCollection) IDs ¶ added in v0.95.0
func (e EncoderCollection) IDs() []sbom.FormatID
IDs returns all format IDs represented in the collection.
func (EncoderCollection) NameVersions ¶ added in v0.95.0
func (e EncoderCollection) NameVersions() []string
NameVersions returns all formats that are supported by the collection as a list of "name@version" strings.
type EncodersConfig ¶ added in v0.102.0
type EncodersConfig struct { Template template.EncoderConfig SyftJSON syftjson.EncoderConfig SPDXJSON spdxjson.EncoderConfig SPDXTagValue spdxtagvalue.EncoderConfig CyclonedxJSON cyclonedxjson.EncoderConfig CyclonedxXML cyclonedxxml.EncoderConfig }
func DefaultEncodersConfig ¶ added in v0.102.0
func DefaultEncodersConfig() EncodersConfig
func (EncodersConfig) Encoders ¶ added in v0.102.0
func (o EncodersConfig) Encoders() ([]sbom.FormatEncoder, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.