output

package
v0.0.0-...-a7dc4af Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package output contains the OutputFormater interface and implementations for a various set of different output formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONFormat

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

JSONFormat defines how information is published.

func (*JSONFormat) PrintFiles

func (jf *JSONFormat) PrintFiles(fs []types.FileInfo)

PrintFiles writes information about each file in one line in the configured output stream

func (*JSONFormat) PrintJobDetails

func (jf *JSONFormat) PrintJobDetails(ji types.JobInfo)

func (*JSONFormat) PrintMachine

func (jf *JSONFormat) PrintMachine(m types.Machine)

type OutputFormater

type OutputFormater interface {
	PrintFiles(fs []types.FileInfo) // output format of "uc ls"
	PrintJobDetails(ji types.JobInfo)
	PrintMachine(m types.Machine)
}

OutputFormater is an interface which defines all required functions needed for the uc client to print out the results.

func MakeOutputFormater

func MakeOutputFormater(format string) OutputFormater

MakeOutputFormater creates an output formater depending on the chosen output format.

type StandardFormat

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

StandardFormat defines how information is published.

func (*StandardFormat) PrintFiles

func (sf *StandardFormat) PrintFiles(fs []types.FileInfo)

PrintFiles writes information about each file in one line in the configured output stream

func (*StandardFormat) PrintJobDetails

func (sf *StandardFormat) PrintJobDetails(ji types.JobInfo)

func (*StandardFormat) PrintMachine

func (sf *StandardFormat) PrintMachine(m types.Machine)

type XMLFormat

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

XMLFormat defines how information is published.

func (*XMLFormat) PrintFiles

func (xf *XMLFormat) PrintFiles(fs []types.FileInfo)

PrintFiles writes information about each file to output encoded in plain XML format.

func (*XMLFormat) PrintJobDetails

func (xf *XMLFormat) PrintJobDetails(ji types.JobInfo)

func (*XMLFormat) PrintMachine

func (xf *XMLFormat) PrintMachine(m types.Machine)

Jump to

Keyboard shortcuts

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