internal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidFormats = []Format{JSON, Table, CSV}

Functions

func NewReportID

func NewReportID() string

Types

type Format

type Format string
const (
	JSON  Format = "json"
	Table Format = "table"
	CSV   Format = "csv"
)

func ValidateFormat

func ValidateFormat(f Format) Format

ValidateFormat returns a valid format or the default format if the given format is invalid

type License

type License struct {
	SPDXExpression string   `json:"spdx_expression" yaml:"spdx_expression"`
	Name           string   `json:"name" yaml:"name"`
	Locations      []string `json:"locations" yaml:"locations"`
	Reference      string   `json:"reference" yaml:"reference"`
	IsDeprecated   bool     `json:"is_deprecated" yaml:"is_deprecated"`
	LicenseID      string   `json:"license_id" yaml:"license_id"`
	SeeAlso        []string `json:"see_also" yaml:"see_also"`
	IsOsiApproved  bool     `json:"is_osi_approved" yaml:"is_osi_approved"`
}

func NewLicense

func NewLicense(l grant.License) License

type Package

type Package struct {
	Name      string   `json:"name" yaml:"name"`
	Version   string   `json:"version" yaml:"version"`
	Type      string   `json:"type" yaml:"type"`
	Locations []string `json:"locations" yaml:"locations"`
}

func NewPackage

func NewPackage(p *grant.Package) Package

func NewPackages

func NewPackages(pkgs ...*grant.Package) []Package

type ReportOptions

type ReportOptions struct {
	Format       Format
	ShowPackages bool
	CheckNonSPDX bool
	OsiApproved  bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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