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.
type RenderOption ¶
type RenderOption func(renderOptions) (renderOptions, error)
RenderOption is an optional argument for Render.