Documentation ¶
Index ¶
- Variables
- type BoxStyle
- type Color
- type ColorOptions
- type Colors
- type FormatOptions
- type Options
- type OutputFormatter
- func (tof *OutputFormatter) AddRow(row types.Row)
- func (tof *OutputFormatter) AddTableMiddleware(m middlewares.TableMiddleware)
- func (tof *OutputFormatter) AddTableMiddlewareAtIndex(i int, m middlewares.TableMiddleware)
- func (tof *OutputFormatter) AddTableMiddlewareInFront(m middlewares.TableMiddleware)
- func (tof *OutputFormatter) GetTable() (*types.Table, error)
- func (tof *OutputFormatter) Output(ctx context.Context, w io.Writer) error
- func (tof *OutputFormatter) SetColumnOrder(columnOrder []types.FieldName)
- type OutputFormatterOption
- func WithOutputFile(outputFile string) OutputFormatterOption
- func WithOutputFileTemplate(outputFileTemplate string) OutputFormatterOption
- func WithOutputMultipleFiles(outputMultipleFiles bool) OutputFormatterOption
- func WithPrintTableStyle(printTableStyle bool) OutputFormatterOption
- func WithTableStyle(tableStyle string) OutputFormatterOption
- func WithTableStyleFile(tableStyleFile string) OutputFormatterOption
- type Style
- type TitleOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TableStyles = map[string]table.Style{ "default": table.StyleDefault, "bold": table.StyleBold, "bright": table.StyleColoredBright, "dark": table.StyleColoredDark, "black-on-blue": table.StyleColoredBlackOnBlueWhite, "black-on-cyan": table.StyleColoredBlackOnCyanWhite, "black-on-green": table.StyleColoredBlackOnGreenWhite, "black-on-magenta": table.StyleColoredBlackOnMagentaWhite, "black-on-yellow": table.StyleColoredBlackOnYellowWhite, "black-on-red": table.StyleColoredBlackOnRedWhite, "blue-on-black": table.StyleColoredBlueWhiteOnBlack, "cyan-on-black": table.StyleColoredCyanWhiteOnBlack, "green-on-black": table.StyleColoredGreenWhiteOnBlack, "magenta-on-black": table.StyleColoredMagentaWhiteOnBlack, "red-on-black": table.StyleColoredRedWhiteOnBlack, "yellow-on-black": table.StyleColoredYellowWhiteOnBlack, "double": table.StyleDouble, "light": table.StyleLight, "rounded": table.StyleRounded, } )
Functions ¶
This section is empty.
Types ¶
type BoxStyle ¶ added in v0.2.68
type BoxStyle struct { BottomLeft string `yaml:"bottom-left,omitempty,flow"` BottomRight string `yaml:"bottom-right,omitempty,flow"` BottomSeparator string `yaml:"bottom-separator,omitempty,flow"` Left string `yaml:"left,omitempty,flow"` LeftSeparator string `yaml:"left-separator,omitempty,flow"` MiddleHorizontal string `yaml:"middle-horizontal,omitempty,flow"` MiddleSeparator string `yaml:"middle-separator,omitempty,flow"` MiddleVertical string `yaml:"middle-vertical,omitempty,flow"` PaddingLeft string `yaml:"padding-left,omitempty,flow"` PaddingRight string `yaml:"padding-right,omitempty,flow"` PageSeparator string `yaml:"page-separator,omitempty,flow,flow"` Right string `yaml:"right,omitempty,flow"` RightSeparator string `yaml:"right-separator,omitempty,flow"` TopLeft string `yaml:"top-left,omitempty,flow"` TopRight string `yaml:"top-right,omitempty,flow"` TopSeparator string `yaml:"top-separator,omitempty,flow"` UnfinishedRow string `yaml:"unfinished-row,omitempty,flow"` }
type ColorOptions ¶ added in v0.2.68
type FormatOptions ¶ added in v0.2.68
type OutputFormatter ¶
type OutputFormatter struct { Table *types.Table OutputFileTemplate string OutputMultipleFiles bool TableFormat string TableStyle table.Style TableStyleFile string OutputFile string PrintTableStyle bool // contains filtered or unexported fields }
func NewOutputFormatter ¶
func NewOutputFormatter(tableFormat string, opts ...OutputFormatterOption) *OutputFormatter
func (*OutputFormatter) AddRow ¶
func (tof *OutputFormatter) AddRow(row types.Row)
func (*OutputFormatter) AddTableMiddleware ¶
func (tof *OutputFormatter) AddTableMiddleware(m middlewares.TableMiddleware)
func (*OutputFormatter) AddTableMiddlewareAtIndex ¶
func (tof *OutputFormatter) AddTableMiddlewareAtIndex(i int, m middlewares.TableMiddleware)
func (*OutputFormatter) AddTableMiddlewareInFront ¶
func (tof *OutputFormatter) AddTableMiddlewareInFront(m middlewares.TableMiddleware)
func (*OutputFormatter) SetColumnOrder ¶
func (tof *OutputFormatter) SetColumnOrder(columnOrder []types.FieldName)
type OutputFormatterOption ¶
type OutputFormatterOption func(*OutputFormatter)
func WithOutputFile ¶
func WithOutputFile(outputFile string) OutputFormatterOption
func WithOutputFileTemplate ¶
func WithOutputFileTemplate(outputFileTemplate string) OutputFormatterOption
func WithOutputMultipleFiles ¶
func WithOutputMultipleFiles(outputMultipleFiles bool) OutputFormatterOption
func WithPrintTableStyle ¶ added in v0.2.68
func WithPrintTableStyle(printTableStyle bool) OutputFormatterOption
func WithTableStyle ¶ added in v0.2.68
func WithTableStyle(tableStyle string) OutputFormatterOption
func WithTableStyleFile ¶ added in v0.2.68
func WithTableStyleFile(tableStyleFile string) OutputFormatterOption
type Style ¶ added in v0.2.68
type Style struct { Name string `yaml:"name"` Box BoxStyle `yaml:"box"` Color ColorOptions `yaml:"color"` Format FormatOptions `yaml:"format"` Options Options `yaml:"options"` Title TitleOptions `yaml:"title"` }
type TitleOptions ¶ added in v0.2.68
Click to show internal directories.
Click to hide internal directories.