Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VacuumReport ¶
type VacuumReport struct { Generated time.Time `json:"generated" yaml:"generated"` SpecInfo *datamodel.SpecInfo `json:"specInfo" yaml:"specInfo"` Statistics *reports.ReportStatistics `json:"statistics" yaml:"statistics"` ResultSet *model.RuleResultSet `json:"resultSet" yaml:"resultSet"` }
VacuumReport is a serialized, ready to re-replay linting report. It can be used on its own, or it can be used as a replay model to re-render the report again. Time is now available to vacuum.
func BuildVacuumReportFromFile ¶
func BuildVacuumReportFromFile(filePath string) (*VacuumReport, []byte, error)
BuildVacuumReportFromFile will attempt (at great speed) to read in a file as a Vacuum Report. If successful a pointer to a ready to run report is returned. If the file isn't a report, or can't be read and cannot be parsed then nil is returned. regardless of the outcome, if the file can be read, the bytes will be returned.
func CheckFileForVacuumReport ¶
func CheckFileForVacuumReport(data []byte) (*VacuumReport, error)
CheckFileForVacuumReport will try to extract a vacuum report from a byte array. It checks if the file is compressed or not, then if it can be marshalled into a report.