Documentation
¶
Overview ¶
Package html implements the ResultRepository interface for HTML report generation. It wraps the existing render.GenerateHTMLReport functionality to provide consistent output handling within the repository pattern.
Index ¶
- type HTMLOptions
- type HTMLResultRepository
- func (r *HTMLResultRepository) GetOutputPath() string
- func (r *HTMLResultRepository) LoadResults() ([]engine.RunResult, error)
- func (r *HTMLResultRepository) SaveResult(result *engine.RunResult) error
- func (r *HTMLResultRepository) SaveResults(runResults []engine.RunResult) error
- func (r *HTMLResultRepository) SaveSummary(summary *results.ResultSummary) error
- func (r *HTMLResultRepository) SupportsStreaming() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTMLOptions ¶
type HTMLOptions struct {
// GenerateJSON controls whether to generate companion JSON data file
GenerateJSON bool
// Title sets the report title (defaults to "Altaira Prompt Arena Report")
Title string
// UseTimestampSuffix controls whether to add timestamp to filename
UseTimestampSuffix bool
}
HTMLOptions provides configuration for HTML report generation.
func DefaultHTMLOptions ¶
func DefaultHTMLOptions() *HTMLOptions
DefaultHTMLOptions returns the default HTML options.
type HTMLResultRepository ¶
type HTMLResultRepository struct {
// contains filtered or unexported fields
}
HTMLResultRepository implements ResultRepository for HTML report generation. It wraps the existing render.GenerateHTMLReport function to provide consistent output handling within the repository pattern.
func NewHTMLResultRepository ¶
func NewHTMLResultRepository(outputPath string) *HTMLResultRepository
NewHTMLResultRepository creates a new HTML result repository.
func NewHTMLResultRepositoryWithOptions ¶
func NewHTMLResultRepositoryWithOptions(outputPath string, options *HTMLOptions) *HTMLResultRepository
NewHTMLResultRepositoryWithOptions creates a new HTML result repository with custom options.
func (*HTMLResultRepository) GetOutputPath ¶
func (r *HTMLResultRepository) GetOutputPath() string
GetOutputPath returns the configured output path.
func (*HTMLResultRepository) LoadResults ¶
func (r *HTMLResultRepository) LoadResults() ([]engine.RunResult, error)
LoadResults is not supported for HTML repositories. HTML files are meant for human consumption and are not designed for programmatic parsing back to RunResult structures.
func (*HTMLResultRepository) SaveResult ¶
func (r *HTMLResultRepository) SaveResult(result *engine.RunResult) error
SaveResult is not supported for HTML repositories. HTML generation requires all results to build comprehensive reports with matrices and summaries.
func (*HTMLResultRepository) SaveResults ¶
func (r *HTMLResultRepository) SaveResults(runResults []engine.RunResult) error
SaveResults generates an HTML report from the provided results. This wraps the existing render.GenerateHTMLReport functionality.
func (*HTMLResultRepository) SaveSummary ¶
func (r *HTMLResultRepository) SaveSummary(summary *results.ResultSummary) error
SaveSummary saves a summary (no-op for HTML - summary is embedded in report). HTML reports include summary information within the main report, so this operation is not applicable.
func (*HTMLResultRepository) SupportsStreaming ¶
func (r *HTMLResultRepository) SupportsStreaming() bool
SupportsStreaming returns false - HTML generation requires all results at once. HTML reports need to calculate matrices, summaries, and cross-references which require the complete dataset.