aboutsummaryrefslogtreecommitdiff
path: root/dbstore/cvesearchrow.go
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2022-02-19 22:53:59 -0500
committerPaul Duncan <pabs@pablotron.org>2022-02-19 22:53:59 -0500
commita84fa75165f0ec80a3bf604939ca55f9076c1282 (patch)
tree600317f1328a8eda6f531d5a1403bed623516dc2 /dbstore/cvesearchrow.go
parent6384ecac4b0d5f47e532fd9de660cf8ddcb5f04b (diff)
downloadcvez-a84fa75165f0ec80a3bf604939ca55f9076c1282.tar.bz2
cvez-a84fa75165f0ec80a3bf604939ca55f9076c1282.zip
dbstore: add CveSearch() and test (but not test data)
Diffstat (limited to 'dbstore/cvesearchrow.go')
-rw-r--r--dbstore/cvesearchrow.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/dbstore/cvesearchrow.go b/dbstore/cvesearchrow.go
new file mode 100644
index 0000000..4128347
--- /dev/null
+++ b/dbstore/cvesearchrow.go
@@ -0,0 +1,15 @@
+package dbstore
+
+import (
+ "github.com/pablotron/cvez/feed"
+)
+
+// CveSearch() result
+type CveSearchRow struct {
+ Id int64 `json:"cve_id"` // internal database CVE ID
+ CveId feed.CveId `json:"nvd_cve_id"` // NVD CVE ID
+ Description string `json:"description"` // CVE description (english)
+ V3BaseScore feed.Score `json:"v3_base_score"` // CVSSv3 base score
+ V3Severity feed.Severity `json:"v3_severity"` // CVSSv3 severity
+ Rank float32 `json:"rank"` // search result rank
+}