formatter

package
v2.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CycloneDXFormat     = "cyclonedx"
	CycloneDXJSONFormat = "cyclonedx-json"
)
View Source
const (
	SyftFormat = "json"
)

Variables

This section is empty.

Functions

func WriteSBOM

func WriteSBOM(sbom []byte, output string) error

Types

type CycloneDX

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

func (*CycloneDX) Decode

func (f *CycloneDX) Decode(format string) error

func (*CycloneDX) Encode

func (f *CycloneDX) Encode(format string) error

func (*CycloneDX) GetSBOM

func (f *CycloneDX) GetSBOM() interface{}

func (*CycloneDX) GetSBOMBytes

func (f *CycloneDX) GetSBOMBytes() []byte

func (*CycloneDX) SetSBOM

func (f *CycloneDX) SetSBOM(bom interface{}) error

type Formatter

type Formatter interface {
	Encode(format string) error
	Decode(format string) error
	SetSBOM(interface{}) error
	GetSBOM() interface{}
	GetSBOMBytes() []byte
}

func New

func New(formatterName string, sbom []byte) Formatter

type Syft

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

func (*Syft) Decode

func (f *Syft) Decode(format string) error

func (*Syft) Encode

func (f *Syft) Encode(format string) error

func (*Syft) GetSBOM

func (f *Syft) GetSBOM() interface{}

func (*Syft) GetSBOMBytes

func (f *Syft) GetSBOMBytes() []byte

func (*Syft) SetSBOM

func (f *Syft) SetSBOM(bom interface{}) error

Jump to

Keyboard shortcuts

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