report

package
v0.0.0-...-25cbce1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReportFromFilePath

func ReportFromFilePath(filePath string) (metrics.ValidationReport, error)

func SaveReports

func SaveReports(run metrics.ValidationReport, jsonPath, htmlPath string) error

SaveReports saves both JSON and HTML reports.

Types

type HTMLReportGenerator

type HTMLReportGenerator struct{}

HTMLReportGenerator generates HTML reports.

func (*HTMLReportGenerator) GenerateAlertNotification

func (h *HTMLReportGenerator) GenerateAlertNotification(run metrics.ValidationReport) ([]byte, error)

GenerateAlertNotification generates an HTML alert.

func (*HTMLReportGenerator) GenerateValidationReport

func (h *HTMLReportGenerator) GenerateValidationReport(run metrics.ValidationReport) ([]byte, error)

GenerateValidationReport generates an HTML report from the validation run.

func (*HTMLReportGenerator) ReportFromFilePath

func (h *HTMLReportGenerator) ReportFromFilePath(path string) (metrics.ValidationReport, error)

ReportFromFilePath loads and generates a report from a file

func (*HTMLReportGenerator) SaveReportToFile

func (h *HTMLReportGenerator) SaveReportToFile(run metrics.ValidationReport, filePath string) error

SaveReportToFile saves the HTML report to a file.

type JSONReportGenerator

type JSONReportGenerator struct{}

JSONReportGenerator generates JSON reports.

func (*JSONReportGenerator) GenerateAlertNotification

func (j *JSONReportGenerator) GenerateAlertNotification(run metrics.ValidationReport) ([]byte, error)

GenerateAlertNotification generates an alert message in JSON format.

func (*JSONReportGenerator) GenerateValidationReport

func (j *JSONReportGenerator) GenerateValidationReport(run metrics.ValidationReport) ([]byte, error)

GenerateValidationReport serializes the ValidationReport to JSON.

func (*JSONReportGenerator) ReportFromFilePath

func (j *JSONReportGenerator) ReportFromFilePath(path string) (metrics.ValidationReport, error)

ReportFromFilePath loads and generates a report from a file

func (*JSONReportGenerator) SaveReportToFile

func (j *JSONReportGenerator) SaveReportToFile(run metrics.ValidationReport, filePath string) error

SaveReportToFile saves the JSON report to a file.

type ReportGenerator

type ReportGenerator interface {
	GenerateValidationReport(run metrics.ValidationReport) ([]byte, error)
	GenerateAlertNotification(run metrics.ValidationReport) ([]byte, error)
	SaveReportToFile(run metrics.ValidationReport, filePath string) error
	ReportFromFilePath(filePath string) (metrics.ValidationReport, error)
}

ReportGenerator defines the methods for generating reports.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL