render

package
v1.9.22-beta012 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(cmd *cobra.Command, obj interface{}, w io.Writer) error

func Obj

func Obj(cmd *cobra.Command, obj interface{}, w io.Writer, renderer ...CliObjRenderer) error

func RenderExecutionResult added in v1.6.25

func RenderExecutionResult(execution *testkube.Execution)

func RenderGoTemplate

func RenderGoTemplate(item interface{}, w io.Writer, tpl string) error

func RenderGoTemplateList

func RenderGoTemplateList(list []interface{}, w io.Writer, tpl string) error

func RenderJSON

func RenderJSON(obj interface{}, w io.Writer) error

func RenderPrettyList

func RenderPrettyList(obj ui.TableData, w io.Writer) error

func RenderYaml

func RenderYaml(obj interface{}, w io.Writer) error

Types

type CliObjRenderer

type CliObjRenderer func(ui *ui.UI, obj interface{}) error

type OutputType

type OutputType string
const (
	OutputGoTemplate OutputType = "go"
	OutputJSON       OutputType = "json"
	OutputYAML       OutputType = "yaml"
	OutputPretty     OutputType = "pretty"
)

Jump to

Keyboard shortcuts

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