render

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDefaultDrivers

func LoadDefaultDrivers()

func RegisterDriver

func RegisterDriver(t string, driver Driver)

func UnregisterDriver

func UnregisterDriver(t string, driver Driver)

Types

type Driver

type Driver interface {
	RenderResultSet(w io.Writer, status *papi.ResultSet) error
	RenderResult(w io.Writer, status *papi.Result) error
	RenderResultGroup(w io.Writer, status *papi.ResultGroup) error
}

func GetDriverBytType

func GetDriverBytType(t string) Driver

type Engine

type Engine struct {
	Driver Driver
}

func NewEngine

func NewEngine() *Engine

func (*Engine) RenderResult

func (e *Engine) RenderResult(w io.Writer, result *papi.Result) error

RenderResult calls the method of the same name of the configured driver

func (*Engine) RenderResultSet

func (e *Engine) RenderResultSet(w io.Writer, rset *papi.ResultSet) error

RenderResultSet calls the method of the same name of the configured driver

func (*Engine) SetDriver

func (e *Engine) SetDriver(format string) error

SetDriver sets the ourput driver format

Jump to

Keyboard shortcuts

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