Skip to content

Commit 4db4cdd

Browse files
fix lint issue
1 parent bdeda35 commit 4db4cdd

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

internal/wrappers/results.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,21 @@ type LicenseCounters struct {
127127
Counter int `json:"counter,omitempty"`
128128
}
129129

130+
// AgeCounters contains age counter information.
130131
type AgeCounters struct {
131132
Age string `json:"age,omitempty"`
132133
Counter int `json:"counter,omitempty"`
133134
SeverityCounters []SeverityCounters `json:"severityCounters,omitempty"`
134135
}
135136

137+
// PackageCounters contains package counter information.
136138
type PackageCounters struct {
137139
PackageID string `json:"packageId,omitempty"`
138140
Counter int `json:"counter,omitempty"`
139141
IsMalicious bool `json:"isMalicious,omitempty"`
140142
}
141143

144+
// SeverityStatusCounters contains combined severity and status counter information.
142145
type SeverityStatusCounters struct {
143146
Severity string `json:"severity,omitempty"`
144147
Status string `json:"status,omitempty"`

internal/wrappers/scan-summary-http.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@ const (
1414
failedToParseScanSummary = "Failed to parse scan-summary response"
1515
)
1616

17+
// ScanSummaryHTTPWrapper is a struct that implements the ScanSummaryWrapper interface for retrieving scan summaries via HTTP requests.
1718
type ScanSummaryHTTPWrapper struct {
1819
path string
1920
}
2021

22+
// NewHTTPScanSummaryWrapper creates a new instance of ScanSummaryHTTPWrapper with the provided path.
2123
func NewHTTPScanSummaryWrapper(path string) ScanSummaryWrapper {
2224
return &ScanSummaryHTTPWrapper{
2325
path: path,
2426
}
2527
}
28+
// GetScanSummaryByScanID retrieves the scan summary for a given scan ID by making an HTTP GET request to the configured path.
2629
func (s *ScanSummaryHTTPWrapper) GetScanSummaryByScanID(scanID string) (*ScanSummariesModel, *WebError, error) {
2730
clientTimeout := viper.GetUint(commonParams.ClientTimeoutKey)
2831
// Construct the path with query parameter

internal/wrappers/scan-summary.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package wrappers
22

3+
// ScanSummaryWrapper wraps scan summary logic.
34
type ScanSummaryWrapper interface {
45
GetScanSummaryByScanID(scanID string) (*ScanSummariesModel, *WebError, error)
56
}

0 commit comments

Comments
 (0)