printer

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulletItem

type BulletItem struct {
	Modify func(str string) (text string, textStyle *pterm.Style, bullet string, bulletStyle *pterm.Style)
	Items  []string
}

type PrintItem

type PrintItem struct {
	Name             string
	Webhook          PrintWebhookItem
	Kind             string
	ResourceModels   []ResourceModel
	ValidUntil       time.Duration
	ActiveNamespaces []string
}

type PrintModel

type PrintModel struct {
	Items []PrintItem
}

type PrintWebhookItem

type PrintWebhookItem struct {
	Name             string
	ServiceName      string
	ServiceNamespace string
	ServicePath      *string
	ServicePort      *int32
}

type Printer

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

Printer formats and prints check results and warnings.

func NewPrinter

func NewPrinter(out io.Writer) *Printer

NewPrinter constructs a new Printer with the specified output io.Writer and output format.

func (*Printer) Print

func (p *Printer) Print(model *PrintModel)

Print reads given PrintModel and prints as table using tablewriter.

type ResourceModel added in v0.0.8

type ResourceModel struct {
	Operations []string
	Resources  []string
}

Jump to

Keyboard shortcuts

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