cpe

package
v1.5.28 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Overview

Package cpe provides for handling Common Platform Enumeration (CPE) names.

Deprecated: This package is a re-export of "github.com/quay/claircore/toolkit/types/cpe". Users should migrate to that package.

Index

Constants

View Source
const (
	Part      = cpe.Part
	Vendor    = cpe.Vendor
	Product   = cpe.Product
	Version   = cpe.Version
	Update    = cpe.Update
	Edition   = cpe.Edition
	Language  = cpe.Language
	SwEdition = cpe.SwEdition
	TargetSW  = cpe.TargetSW
	TargetHW  = cpe.TargetHW
	Other     = cpe.Other
)

These are the valid Attributes, in CPE 2.3 binding order.

View Source
const (
	ValueUnset = cpe.ValueUnset
	ValueAny   = cpe.ValueAny
	ValueNA    = cpe.ValueNA
	ValueSet   = cpe.ValueSet
)

These are the valid states for a wfn attribute's value.

View Source
const NumAttr = cpe.NumAttr

NumAttr is the number of attributes in a 2.3 WFN.

Variables

View Source
var ErrUnset = cpe.ErrUnset

ErrUnset is returned from (WFN).Valid() if it is the zero value.

Functions

This section is empty.

Types

type Attribute

type Attribute = cpe.Attribute

Attribute is a type for enumerating the valid CPE attributes.

type Value

type Value = cpe.Value

Value represents all the states for an attribute's value.

func NewValue

func NewValue(v string) (Value, error)

NewValue constructs a specific value and ensures it's a valid string.

This function does not quote the provided string, only validates that the quoting is proper.

type ValueKind

type ValueKind = cpe.ValueKind

ValueKind indicates what "kind" a value is.

type WFN

type WFN = cpe.WFN

WFN is a well-formed name as defined by the Common Platform Enumeration (CPE) spec: https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir7695.pdf

This package does not implement binding into URI form.

func MustUnbind

func MustUnbind(s string) WFN

MustUnbind calls Unbind on the provided string, but panics if any errors are encountered.

This is primarily useful for static data where any error is a programmer error.

func Unbind

func Unbind(s string) (WFN, error)

Unbind attempts to unbind a string regardless of it be a formatted string or URI.

func UnbindFS

func UnbindFS(s string) (WFN, error)

UnbindFS attempts to unbind a string as CPE 2.3 formatted string into a WFN.

func UnbindURI

func UnbindURI(s string) (WFN, error)

UnbindURI attempts to unbind a string as CPE 2.2 URI into a WFN.

This function supports unpacking attributes from the "edition" component as specified in CPE 2.3.

Jump to

Keyboard shortcuts

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