Discover Packages
github.com/kieron-pivotal/bosh-cli
ui
table
package
Version:
v0.0.99
Opens a new window with list of versions in this module.
Published: Nov 5, 2016
License: Apache-2.0
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation Source Files Index Constants Variables Functions Types type ColumnSort type Section type Sorting type Table type Value type ValueBool type ValueBytes type ValueError type ValueFmt type ValueInt type ValueInterface type ValueNone type ValueString type ValueStrings type ValueSuffix type ValueTime type ValueVersion type Writer (s) Len() (s) Less(i, j) (s) Swap(i, j) (t) AsRows() (t) Print(w) NewValueBool(b) (t) Compare(other) (t) String() (t) Value() NewValueBytes(i) NewValueMegaBytes(i) (t) Compare(other) (t) String() (t) Value() NewValueError(e) (t) Compare(other) (t) String() (t) Value() NewValueFmt(v, error) (t) Compare(other) (t) Fprintf(w, pattern, rest) (t) String() (t) Value() NewValueInt(i) (t) Compare(other) (t) String() (t) Value() NewValueInterface(i) (t) Compare(other) (t) String() (t) Value() (t) Compare(other) (t) String() (t) Value() NewValueString(s) (t) Compare(other) (t) String() (t) Value() NewValueStrings(s) (t) Compare(other) (t) String() (t) Value() NewValueSuffix(v, s) (t) Compare(other) (t) String() (t) Value() NewValueTime(t) (t) Compare(other) (t) String() (t) Value() NewValueVersion(v) (t) Compare(other) (t) String() (t) Value() NewWriter(w, emptyStr, bgStr, borderStr) (w) Flush() (w) Write(vals)
Documentation
¶
type ColumnSort struct {
Column int
Asc bool
}
type Section struct {
FirstColumn Value
Rows [][]Value
}
type Sorting struct {
SortBy []ColumnSort
Rows [][]Value
}
func (s Sorting) Len() int
func (s Sorting) Less(i, j int ) bool
func (s Sorting) Swap(i, j int )
type Table struct {
Title string
Content string
Header []string
HeaderVals []Value
SortBy []ColumnSort
Sections []Section
Rows [][]Value
Notes []string
FillFirstColumn bool
BackgroundStr string
BorderStr string
}
func (t Table) AsRows() [][]Value
func (t Table) Print(w io.Writer) error
type Value interface {
Value() Value
String() string
Compare(Value) int
}
type ValueBool struct {
B bool
}
func NewValueBool (b bool ) ValueBool
func (t ValueBool) Compare(other Value) int
func (t ValueBool) String() string
func (t ValueBool) Value() Value
type ValueBytes struct {
I uint64
}
func NewValueBytes (i uint64 ) ValueBytes
func NewValueMegaBytes (i uint64 ) ValueBytes
func (t ValueBytes) Compare(other Value) int
func (t ValueBytes) String() string
func (t ValueBytes) Value() Value
type ValueError struct {
E error
}
func NewValueError (e error ) ValueError
func (t ValueError) Compare(other Value) int
func (t ValueError) String() string
func (t ValueError) Value() Value
type ValueFmt struct {
V Value
Error bool
Func func (string , ...interface {}) string
}
func NewValueFmt (v Value, error bool ) ValueFmt
func (t ValueFmt) Compare(other Value) int
func (t ValueFmt) Fprintf(w io.Writer, pattern string , rest ...interface {}) (int , error )
func (t ValueFmt) String() string
func (t ValueFmt) Value() Value
type ValueInt struct {
I int
}
func NewValueInt (i int ) ValueInt
func (t ValueInt) Compare(other Value) int
func (t ValueInt) String() string
func (t ValueInt) Value() Value
type ValueInterface struct {
I interface {}
}
func NewValueInterface (i interface {}) ValueInterface
func (t ValueInterface) Compare(other Value) int
func (t ValueInterface) String() string
func (t ValueInterface) Value() Value
func (t ValueNone) Compare(other Value) int
func (t ValueNone) String() string
func (t ValueNone) Value() Value
type ValueString struct {
S string
}
func NewValueString (s string ) ValueString
func (t ValueString) Compare(other Value) int
func (t ValueString) String() string
func (t ValueString) Value() Value
type ValueStrings struct {
S []string
}
func NewValueStrings (s []string ) ValueStrings
func (t ValueStrings) Compare(other Value) int
func (t ValueStrings) String() string
func (t ValueStrings) Value() Value
type ValueSuffix struct {
V Value
Suffix string
}
func NewValueSuffix (v Value, s string ) ValueSuffix
func (t ValueSuffix) Compare(other Value) int
func (t ValueSuffix) String() string
func (t ValueSuffix) Value() Value
type ValueTime struct {
T time.Time
}
func NewValueTime (t time.Time) ValueTime
func (t ValueTime) Compare(other Value) int
func (t ValueTime) String() string
func (t ValueTime) Value() Value
type ValueVersion struct {
V semver.Version
}
func NewValueVersion (v semver.Version) ValueVersion
func (t ValueVersion) Compare(other Value) int
func (t ValueVersion) String() string
func (t ValueVersion) Value() Value
func NewWriter (w io.Writer, emptyStr, bgStr, borderStr string ) *Writer
func (w *Writer) Flush() error
func (w *Writer) Write(vals []Value)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.