out

package
v0.0.0-...-2bbe97e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Name     string
	Elements []Renderer
}

func NewContainer

func NewContainer(name string) *Container

func (*Container) Add

func (b *Container) Add(el Renderer)

func (*Container) JSON

func (b *Container) JSON(mp map[string]interface{})

func (*Container) Table

func (b *Container) Table(tw *tabwriter.Writer)

type Empty

type Empty struct{}

func NewEmpty

func NewEmpty() *Empty

func (*Empty) JSON

func (v *Empty) JSON(ms map[string]interface{})

func (*Empty) Table

func (v *Empty) Table(tw *tabwriter.Writer)

type List

type List struct {
	Name     string
	Elements []interface{}
}

func NewList

func NewList(name string) *List

func (*List) Add

func (l *List) Add(el interface{})

func (*List) JSON

func (l *List) JSON(ms map[string]interface{})

func (*List) Table

func (l *List) Table(tw *tabwriter.Writer)

type NewLine

type NewLine struct{}

func NewNewLine

func NewNewLine() *NewLine

func (*NewLine) JSON

func (v *NewLine) JSON(ms map[string]interface{})

func (*NewLine) Table

func (v *NewLine) Table(tw *tabwriter.Writer)

type Output

type Output struct {
	Writer       io.Writer
	RenderFunc   func()
	ProgressFunc func(string)
	Element      Renderer
	ExitCode     int
}

func (*Output) NoProgressFunc

func (l *Output) NoProgressFunc(text string)

func (*Output) Progress

func (o *Output) Progress(text string)

func (*Output) Render

func (o *Output) Render()

func (*Output) RenderJSON

func (l *Output) RenderJSON()

func (*Output) RenderTable

func (l *Output) RenderTable()

func (*Output) Set

func (o *Output) Set(el Renderer)

func (*Output) TextProgressFunc

func (l *Output) TextProgressFunc(text string)

type Renderer

type Renderer interface {
	Table(*tabwriter.Writer)
	JSON(map[string]interface{})
}

type Success

type Success struct{}

func NewSuccess

func NewSuccess() *Success

func (*Success) JSON

func (v *Success) JSON(ms map[string]interface{})

func (*Success) Table

func (v *Success) Table(tw *tabwriter.Writer)

type Table

type Table struct {
	Name    string
	Headers []string
	Rows    [][]interface{}
	// contains filtered or unexported fields
}

func NewTable

func NewTable(name string, headers ...string) *Table

func (*Table) Add

func (t *Table) Add(cols ...interface{})

func (*Table) HideHeader

func (t *Table) HideHeader()

func (*Table) JSON

func (t *Table) JSON(ms map[string]interface{})

func (*Table) MergeCells

func (t *Table) MergeCells(replace string)

func (*Table) Table

func (t *Table) Table(tw *tabwriter.Writer)

type Value

type Value struct {
	Name    string
	Element interface{}
}

func NewValue

func NewValue(name string, element interface{}) *Value

func (*Value) JSON

func (v *Value) JSON(ms map[string]interface{})

func (*Value) Table

func (v *Value) Table(tw *tabwriter.Writer)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL