meta

package
v0.0.0-...-9878773 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checksum

type Checksum struct {
	Algorithm HashAlgorithm
	Content   []byte
	Value     string
}

func (*Checksum) Compute

func (c *Checksum) Compute(content []byte) string

func (*Checksum) String

func (c *Checksum) String() string

type HashAlgorithm

type HashAlgorithm string

HashAlgorithm ...

const (
	HashAlgoSHA1   HashAlgorithm = "SHA1"
	HashAlgoSHA224 HashAlgorithm = "SHA224"
	HashAlgoSHA256 HashAlgorithm = "SHA256"
	HashAlgoSHA384 HashAlgorithm = "SHA384"
	HashAlgoSHA512 HashAlgorithm = "SHA512"
	HashAlgoMD2    HashAlgorithm = "MD2"
	HashAlgoMD4    HashAlgorithm = "MD4"
	HashAlgoMD5    HashAlgorithm = "MD5"
	HashAlgoMD6    HashAlgorithm = "MD6"
)

type Package

type Package struct {
	Version                 string `json:"version,omitempty"`
	Name                    string `json:"name"`
	Path                    string `json:"path,omitempty"`
	LocalPath               string `json:"dir"`
	Supplier                Supplier
	PackageURL              string `json:"purl"`
	Checksum                Checksum
	PackageHomePage         string `json:"homePage"`
	PackageDownloadLocation string `json:"downloadLocation"`
	LicenseConcluded        string `json:"licenseConcluded"`
	LicenseDeclared         string `json:"licenseDeclared"`
	CommentsLicense         string `json:"licenseComments"`
	OtherLicense            []license.License
	Copyright               string `json:"copyright"`
	PackageComment          string `json:"comment"`
	Root                    bool
	Packages                map[string]*Package
}

Package is the package abstraction that the parsers return

type Supplier

type Supplier struct {
	Type            SupplierType
	Name            string
	Email           string
	FuncGetSupplier func() string `json:"-"`
}

Supplier abstracts the supplier of the package

func (*Supplier) Get

func (s *Supplier) Get() string

Get default supplier based on Name value or let each plugin build its own logic

type SupplierType

type SupplierType string

TypeContact ...

const (
	Person       SupplierType = "Person"
	Organization SupplierType = "Organization"
)

Jump to

Keyboard shortcuts

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