Documentation
¶
Index ¶
- Constants
- type Column
- type DataIterator
- func (t *DataIterator[T]) AddItems(items []T) *DataIterator[T]
- func (t DataIterator[T]) Count() int
- func (t DataIterator[T]) GetJson() (string, error)
- func (t DataIterator[T]) GetYaml() (string, error)
- func (t DataIterator[T]) IsStyleLight() bool
- func (t DataIterator[T]) Print(more ...bool)
- func (t *DataIterator[T]) Render(more ...bool) []string
- func (t *DataIterator[T]) SetStyle(style table.Style)
- type DataTable
- func (t *DataTable[T]) AddColumns(columns []Column[T]) *DataTable[T]
- func (t *DataTable[T]) AddItems(items []T) *DataTable[T]
- func (t DataTable[T]) Count() int
- func (t DataTable[T]) GetJson() (string, error)
- func (t DataTable[T]) GetYaml() (string, error)
- func (t DataTable[T]) IsStyleLight() bool
- func (t DataTable[T]) Print(more ...bool)
- func (t *DataTable[T]) Render(more ...bool) string
- func (t *DataTable[T]) SetStyle(style table.Style)
- type Field
Constants ¶
View Source
const (
DEFAULT_ITERATOR_COLUMN_MAX_WIDTH = 100
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataIterator ¶
type DataIterator[T any] struct { Items []T Fields []Field[T] MoreFields []Field[T] ValueColumnMaxWidth int Title string Style table.Style AutoIndex bool SortBy []table.SortBy SeparateRows bool Output io.Writer // contains filtered or unexported fields }
func (*DataIterator[T]) AddItems ¶
func (t *DataIterator[T]) AddItems(items []T) *DataIterator[T]
func (DataIterator[T]) Count ¶
func (t DataIterator[T]) Count() int
func (DataIterator[T]) GetJson ¶
func (t DataIterator[T]) GetJson() (string, error)
func (DataIterator[T]) GetYaml ¶
func (t DataIterator[T]) GetYaml() (string, error)
func (DataIterator[T]) IsStyleLight ¶
func (t DataIterator[T]) IsStyleLight() bool
func (DataIterator[T]) Print ¶
func (t DataIterator[T]) Print(more ...bool)
func (*DataIterator[T]) Render ¶
func (t *DataIterator[T]) Render(more ...bool) []string
func (*DataIterator[T]) SetStyle ¶
func (t *DataIterator[T]) SetStyle(style table.Style)
type DataTable ¶
type DataTable[T any] struct { Items []T Columns []Column[T] MoreColumns []Column[T] Title string Style table.Style AutoIndex bool SortBy []table.SortBy SeparateRows bool Output io.Writer // contains filtered or unexported fields }
func (*DataTable[T]) AddColumns ¶
func (DataTable[T]) IsStyleLight ¶
Click to show internal directories.
Click to hide internal directories.