reports

package
v0.0.0-...-4521c63 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package reports provides a way to render a workflow.Plan to an HTML document with a program that will let you read it. This is meant for a Plan that is running on a local machine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(ctx context.Context, plan *workflow.Plan, options ...DownloadOption) (b []byte, err error)

Download downloads a tarball (.tar.gz) of the html files generated by Render and a binary to read it.

func Render

func Render(ctx context.Context, plan *workflow.Plan, options ...RenderOption) (fs.ReadFileFS, error)

Render renders a workflow.Plan to an HTML document. This may alter the Plan object to eliminate Request and Response fields that have fields marked with the `coerce:"secure"` tag.

Types

type DownloadOption

type DownloadOption func(opt downloadOptions) (downloadOptions, error)

DownloadOption is an optional argument for Download.

func WithExecutable

func WithExecutable(b bool) DownloadOption

WithExecutable determines if the reporter executable should be included in the tarball. The default is true.

func WithRenderOptions

func WithRenderOptions(opts ...RenderOption) DownloadOption

WithRenderOptions sets the RenderOptions for the Render function.

type FS

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

FS is a wrapper around afero.Fs to implement fs.FS interface.

func (FS) Open

func (f FS) Open(name string) (fs.File, error)

func (FS) ReadFile

func (f FS) ReadFile(name string) ([]byte, error)

type RenderOption

type RenderOption func(renderOptions) (renderOptions, error)

RenderOption is an optional argument for Render.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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