report

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package report provides HTML report generation for API style evaluation results.

Reports are generated using templ templates and can be converted to PDF using a headless browser (e.g., go-rod).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator creates HTML reports from evaluation data.

func New

func New() (*Generator, error)

New creates a new report generator.

func (*Generator) Generate

func (g *Generator) Generate(_ context.Context, eval *types.EvaluationReport, opts *Options) ([]byte, error)

Generate creates an HTML report from an evaluation report.

func (*Generator) GenerateFromFile

func (g *Generator) GenerateFromFile(_ context.Context, path string, opts *Options) ([]byte, error)

GenerateFromFile reads an evaluation JSON file and generates an HTML report.

type Options

type Options struct {
	// Title overrides the default report title.
	Title string

	Logo string

	// IncludeRawJSON includes the raw JSON data in the report.
	IncludeRawJSON bool

	// Theme is the color theme (light, dark).
	Theme string

	// GeneratedAt overrides the generation timestamp.
	GeneratedAt time.Time
}

Options configures report generation.

func DefaultOptions

func DefaultOptions() *Options

DefaultOptions returns sensible defaults.

Jump to

Keyboard shortcuts

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