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 ¶
func Decoders() []sbom.FormatDecoder
func Encoders ¶
func Encoders() []sbom.FormatEncoder
func NewDecoderCollection ¶
func NewDecoderCollection(decoders ...sbom.FormatDecoder) sbom.FormatDecoder
Types ¶
type DecoderCollection ¶
type DecoderCollection struct {
// contains filtered or unexported fields
}
type EncoderCollection ¶
type EncoderCollection struct {
// contains filtered or unexported fields
}
func NewEncoderCollection ¶
func NewEncoderCollection(encoders ...sbom.FormatEncoder) *EncoderCollection
func (EncoderCollection) Aliases ¶
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 ¶
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 ¶
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 ¶
func (e EncoderCollection) IDs() []sbom.FormatID
IDs returns all format IDs represented in the collection.
func (EncoderCollection) NameVersions ¶
func (e EncoderCollection) NameVersions() []string
NameVersions returns all formats that are supported by the collection as a list of "name@version" strings.
type EncodersConfig ¶
type EncodersConfig struct { Template template.EncoderConfig SyftJSON syftjson.EncoderConfig SPDXJSON spdxjson.EncoderConfig SPDXTagValue spdxtagvalue.EncoderConfig CyclonedxJSON cyclonedxjson.EncoderConfig CyclonedxXML cyclonedxxml.EncoderConfig }
func DefaultEncodersConfig ¶
func DefaultEncodersConfig() EncodersConfig
func (EncodersConfig) Encoders ¶
func (o EncodersConfig) Encoders() ([]sbom.FormatEncoder, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.