Documentation ¶
Overview ¶
Package cpe provides for handling Common Platform Enumeration (CPE) names.
Index ¶
Constants ¶
const NumAttr = 11
NumAttr is the number of attributes in a 2.3 WFN.
Variables ¶
var ErrUnset = errors.New("cpe: wfn is empty")
ErrUnset is returned from (WFN).Valid() if it is the zero value.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute int
Attribute is a type for enumerating the valid CPE attributes.
type Value ¶
Value represents all the states for an attribute's value.
type ValueKind ¶
type ValueKind uint
ValueKind indicates what "kind" a value is.
These are the valid states for a wfn attribute's value.
type 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 ¶
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 UnbindURI ¶
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.
func (*WFN) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*WFN) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.