Documentation ¶
Index ¶
- type OutputFormatter
- func (t *OutputFormatter) AddRow(row types.Row)
- func (t *OutputFormatter) AddTableMiddleware(m middlewares.TableMiddleware)
- func (t *OutputFormatter) AddTableMiddlewareAtIndex(i int, m middlewares.TableMiddleware)
- func (t *OutputFormatter) AddTableMiddlewareInFront(m middlewares.TableMiddleware)
- func (t *OutputFormatter) GetTable() (*types.Table, error)
- func (t *OutputFormatter) Output(ctx context.Context, w io.Writer) error
- func (t *OutputFormatter) SetColumnOrder(columnOrder []types.FieldName)
- type OutputFormatterOption
- func WithAdditionalData(additionalData interface{}) OutputFormatterOption
- func WithOutputFile(outputFile string) OutputFormatterOption
- func WithOutputFileTemplate(outputFileTemplate string) OutputFormatterOption
- func WithOutputMultipleFiles(outputMultipleFiles bool) OutputFormatterOption
- func WithTemplateFuncMaps(templateFuncMaps []template.FuncMap) OutputFormatterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutputFormatter ¶
type OutputFormatter struct { Template string Table *types.Table TemplateFuncMaps []template.FuncMap OutputFileTemplate string OutputMultipleFiles bool OutputFile string AdditionalData interface{} // contains filtered or unexported fields }
func NewOutputFormatter ¶
func NewOutputFormatter(template string, opts ...OutputFormatterOption) *OutputFormatter
NewOutputFormatter creates a new OutputFormatter.
TODO(manuel, 2023-02-19) This is quite an ugly constructor signature. See: https://github.com/go-go-golems/glazed/issues/147
func (*OutputFormatter) AddRow ¶
func (t *OutputFormatter) AddRow(row types.Row)
func (*OutputFormatter) AddTableMiddleware ¶
func (t *OutputFormatter) AddTableMiddleware(m middlewares.TableMiddleware)
func (*OutputFormatter) AddTableMiddlewareAtIndex ¶
func (t *OutputFormatter) AddTableMiddlewareAtIndex(i int, m middlewares.TableMiddleware)
func (*OutputFormatter) AddTableMiddlewareInFront ¶
func (t *OutputFormatter) AddTableMiddlewareInFront(m middlewares.TableMiddleware)
func (*OutputFormatter) SetColumnOrder ¶
func (t *OutputFormatter) SetColumnOrder(columnOrder []types.FieldName)
type OutputFormatterOption ¶
type OutputFormatterOption func(*OutputFormatter)
func WithAdditionalData ¶
func WithAdditionalData(additionalData interface{}) OutputFormatterOption
func WithOutputFile ¶
func WithOutputFile(outputFile string) OutputFormatterOption
func WithOutputFileTemplate ¶
func WithOutputFileTemplate(outputFileTemplate string) OutputFormatterOption
func WithOutputMultipleFiles ¶
func WithOutputMultipleFiles(outputMultipleFiles bool) OutputFormatterOption
func WithTemplateFuncMaps ¶
func WithTemplateFuncMaps(templateFuncMaps []template.FuncMap) OutputFormatterOption
Click to show internal directories.
Click to hide internal directories.