From 6ed9cf3fb47966f8278bdaabda5a9e07f9419922 Mon Sep 17 00:00:00 2001 From: sadayuki-matsuno Date: Mon, 5 Nov 2018 15:35:50 +0900 Subject: [PATCH] add scan mode (#731) --- models/scanresults.go | 1 + scan/base.go | 1 + 2 files changed, 2 insertions(+) diff --git a/models/scanresults.go b/models/scanresults.go index 38321966..2c2aed23 100644 --- a/models/scanresults.go +++ b/models/scanresults.go @@ -45,6 +45,7 @@ type ScanResult struct { IPv4Addrs []string `json:"ipv4Addrs,omitempty"` // only global unicast address (https://golang.org/pkg/net/#IP.IsGlobalUnicast) IPv6Addrs []string `json:"ipv6Addrs,omitempty"` // only global unicast address (https://golang.org/pkg/net/#IP.IsGlobalUnicast) ScannedAt time.Time `json:"scannedAt"` + ScanMode string `json:"scanMode"` ScannedVersion string `json:"scannedVersion"` ScannedRevision string `json:"scannedRevision"` ScannedBy string `json:"scannedBy"` diff --git a/scan/base.go b/scan/base.go index cbe86abf..3a1eb465 100644 --- a/scan/base.go +++ b/scan/base.go @@ -391,6 +391,7 @@ func (l *base) convertToModel() models.ScanResult { JSONVersion: models.JSONVersion, ServerName: l.ServerInfo.ServerName, ScannedAt: time.Now(), + ScanMode: l.ServerInfo.Mode.String(), Family: l.Distro.Family, Release: l.Distro.Release, Container: container,