cpe

package
v0.103.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 64

Documentation

Index

Constants

View Source
const Any = ""

Variables

This section is empty.

Functions

func ValidateString

func ValidateString(cpeStr string) error

Types

type BySpecificity

type BySpecificity []CPE

func (BySpecificity) Len

func (c BySpecificity) Len() int

func (BySpecificity) Less

func (c BySpecificity) Less(i, j int) bool

func (BySpecificity) Swap

func (c BySpecificity) Swap(i, j int)

type CPE

type CPE struct {
	Part      string
	Vendor    string
	Product   string
	Version   string
	Update    string
	Edition   string
	SWEdition string
	TargetSW  string
	TargetHW  string
	Other     string
	Language  string
}

func Merge

func Merge(a, b []CPE) (result []CPE)

func Must

func Must(cpeStr string) CPE

Must returns a CPE or panics if the provided string is not valid

func New

func New(cpeStr string) (CPE, error)

New will parse a formatted CPE string and return a CPE object. Some input, such as the existence of whitespace characters is allowed, however, a more strict validation is done after this sanitization process.

func NewWithAny added in v0.102.0

func NewWithAny() CPE

func (CPE) BindToFmtString added in v0.102.0

func (c CPE) BindToFmtString() string

func (CPE) String added in v0.102.0

func (c CPE) String() string

Jump to

Keyboard shortcuts

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