Documentation ¶
Index ¶
- type OutputFormatter
- func (f *OutputFormatter) AddRow(row types.Row)
- func (f *OutputFormatter) AddTableMiddleware(mw middlewares.TableMiddleware)
- func (f *OutputFormatter) AddTableMiddlewareAtIndex(i int, mw middlewares.TableMiddleware)
- func (f *OutputFormatter) AddTableMiddlewareInFront(mw middlewares.TableMiddleware)
- func (f *OutputFormatter) GetTable() (*types.Table, error)
- func (f *OutputFormatter) Output(ctx context.Context, w io.Writer) error
- func (f *OutputFormatter) SetColumnOrder(columns []types.FieldName)
- type OutputFormatterOption
- func WithOutputFile(file string) OutputFormatterOption
- func WithOutputFileTemplate(outputFileTemplate string) OutputFormatterOption
- func WithOutputIndividualRows(outputIndividualRows bool) OutputFormatterOption
- func WithOutputMultipleFiles(outputMultipleFiles bool) OutputFormatterOption
- func WithTable(table *types.Table) OutputFormatterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutputFormatter ¶
type OutputFormatter struct { OutputIndividualRows bool OutputFile string OutputFileTemplate string OutputMultipleFiles bool Table *types.Table // contains filtered or unexported fields }
func NewOutputFormatter ¶
func NewOutputFormatter(options ...OutputFormatterOption) *OutputFormatter
func (*OutputFormatter) AddRow ¶
func (f *OutputFormatter) AddRow(row types.Row)
func (*OutputFormatter) AddTableMiddleware ¶
func (f *OutputFormatter) AddTableMiddleware(mw middlewares.TableMiddleware)
func (*OutputFormatter) AddTableMiddlewareAtIndex ¶
func (f *OutputFormatter) AddTableMiddlewareAtIndex(i int, mw middlewares.TableMiddleware)
func (*OutputFormatter) AddTableMiddlewareInFront ¶
func (f *OutputFormatter) AddTableMiddlewareInFront(mw middlewares.TableMiddleware)
func (*OutputFormatter) SetColumnOrder ¶
func (f *OutputFormatter) SetColumnOrder(columns []types.FieldName)
type OutputFormatterOption ¶
type OutputFormatterOption func(*OutputFormatter)
func WithOutputFile ¶
func WithOutputFile(file string) OutputFormatterOption
func WithOutputFileTemplate ¶
func WithOutputFileTemplate(outputFileTemplate string) OutputFormatterOption
func WithOutputIndividualRows ¶
func WithOutputIndividualRows(outputIndividualRows bool) OutputFormatterOption
func WithOutputMultipleFiles ¶
func WithOutputMultipleFiles(outputMultipleFiles bool) OutputFormatterOption
func WithTable ¶ added in v0.2.72
func WithTable(table *types.Table) OutputFormatterOption
Click to show internal directories.
Click to hide internal directories.