formats

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSON       = "json"
	XML        = "xml"
	TEXT       = "text"
	SPDX23TV   = Format("text/spdx+text;version=2.3")
	SPDX23JSON = Format("text/spdx+json;version=2.3")
	SPDX22TV   = Format("text/spdx+text;version=2.2")
	SPDX22JSON = Format("text/spdx+json;version=2.2")
	CDX10JSON  = Format("application/vnd.cyclonedx+json;version=1.0")
	CDX11JSON  = Format("application/vnd.cyclonedx+json;version=1.1")
	CDX12JSON  = Format("application/vnd.cyclonedx+json;version=1.2")
	CDX13JSON  = Format("application/vnd.cyclonedx+json;version=1.3")
	CDX14JSON  = Format("application/vnd.cyclonedx+json;version=1.4")
	CDX15JSON  = Format("application/vnd.cyclonedx+json;version=1.5")
	CDXFORMAT  = "cyclonedx"
	SPDXFORMAT = "spdx"
)
View Source
const (
	EmptyFormat = Format("")
)

Variables

Functions

This section is empty.

Types

type Document

type Document interface{}

type Format

type Format string

func (Format) Encoding

func (f Format) Encoding() string

Encoding returns the encoding used by the SBOM format

func (*Format) Major

func (f *Format) Major() string

func (*Format) Minor

func (f *Format) Minor() string

func (*Format) Type

func (f *Format) Type() string

Type returns the encoding used by the SBOM format

func (*Format) URI

func (f *Format) URI() string

func (*Format) Version

func (f *Format) Version() string

Version returns the version of the format

type Sniffer

type Sniffer struct{}

func (*Sniffer) SniffFile

func (fs *Sniffer) SniffFile(path string) (Format, error)

SniffFile takes a path an return the format

func (*Sniffer) SniffReader

func (fs *Sniffer) SniffReader(f io.ReadSeeker) (Format, error)

SniffReader reads a stream and return the SBOM format

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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