output

package
Version: v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package output provides writers in different formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSON

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

JSON outputs resources in JSON format.

func NewJSON

func NewJSON() *JSON

NewJSON initializes JSON resource output.

func (*JSON) Flush

func (j *JSON) Flush() error

Flush implements output.Writer interface.

func (*JSON) WriteHeader

func (j *JSON) WriteHeader(definition resource.Resource, withEvents bool) error

WriteHeader implements output.Writer interface.

func (*JSON) WriteResource

func (j *JSON) WriteResource(node string, r resource.Resource, event state.EventType) error

WriteResource implements output.Writer interface.

type Table

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

Table outputs resources in Table view.

func NewTable

func NewTable() *Table

NewTable initializes table resource output.

func (*Table) Flush

func (table *Table) Flush() error

Flush implements output.Writer interface.

func (*Table) WriteHeader

func (table *Table) WriteHeader(definition resource.Resource, withEvents bool) error

WriteHeader implements output.Writer interface.

func (*Table) WriteResource

func (table *Table) WriteResource(node string, r resource.Resource, event state.EventType) error

WriteResource implements output.Writer interface.

type Writer

type Writer interface {
	WriteHeader(definition resource.Resource, withEvents bool) error
	WriteResource(node string, r resource.Resource, event state.EventType) error
	Flush() error
}

Writer interface.

func NewWriter

func NewWriter(format string) (Writer, error)

NewWriter builds writer from type.

type YAML

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

YAML outputs resources in YAML format.

func NewYAML

func NewYAML() *YAML

NewYAML initializes YAML resource output.

func (*YAML) Flush

func (y *YAML) Flush() error

Flush implements output.Writer interface.

func (*YAML) WriteHeader

func (y *YAML) WriteHeader(definition resource.Resource, withEvents bool) error

WriteHeader implements output.Writer interface.

func (*YAML) WriteResource

func (y *YAML) WriteResource(node string, r resource.Resource, event state.EventType) error

WriteResource implements output.Writer interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL