purl

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

View Source
const (
	TypeOCI = "oci"

	// TypeK8s is a custom type for Kubernetes components in PURL.
	//  - namespace: The service provider such as EKS or GKE. It is not case sensitive and must be lowercased.
	//     Known namespaces:
	//       - empty (upstream)
	//       - eks (AWS)
	//       - aks (GCP)
	//       - gke (Azure)
	//       - rke (Rancher)
	//  - name: The k8s component name and is case sensitive.
	//  - version: The combined version and release of a component.
	//
	//  Examples:
	//    - pkg:k8s/upstream/k8s.io%2Fapiserver@1.24.1
	//    - pkg:k8s/eks/k8s.io%2Fkube-proxy@1.26.2-eksbuild.1
	TypeK8s = "k8s"

	NamespaceEKS = "eks"
	NamespaceAKS = "aks"
	NamespaceGKE = "gke"
	NamespaceOCP = "ocp"

	TypeUnknown = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PackageURL

type PackageURL packageurl.PackageURL

func FromString added in v0.30.0

func FromString(s string) (*PackageURL, error)

func New added in v0.49.0

func New(t ftypes.TargetType, metadata types.Metadata, pkg ftypes.Package) (*PackageURL, error)

nolint: gocyclo

func (*PackageURL) Class added in v0.46.0

func (p *PackageURL) Class() types.ResultClass

func (*PackageURL) LangType added in v0.46.0

func (p *PackageURL) LangType() ftypes.LangType

LangType returns an application type in Trivy nolint: gocyclo

func (*PackageURL) Match added in v0.49.0

func (p *PackageURL) Match(target *packageurl.PackageURL) bool

Match returns true if the given PURL "target" satisfies the constraint PURL "p". - If the constraint does not have a version, it will match any version in the target. - If the constraint has qualifiers, the target must have the same set of qualifiers to match.

func (*PackageURL) Package added in v0.30.0

func (p *PackageURL) Package() *ftypes.Package

func (*PackageURL) String added in v0.50.0

func (p *PackageURL) String() string

func (*PackageURL) Unwrap added in v0.49.0

func (p *PackageURL) Unwrap() *packageurl.PackageURL

Jump to

Keyboard shortcuts

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