tablebuilder

package
v0.0.0-...-1ccb659 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Values []any
	Config table.ColumnConfig
}

func (*Column) SetNoDataValue

func (col *Column) SetNoDataValue()

func (*Column) SetValue

func (col *Column) SetValue(value any)

type Columns

type Columns []Column

func (Columns) SetNoDataValue

func (col Columns) SetNoDataValue()

type TableBuilder

type TableBuilder struct {
	// contains filtered or unexported fields
}

func NewTableBuilder

func NewTableBuilder(config TableConfig) *TableBuilder

func (*TableBuilder) Build

func (tb *TableBuilder) Build()

func (*TableBuilder) SetColors

func (tb *TableBuilder) SetColors()

func (*TableBuilder) SetColumns

func (tb *TableBuilder) SetColumns()

func (*TableBuilder) SetRows

func (tb *TableBuilder) SetRows()

func (*TableBuilder) SetStyle

func (tb *TableBuilder) SetStyle()

type TableColors

type TableColors struct {
	Title  text.Color
	Header text.Color
	Row    text.Color
	Footer text.Color
	Index  text.Color
}

func GetTableColorsFromString

func GetTableColorsFromString(color string) TableColors

type TableConfig

type TableConfig struct {
	Name         string
	Tag          string
	Colors       TableColors
	Style        table.Style
	Columns      []Column
	SortConfig   []table.SortBy
	RowsCount    int
	ColumnsCount int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL