Documentation
¶
Index ¶
- func ColorizeJSON(raw []byte) []byte
- func FormatJSON(payload any, pretty bool) ([]byte, error)
- func RenderJSONError(specFile string, exitCode int, message string, debug *Debug) (any, jsonSummary, error)
- func RenderJSONReport(specFile string, report validate.Report, exitCode int, debug *Debug) (any, jsonSummary, error)
- func RenderReport(r validate.Report) string
- type Debug
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorizeJSON ¶ added in v0.1.8
ColorizeJSON adds ANSI colors to severity values for terminal display.
func FormatJSON ¶ added in v0.1.3
FormatJSON renders the payload as JSON, optionally pretty printed.
func RenderJSONError ¶ added in v0.1.3
func RenderJSONError(specFile string, exitCode int, message string, debug *Debug) (any, jsonSummary, error)
RenderJSONError builds a JSON error response when findings cannot be produced.
func RenderJSONReport ¶ added in v0.1.3
func RenderJSONReport(specFile string, report validate.Report, exitCode int, debug *Debug) (any, jsonSummary, error)
RenderJSONReport renders a report to JSON with the required schema.
func RenderReport ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.