toVSASectionsReport converts ComponentResultsDisplay to VSASectionsReport
()
| 1192 | |
| 1193 | // toVSASectionsReport converts ComponentResultsDisplay to VSASectionsReport |
| 1194 | func (d ComponentResultsDisplay) toVSASectionsReport() VSASectionsReport { |
| 1195 | report := VSASectionsReport{ |
| 1196 | Header: HeaderReport{ |
| 1197 | Title: d.Header.Title, |
| 1198 | Timestamp: d.Header.Timestamp, |
| 1199 | }, |
| 1200 | Result: ResultReport{ |
| 1201 | Overall: d.Result.Overall, |
| 1202 | Fallback: d.Result.Fallback, |
| 1203 | ImageCount: d.Result.ImageCount, |
| 1204 | Images: d.Result.ImageLines, |
| 1205 | }, |
| 1206 | VSASummary: VSASummaryReport{ |
| 1207 | Signature: d.VSASummary.Signature, |
| 1208 | Predicate: d.VSASummary.Predicate, |
| 1209 | Policy: d.VSASummary.Policy, |
| 1210 | FallbackReasons: d.VSASummary.FallbackReasons, |
| 1211 | }, |
| 1212 | } |
| 1213 | |
| 1214 | if d.PolicyDiff != nil { |
| 1215 | report.PolicyDiff = &PolicyDiffReport{ |
| 1216 | AffectedImages: d.PolicyDiff.AffectedImages, |
| 1217 | Added: d.PolicyDiff.Added, |
| 1218 | Removed: d.PolicyDiff.Removed, |
| 1219 | Changed: d.PolicyDiff.Changed, |
| 1220 | } |
| 1221 | } |
| 1222 | |
| 1223 | return report |
| 1224 | } |
| 1225 | |
| 1226 | // toFormat converts ComponentResultsDisplay to the specified format |
| 1227 | // For text format, uses ComponentResultsDisplay to leverage existing String() methods |
no outgoing calls
no test coverage detected