reader

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	Options options.Options
	// contains filtered or unexported fields
}

func New

func New() *Reader

New returns a new Reader with the default options

func (*Reader) ParseFile

func (r *Reader) ParseFile(path string) (*sbom.Document, error)

ParseFile reads a file and returns an sbom.Document

func (*Reader) ParseStream

func (r *Reader) ParseStream(f io.ReadSeekCloser) (*sbom.Document, error)

ParseStream returns a document from a io reader

type Unserializer

type Unserializer interface {
	ParseStream(*options.Options, io.Reader) (*sbom.Document, error)
}

type UnserializerCDX14

type UnserializerCDX14 struct{}

func (*UnserializerCDX14) ParseStream

func (u *UnserializerCDX14) ParseStream(_ *options.Options, r io.Reader) (*sbom.Document, error)

ParseStream reads a CycloneDX 1.4 from stream r usinbg the offcial CycloneDX libraries and returns a protobom document with its data.

type UnserializerSPDX23

type UnserializerSPDX23 struct{}

func (*UnserializerSPDX23) ParseStream

func (u *UnserializerSPDX23) ParseStream(_ *options.Options, r io.Reader) (*sbom.Document, error)

ParseStream reads an io.Reader to parse an SPDX 2.3 document from it

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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