results

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checksum added in v0.0.4

type Checksum struct {
	Algorithm string `json:"algorithm"`
	Value     string `json:"value"`
}

type File

type File struct {
	Name string `json:"name"`
}

type Package

type Package struct {
	Name       string                  `json:"name"`
	Version    string                  `json:"version"`
	PURL       string                  `json:"purl,omitempty"`
	CPE        []string                `json:"cpe,omitempty"`
	Direct     bool                    `json:"direct,omitempty"`
	PathToRoot []string                `json:"path_to_root,omitempty"`
	Licenses   []licenses.LicenseStore `json:"license,omitempty"`
	Checksums  []Checksum              `json:"checksum,omitempty"`
}

type Result

type Result struct {
	Path           string    `json:"path"`
	Format         string    `json:"format"`
	Spec           string    `json:"spec"`
	Error          string    `json:"error,omitempty"`
	ProductName    string    `json:"product_name,omitempty"`
	ProductVersion string    `json:"product_version,omitempty"`
	Packages       []Package `json:"packages,omitempty"`
	Files          []File    `json:"files,omitempty"`
	ToolName       string    `json:"tool_name,omitempty"`
	ToolVersion    string    `json:"tool_version,omitempty"`
	Matched        bool
}

func NewSearchResult

func NewSearchResult(path, format, spec, err string) *Result

func (*Result) AddFile

func (sr *Result) AddFile(file File)

func (*Result) AddPackage

func (sr *Result) AddPackage(pkg Package)

func (*Result) AddProductName

func (sr *Result) AddProductName(name string)

func (*Result) AddProductVersion

func (sr *Result) AddProductVersion(version string)

Jump to

Keyboard shortcuts

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