Versions in this module Expand all Collapse all v1 v1.0.3 Apr 5, 2024 Changes in this version + const ARROW_DOWN + const ARROW_UP + const BG_COLOR + const BG_COLOR_ODD + const BLUE + const CIRCLE + const DIAMOND + const GREEN + const HEADER_COLOR + const HeadlessTableTemplate + const HeatMapTemplate + const InlineHeatMapTemplate + const LIGHT_GREEN + const MEDIUM_SQUARE + const ORANGE + const RED + const ReportMailTemplate + const SQUARE + const TEXT_COLOR + const TableTemplate + const WHITE_CIRCLE + var CAT_DESCRIPTORS = [5]string + var DefaultBorder = Border + var DoubleBorder = Border + var HiddenBorder = Border + var RoundedBorder = Border + var ThickBorder = Border + func FormatString(txt string, length int, align TextAlign) string + type Border struct + BL_CORNER string + BOT_DEL string + BR_CORNER string + CROSS string + H_LINE string + LEFT_DEL string + RIGHT_DEL string + Size int + TL_CORNER string + TOP_DEL string + TR_CORNER string + V_LINE string + type Cell struct + Alignment TextAlign + Link string + Marker int + Text string + Value float64 + type ConsoleRenderer struct + Styles Styles + func NewConsoleRenderer() *ConsoleRenderer + func (cr *ConsoleRenderer) AddStyle(style term.Style) int + func (cr *ConsoleRenderer) Append(txt string, style term.Style) + func (cr *ConsoleRenderer) Marker(mk int, striped bool) term.Style + func (cr *ConsoleRenderer) String() string + type FilterDef struct + Comparator int + Header string + Value string + func BuildFilterDef(txt string) FilterDef + type FilterFunc func(r *Row) bool + type FormatterFn func(values []float64, index int) (string, int, int) + type Formatters struct + Block FormatterFn + BuySell FormatterFn + Categorized FormatterFn + CategorizedNorm FormatterFn + ColorBlock FormatterFn + Float FormatterFn + Histo FormatterFn + HistoBlock FormatterFn + HistoInt FormatterFn + Int FormatterFn + MarkedFloat FormatterFn + Percentage FormatterFn + Relation FormatterFn + func DefaultFormatters() Formatters + type MarkedText struct + Marker int + Text string + type MarkedTextList struct + Items []MarkedText + func NewMarkedTextList() *MarkedTextList + func (m *MarkedTextList) Add(txt string, marker int) + func (m *MarkedTextList) AddEmpty() + type Row struct + Cells []Cell + Size int + func (tr *Row) AddAlignedText(txt string, marker, alignment int) *Row + func (tr *Row) AddBlock(positive bool) *Row + func (tr *Row) AddCategorizedFloat(v, l1, l2, l3 float64) *Row + func (tr *Row) AddCategorizedPercentage(v, steps float64) *Row + func (tr *Row) AddCategoryBlock(c float64) *Row + func (tr *Row) AddCenteredText(txt string, marker int) *Row + func (tr *Row) AddChange(change, changePercent float64) *Row + func (tr *Row) AddChangePercent(v float64) *Row + func (tr *Row) AddColouredPercentage(v, steps float64) *Row + func (tr *Row) AddDate(txt string) *Row + func (tr *Row) AddDefaultText(txt string) *Row + func (tr *Row) AddEmpty() *Row + func (tr *Row) AddExtendedFloat(v float64, pattern string, marker int) *Row + func (tr *Row) AddFlaggedFloat(v float64, flag bool) *Row + func (tr *Row) AddFloat(v float64, marker int) *Row + func (tr *Row) AddHisto(p, c float64) *Row + func (tr *Row) AddHistoBlock(prev, cur float64) *Row + func (tr *Row) AddInt(v int, marker int) *Row + func (tr *Row) AddLink(txt, url string) *Row + func (tr *Row) AddMarkedBlock(marker int) *Row + func (tr *Row) AddMarkedFloat(v float64) *Row + func (tr *Row) AddMarkedFloatThreshold(v, t float64) *Row + func (tr *Row) AddMarkedInt(v int) *Row + func (tr *Row) AddMarkedPercentage(v, steps float64) *Row + func (tr *Row) AddRelation(first, second float64) *Row + func (tr *Row) AddRelationPercentage(first, second float64) *Row + func (tr *Row) AddText(txt string, marker int) *Row + func (tr *Row) AddTextRight(txt string, marker int) *Row + func (tr *Row) AddTime(txt string) *Row + type Styles struct + ClassAMarker term.Style + ClassAMarkerStriped term.Style + ClassBMarker term.Style + ClassBMarkerStriped term.Style + ClassCMarker term.Style + ClassCMarkerStriped term.Style + ClassDMarker term.Style + ClassDMarkerStriped term.Style + ClassEMarker term.Style + ClassEMarkerStriped term.Style + ClassFMarker term.Style + ClassFMarkerStriped term.Style + Header term.Style + HeaderStriped term.Style + NegativeMarker term.Style + NegativeMarkerStriped term.Style + PositiveMarker term.Style + PositiveMarkerStriped term.Style + Text term.Style + TextStriped term.Style + type Table struct + BorderStyle Border + Count int + Created string + Description string + Formatters Formatters + HeaderSizes []int + Limit int + PaddingSize int + Rows []Row + TableHeaders []string + func New() *Table + func NewTable(name string, headers []string) *Table + func (rt *Table) AddColumn(name string, values []float64, fn FormatterFn) + func (rt *Table) AddIntColumn(name string, values []int) + func (rt *Table) AddMarkedTextColumn(name string, values []MarkedText) + func (rt *Table) AddStringColumn(name string, values []string) + func (rt *Table) AddStyle(fg, bg string, bold bool) int + func (rt *Table) AddTableHeader(name string) + func (rt *Table) Border(border Border) *Table + func (rt *Table) BuildHeadlessHtml() string + func (rt *Table) BuildHtml() string + func (rt *Table) BuildPlainHtml() string + func (rt *Table) CreateRow() *Row + func (rt *Table) DelimiterLine(txt string) *Row + func (rt *Table) FindColumnIndex(name string) int + func (rt *Table) Headers(headers ...string) *Table + func (rt *Table) JSON(w io.Writer) error + func (rt *Table) Name(name string) *Table + func (rt *Table) Padding(padding int) *Table + func (rt *Table) RebuildSizes() + func (rt *Table) Recent(count int) *Table + func (rt *Table) SetText(row, col int, txt string) + func (rt *Table) Sort(name string) + func (rt *Table) SortReverse(name string) + func (rt *Table) String() string + func (rt *Table) TableHeader(idx int, name string) *Table + func (rt *Table) Width() int + func (tr *Table) Filter(f string) *Table + func (tr *Table) FilterRecent(num int) *Table + func (tr *Table) Sub(start, end int) *Table + func (tr *Table) Top(num int) *Table + type TableCell struct + Marker int + Value string + type TableRow struct + Cells []TableCell + type TextAlign int + const AlignCenter + const AlignLeft + const AlignRight