search

package
v0.7.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Index

func Index(indexName, query string) ([]Entry, *Stats, error)

func IndexPurl added in v0.7.3

func IndexPurl(indexName, query string) ([]PurlEntry, *Stats, error)

IndexPurl - for PURL searches

Types

type Entry

type Entry struct {
	IP          string   `json:"ip"`
	Port        int      `json:"port"`
	SSL         bool     `json:"ssl"`
	LastSeen    string   `json:"lastSeen"`
	ASN         string   `json:"asn"`
	Country     string   `json:"country"`
	CountryCode string   `json:"country_code"`
	City        string   `json:"city"`
	CVE         []string `json:"cve"`
	Matches     []string `json:"matches"`
	Hostnames   []string `json:"hostnames"`
	Type        struct {
		ID      string `json:"id"`
		Kind    string `json:"kind"`
		Finding string `json:"finding"`
	} `json:"type"`
	FeedIDs []string `json:"feed_ids"`
}

type PurlEntry added in v0.7.3

type PurlEntry struct {
	Name            string                  `json:"name"`
	Version         string                  `json:"version"`
	Purl            []string                `json:"purl"`
	Licenses        []string                `json:"licenses"`
	CVEs            []string                `json:"cves"`
	Vulnerabilities []sdk.PurlVulnerability `json:"vulnerabilities"`
	Artifacts       struct {
		Source []struct {
			Type      string `json:"type"`
			URL       string `json:"url"`
			Reference string `json:"reference,omitempty"`
		} `json:"source"`
		Binary []struct {
			Type string `json:"type"`
			URL  string `json:"url"`
		} `json:"binary"`
	} `json:"artifacts"`
	PublishedDate string `json:"published_date"`
}

type Stats

type Stats struct {
	TotalFiles   int64
	TotalLines   int64
	MatchedLines int64
	Duration     time.Duration
	Query        string
}

Jump to

Keyboard shortcuts

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