output

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnDef

type ColumnDef struct {
	Name         string
	Sources      []string
	Format       string
	ValueMapping []map[string]string
	FormatFunc   func(values map[string]string) string
}

func (*ColumnDef) GetFormat

func (d *ColumnDef) GetFormat() string

func (*ColumnDef) GetSources

func (d *ColumnDef) GetSources() []string

type Formatter added in v0.0.9

type Formatter interface {
	GetIncludeFields() []string
	GetExcludeFields() []string
	GetColumnDefs() []ColumnDef
	GetTableType() TableType
	Option
}

type Option added in v0.0.9

type Option interface {
	GetOutputType() string
	GetColumn() []string
	GetFormat() string
	GetFormatFile() string
	GetQuiet() bool
}

type Output

type Output interface {
	Print(...interface{}) error
}

func NewFreeOutput added in v0.0.2

func NewFreeOutput(out io.Writer, err io.Writer, option Option) Output

func NewIDOutput added in v0.0.2

func NewIDOutput(out io.Writer, err io.Writer) Output

func NewJSONOutput

func NewJSONOutput(out io.Writer, err io.Writer) Output

func NewRowOutput added in v0.0.2

func NewRowOutput(out io.Writer, err io.Writer, separator rune, option Option) Output

func NewTableOutput

func NewTableOutput(out io.Writer, err io.Writer, formater Formatter) Output

type TableType added in v0.0.9

type TableType int //go:generate stringer -type=OutputTableType :: manual
const (
	TableDetail TableType = iota
	TableSimple
)

Jump to

Keyboard shortcuts

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