Documentation
¶
Index ¶
- type CSVOutputFormatter
- func (f *CSVOutputFormatter) AddRow(row types.Row)
- func (f *CSVOutputFormatter) AddTableMiddleware(m middlewares2.TableMiddleware)
- func (f *CSVOutputFormatter) AddTableMiddlewareAtIndex(i int, m middlewares2.TableMiddleware)
- func (f *CSVOutputFormatter) AddTableMiddlewareInFront(m middlewares2.TableMiddleware)
- func (f *CSVOutputFormatter) Output() (string, error)
- func (f *CSVOutputFormatter) SetColumnOrder(columns []types.FieldName)
- type JSONOutputFormatter
- func (J *JSONOutputFormatter) AddRow(row types.Row)
- func (J *JSONOutputFormatter) AddTableMiddleware(mw middlewares.TableMiddleware)
- func (J *JSONOutputFormatter) AddTableMiddlewareAtIndex(i int, mw middlewares.TableMiddleware)
- func (J *JSONOutputFormatter) AddTableMiddlewareInFront(mw middlewares.TableMiddleware)
- func (J *JSONOutputFormatter) Output() (string, error)
- func (f *JSONOutputFormatter) SetColumnOrder(columns []types.FieldName)
- type OutputFormatter
- type TableOutputFormatter
- func (tof *TableOutputFormatter) AddRow(row types.Row)
- func (tof *TableOutputFormatter) AddTableMiddleware(m middlewares.TableMiddleware)
- func (tof *TableOutputFormatter) AddTableMiddlewareAtIndex(i int, m middlewares.TableMiddleware)
- func (tof *TableOutputFormatter) AddTableMiddlewareInFront(m middlewares.TableMiddleware)
- func (tof *TableOutputFormatter) Output() (string, error)
- func (tof *TableOutputFormatter) SetColumnOrder(columnOrder []types.FieldName)
- type TemplateFormatter
- func (t *TemplateFormatter) AddRow(row types.Row)
- func (t *TemplateFormatter) AddTableMiddleware(m middlewares.TableMiddleware)
- func (t *TemplateFormatter) AddTableMiddlewareAtIndex(i int, m middlewares.TableMiddleware)
- func (t *TemplateFormatter) AddTableMiddlewareInFront(m middlewares.TableMiddleware)
- func (t *TemplateFormatter) Output() (string, error)
- func (t *TemplateFormatter) SetColumnOrder(columnOrder []types.FieldName)
- type YAMLOutputFormatter
- func (Y *YAMLOutputFormatter) AddRow(row types.Row)
- func (Y *YAMLOutputFormatter) AddTableMiddleware(mw middlewares.TableMiddleware)
- func (Y *YAMLOutputFormatter) AddTableMiddlewareAtIndex(i int, mw middlewares.TableMiddleware)
- func (Y *YAMLOutputFormatter) AddTableMiddlewareInFront(mw middlewares.TableMiddleware)
- func (Y *YAMLOutputFormatter) Output() (string, error)
- func (f *YAMLOutputFormatter) SetColumnOrder(columns []types.FieldName)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSVOutputFormatter ¶
type CSVOutputFormatter struct {
Table *types.Table
WithHeaders bool
Separator rune
// contains filtered or unexported fields
}
func NewCSVOutputFormatter ¶
func NewCSVOutputFormatter() *CSVOutputFormatter
func NewTSVOutputFormatter ¶
func NewTSVOutputFormatter() *CSVOutputFormatter
func (*CSVOutputFormatter) AddRow ¶
func (f *CSVOutputFormatter) AddRow(row types.Row)
func (*CSVOutputFormatter) AddTableMiddleware ¶
func (f *CSVOutputFormatter) AddTableMiddleware(m middlewares2.TableMiddleware)
func (*CSVOutputFormatter) AddTableMiddlewareAtIndex ¶
func (f *CSVOutputFormatter) AddTableMiddlewareAtIndex(i int, m middlewares2.TableMiddleware)
func (*CSVOutputFormatter) AddTableMiddlewareInFront ¶
func (f *CSVOutputFormatter) AddTableMiddlewareInFront(m middlewares2.TableMiddleware)
func (*CSVOutputFormatter) Output ¶
func (f *CSVOutputFormatter) Output() (string, error)
func (*CSVOutputFormatter) SetColumnOrder ¶
func (f *CSVOutputFormatter) SetColumnOrder(columns []types.FieldName)
type JSONOutputFormatter ¶
type JSONOutputFormatter struct {
OutputIndividualRows bool
Table *types.Table
// contains filtered or unexported fields
}
func NewJSONOutputFormatter ¶
func NewJSONOutputFormatter(outputAsObjects bool) *JSONOutputFormatter
func (*JSONOutputFormatter) AddRow ¶
func (J *JSONOutputFormatter) AddRow(row types.Row)
func (*JSONOutputFormatter) AddTableMiddleware ¶
func (J *JSONOutputFormatter) AddTableMiddleware(mw middlewares.TableMiddleware)
func (*JSONOutputFormatter) AddTableMiddlewareAtIndex ¶
func (J *JSONOutputFormatter) AddTableMiddlewareAtIndex(i int, mw middlewares.TableMiddleware)
func (*JSONOutputFormatter) AddTableMiddlewareInFront ¶
func (J *JSONOutputFormatter) AddTableMiddlewareInFront(mw middlewares.TableMiddleware)
func (*JSONOutputFormatter) Output ¶
func (J *JSONOutputFormatter) Output() (string, error)
func (*JSONOutputFormatter) SetColumnOrder ¶
func (f *JSONOutputFormatter) SetColumnOrder(columns []types.FieldName)
type OutputFormatter ¶
type OutputFormatter interface {
// TODO(manuel, 2022-11-12) We need to be able to output to a directory / to a stream / to multiple files
AddRow(row types.Row)
SetColumnOrder(columnOrder []types.FieldName)
// AddTableMiddleware adds a middleware at the end of the processing list
AddTableMiddleware(m middlewares.TableMiddleware)
AddTableMiddlewareInFront(m middlewares.TableMiddleware)
AddTableMiddlewareAtIndex(i int, m middlewares.TableMiddleware)
Output() (string, error)
}
type TableOutputFormatter ¶
type TableOutputFormatter struct {
Table *types.Table
TableFormat string
// contains filtered or unexported fields
}
func NewTableOutputFormatter ¶
func NewTableOutputFormatter(tableFormat string) *TableOutputFormatter
func (*TableOutputFormatter) AddRow ¶
func (tof *TableOutputFormatter) AddRow(row types.Row)
func (*TableOutputFormatter) AddTableMiddleware ¶
func (tof *TableOutputFormatter) AddTableMiddleware(m middlewares.TableMiddleware)
func (*TableOutputFormatter) AddTableMiddlewareAtIndex ¶
func (tof *TableOutputFormatter) AddTableMiddlewareAtIndex(i int, m middlewares.TableMiddleware)
func (*TableOutputFormatter) AddTableMiddlewareInFront ¶
func (tof *TableOutputFormatter) AddTableMiddlewareInFront(m middlewares.TableMiddleware)
func (*TableOutputFormatter) Output ¶
func (tof *TableOutputFormatter) Output() (string, error)
func (*TableOutputFormatter) SetColumnOrder ¶
func (tof *TableOutputFormatter) SetColumnOrder(columnOrder []types.FieldName)
type TemplateFormatter ¶
type TemplateFormatter struct {
Template string
Table *types.Table
TemplateFuncMaps []template.FuncMap
AdditionalData interface{}
// contains filtered or unexported fields
}
func NewTemplateOutputFormatter ¶
func NewTemplateOutputFormatter(template string, templateFuncMaps []template.FuncMap, additionalData interface{}) *TemplateFormatter
func (*TemplateFormatter) AddRow ¶
func (t *TemplateFormatter) AddRow(row types.Row)
func (*TemplateFormatter) AddTableMiddleware ¶
func (t *TemplateFormatter) AddTableMiddleware(m middlewares.TableMiddleware)
func (*TemplateFormatter) AddTableMiddlewareAtIndex ¶
func (t *TemplateFormatter) AddTableMiddlewareAtIndex(i int, m middlewares.TableMiddleware)
func (*TemplateFormatter) AddTableMiddlewareInFront ¶
func (t *TemplateFormatter) AddTableMiddlewareInFront(m middlewares.TableMiddleware)
func (*TemplateFormatter) Output ¶
func (t *TemplateFormatter) Output() (string, error)
func (*TemplateFormatter) SetColumnOrder ¶
func (t *TemplateFormatter) SetColumnOrder(columnOrder []types.FieldName)
type YAMLOutputFormatter ¶
func NewYAMLOutputFormatter ¶
func NewYAMLOutputFormatter() *YAMLOutputFormatter
func (*YAMLOutputFormatter) AddRow ¶
func (Y *YAMLOutputFormatter) AddRow(row types.Row)
func (*YAMLOutputFormatter) AddTableMiddleware ¶
func (Y *YAMLOutputFormatter) AddTableMiddleware(mw middlewares.TableMiddleware)
func (*YAMLOutputFormatter) AddTableMiddlewareAtIndex ¶
func (Y *YAMLOutputFormatter) AddTableMiddlewareAtIndex(i int, mw middlewares.TableMiddleware)
func (*YAMLOutputFormatter) AddTableMiddlewareInFront ¶
func (Y *YAMLOutputFormatter) AddTableMiddlewareInFront(mw middlewares.TableMiddleware)
func (*YAMLOutputFormatter) Output ¶
func (Y *YAMLOutputFormatter) Output() (string, error)
func (*YAMLOutputFormatter) SetColumnOrder ¶
func (f *YAMLOutputFormatter) SetColumnOrder(columns []types.FieldName)
Click to show internal directories.
Click to hide internal directories.