Documentation ¶
Index ¶
- Constants
- func BytesFormatter(n *jnode.Node) string
- func DurationMillisFormatter(n *jnode.Node) string
- func Nav(n *jnode.Node, path []string) *jnode.Node
- func NumberFormatter(n *jnode.Node) string
- func ParseTime(s string) (time.Time, error)
- func RelativeTimestampFormatter(n *jnode.Node) string
- func TimestampFormatter(n *jnode.Node) string
- func ToResult(value interface{}) (*jnode.Node, error)
- type CSVPrinter
- type ColumnFunction
- type DiffPrinter
- type Filter
- type Formatter
- type Formatters
- type Interface
- type JSONPrinter
- type NonePrinter
- type PathSupport
- type TablePrinter
- type ValuePrinter
- type VerticalPrinter
- type YAMLPrinter
Constants ¶
View Source
const ( RFC3339Millis = "2006-01-02T15:04:05.999Z07:00" GODefaultFormat = "2006-01-02 15:04:05.999999999 -0700 MST" )
Variables ¶
This section is empty.
Functions ¶
func BytesFormatter ¶ added in v0.4.12
func BytesFormatter(n *jnode.Node) string
func DurationMillisFormatter ¶ added in v0.4.14
func DurationMillisFormatter(n *jnode.Node) string
func NumberFormatter ¶ added in v0.4.14
func NumberFormatter(n *jnode.Node) string
func RelativeTimestampFormatter ¶
func RelativeTimestampFormatter(n *jnode.Node) string
func TimestampFormatter ¶
func TimestampFormatter(n *jnode.Node) string
Types ¶
type CSVPrinter ¶
type CSVPrinter struct { PathSupport NoHeaders bool Columns []string Formatters Formatters }
func (*CSVPrinter) PrintResult ¶
func (p *CSVPrinter) PrintResult(w io.Writer, result *jnode.Node) int
type ColumnFunction ¶ added in v0.4.17
type ColumnFunction func(n *jnode.Node) interface{}
type DiffPrinter ¶ added in v0.4.14
type DiffPrinter struct { PathSupport DiffColumn string VersionColumn string LabelColumns []string Context int Formatters }
func (*DiffPrinter) PrintResult ¶ added in v0.4.14
func (d *DiffPrinter) PrintResult(w io.Writer, result *jnode.Node) int
type Formatters ¶
func (Formatters) Format ¶
func (f Formatters) Format(columnName string, n *jnode.Node) string
type JSONPrinter ¶
type JSONPrinter struct{}
func (*JSONPrinter) PrintResult ¶
func (p *JSONPrinter) PrintResult(w io.Writer, n *jnode.Node) int
type NonePrinter ¶ added in v0.4.9
type NonePrinter struct{}
func (*NonePrinter) PrintResult ¶ added in v0.4.9
func (p *NonePrinter) PrintResult(w io.Writer, result *jnode.Node) int
type PathSupport ¶ added in v0.4.8
type PathSupport struct { Filter Path []string SortBy []string ComputedColumns map[string]ColumnFunction Limit int }
func (*PathSupport) GetRows ¶ added in v0.4.30
func (p *PathSupport) GetRows(result *jnode.Node) []*jnode.Node
type TablePrinter ¶
type TablePrinter struct { PathSupport NoHeaders bool Columns []string Formatters Formatters }
func (*TablePrinter) PrintHeader ¶
func (p *TablePrinter) PrintHeader(w io.Writer)
func (*TablePrinter) PrintResult ¶
func (p *TablePrinter) PrintResult(w io.Writer, result *jnode.Node) int
type ValuePrinter ¶ added in v0.4.8
type ValuePrinter struct { PathSupport Format string }
func (*ValuePrinter) PrintResult ¶ added in v0.4.8
func (p *ValuePrinter) PrintResult(w io.Writer, result *jnode.Node) int
type VerticalPrinter ¶ added in v0.4.14
type VerticalPrinter struct { PathSupport Columns []string Formatters }
func (*VerticalPrinter) PrintResult ¶ added in v0.4.14
func (p *VerticalPrinter) PrintResult(w io.Writer, result *jnode.Node) int
type YAMLPrinter ¶
type YAMLPrinter struct{}
func (*YAMLPrinter) PrintResult ¶
func (p *YAMLPrinter) PrintResult(w io.Writer, n *jnode.Node) int
Click to show internal directories.
Click to hide internal directories.