Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnsChannelMiddleware ¶ added in v0.3.6
type ColumnsChannelMiddleware struct {
// contains filtered or unexported fields
}
func NewColumnsChannelMiddleware ¶ added in v0.3.6
func NewColumnsChannelMiddleware(c chan<- []types.FieldName) *ColumnsChannelMiddleware
type NullTableMiddleware ¶ added in v0.3.3
type NullTableMiddleware struct{}
The NullTableMiddleware is only used to keep rows in the TableProcessor.Table.
type OutputChannelMiddleware ¶ added in v0.3.6
type OutputChannelMiddleware[T interface{ ~string }] struct { // contains filtered or unexported fields }
func NewOutputChannelMiddleware ¶ added in v0.3.6
func NewOutputChannelMiddleware[T interface{ ~string }](formatter formatters.RowOutputFormatter, c chan<- T) *OutputChannelMiddleware[T]
type OutputMiddleware ¶ added in v0.3.1
type OutputMiddleware struct {
// contains filtered or unexported fields
}
func NewOutputMiddleware ¶ added in v0.3.1
func NewOutputMiddleware(formatter formatters.TableOutputFormatter, writer io.Writer) *OutputMiddleware
type SortByMiddleware ¶
type SortByMiddleware struct {
// contains filtered or unexported fields
}
SortByMiddleware sorts the table by the given columns, in ascending or descending order. If the column contains rows with the same type, the order is undefined.
func NewSortByMiddlewareFromColumns ¶
func NewSortByMiddlewareFromColumns(columns ...string) *SortByMiddleware
NewSortByMiddlewareFromColumns creates a new SortByMiddleware from the given columns. To sort in descending order, prefix the column name with a minus sign.
Example:
NewSortByMiddlewareFromColumns("name", "-age")
This will sort by name in ascending order and by age in descending order.
Click to show internal directories.
Click to hide internal directories.