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 ¶
PrintFiles writes information about each file to output encoded in plain XML format.