@@ -2,17 +2,34 @@ package api
22
33// Report contains the fields of a Preflight report
44type Report struct {
5- // Unique ID of the report
5+ // Unique ID of the report.
66 ID string `json:"id"`
7- // Timestamp indicates when the report was generated
7+ // PreflightVersion indicates the version of preflight this report was generated with.
8+ PreflightVersion string `json:"preflight-version"`
9+ // Timestamp indicates when the report was generated.
810 Timestamp Time `json:"timestamp"`
9- // Cluster indicates which was the target of the report
11+ // Cluster indicates which was the target of the report.
1012 Cluster string `json:"cluster"`
11- // Package indicates which package was used for the report
12- Package string `json:"package"`
13- Name string `json:"name"`
14- Description string `json:"description,omitempty"`
15- Sections []ReportSection `json:"sections,omitempty"`
13+ // Package indicates which package was used for the report. (deprecated)
14+ Package string `json:"package"`
15+ // PackageInformation contains all the information about the package that was used to generate the report.
16+ PackageInformation PackageInformation `json:"package-information"`
17+ // Name is the name of the package that was used for this report.
18+ Name string `json:"name"`
19+ // Description is the description of the package that was used for this report.
20+ Description string `json:"description,omitempty"`
21+ // Sections contains the sections of the package that was used for this report.
22+ Sections []ReportSection `json:"sections,omitempty"`
23+ }
24+
25+ // PackageInformation contains all the details to identify a package.
26+ type PackageInformation struct {
27+ // Namespace the package belongs to.
28+ Namespace string `json:"namespace"`
29+ // ID is the ID of the package.
30+ ID string `json:"id"`
31+ // Version is the version of the package.
32+ Version string `json:"version"`
1633}
1734
1835// ReportSection contains the fields of a section inside a Report
0 commit comments