printer

package
v0.0.0-...-ca1ed16 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVPrinter

type CSVPrinter struct {
	Out      *os.File
	Provider string
	Data     map[string][][]string
}

func (CSVPrinter) Print

func (c CSVPrinter) Print() error

Print shows data to Standard Out

func (CSVPrinter) SetData

func (c CSVPrinter) SetData(provider string, d []resource.Resource) (Printer, error)

SetData sets data

type Printer

type Printer interface {
	Print() error
	SetData(string, []resource.Resource) (Printer, error)
}

func NewCSVPrinter

func NewCSVPrinter() Printer

func NewStdOutPrinter

func NewStdOutPrinter() Printer

NewStdOutPrinter creates a new stdout printer

func SelectPrinter

func SelectPrinter(outputType string) (Printer, error)

SelectPrinter creates new printers

type StdOutPrinter

type StdOutPrinter struct {
	Out      io.Writer
	Provider string
	Data     map[string][]resource.Resource
}

func (StdOutPrinter) Print

func (s StdOutPrinter) Print() error

Print shows data to Standard Out

func (StdOutPrinter) SetData

func (s StdOutPrinter) SetData(provider string, d []resource.Resource) (Printer, error)

SetData sets data

Jump to

Keyboard shortcuts

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