cpe

package
v0.0.0-...-e1af42c Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(opts ...Option) error

Types

type CPE

type CPE struct {
	Deprecated   bool           `json:"deprecated"`
	Name         string         `json:"cpeName"`
	NameID       string         `json:"cpeNameId"`
	Created      string         `json:"created"`
	LastModified string         `json:"lastModified"`
	Titles       []Title        `json:"titles,omitempty"`
	Refs         []DefReference `json:"refs,omitempty"`
	DeprecatedBy []DeprecatedBy `json:"deprecatedBy,omitempty"`
	Deprecates   []Deprecate    `json:"deprecates,omitempty"`
}

Top level structure that fetch command stores CPE json files

type DefReference

type DefReference struct {
	Ref  string `json:"ref"`
	Type string `json:"type,omitempty"`
}

Internet resource for CPE

type Deprecate

type Deprecate struct {
	CPEName   *string `json:"cpeName,omitempty"`
	CPENameID *string `json:"cpeNameId,omitempty"`
}

type DeprecatedBy

type DeprecatedBy struct {
	CPEName   *string `json:"cpeName,omitempty"`
	CPENameID *string `json:"cpeNameId,omitempty"`
}

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithAPIKey

func WithAPIKey(apiKey string) Option

func WithBaseURL

func WithBaseURL(url string) Option

func WithConcurrency

func WithConcurrency(concurrency int) Option

func WithDir

func WithDir(dir string) Option

func WithLastModEndDate

func WithLastModEndDate(lastModEndDate *time.Time) Option

func WithLastModStartDate

func WithLastModStartDate(lastModStartDate *time.Time) Option

func WithResultsPerPage

func WithResultsPerPage(resultsPerPage int) Option

func WithRetry

func WithRetry(retry int) Option

func WithRetryWaitMax

func WithRetryWaitMax(wait int) Option

func WithRetryWaitMin

func WithRetryWaitMin(wait int) Option

func WithWait

func WithWait(wait int) Option

type Title

type Title struct {
	Title string `json:"title"`
	Lang  string `json:"lang"`
}

Human readable title for CPE

Jump to

Keyboard shortcuts

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