pipe

package
v0.0.0-...-849da23 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePipeline

func EncodePipeline(pl Pipeline) (*bytes.Buffer, error)

Types

type Column2RowPipe

type Column2RowPipe struct{}

func (*Column2RowPipe) GetConfigUI

func (c *Column2RowPipe) GetConfigUI(changed func()) g.Layout

func (*Column2RowPipe) GetInputType

func (c *Column2RowPipe) GetInputType() DataType

func (*Column2RowPipe) GetName

func (c *Column2RowPipe) GetName() string

func (*Column2RowPipe) GetOutputType

func (c *Column2RowPipe) GetOutputType() DataType

func (*Column2RowPipe) GetTip

func (c *Column2RowPipe) GetTip() string

func (*Column2RowPipe) Process

func (c *Column2RowPipe) Process(data interface{}) interface{}

type DataType

type DataType int
const (
	DataTypeString DataType = iota
	DataTypeStringArray
	DataTypeTable
)

type FieldsPipe

type FieldsPipe struct{}

func (*FieldsPipe) GetConfigUI

func (f *FieldsPipe) GetConfigUI(changed func()) g.Layout

func (*FieldsPipe) GetInputType

func (f *FieldsPipe) GetInputType() DataType

func (*FieldsPipe) GetName

func (f *FieldsPipe) GetName() string

func (*FieldsPipe) GetOutputType

func (f *FieldsPipe) GetOutputType() DataType

func (*FieldsPipe) GetTip

func (f *FieldsPipe) GetTip() string

func (*FieldsPipe) Process

func (f *FieldsPipe) Process(data interface{}) interface{}

type FmtRowPipe

type FmtRowPipe struct {
	FmtStr string
}

func (*FmtRowPipe) GetConfigUI

func (f *FmtRowPipe) GetConfigUI(changed func()) g.Layout

func (*FmtRowPipe) GetInputType

func (f *FmtRowPipe) GetInputType() DataType

func (*FmtRowPipe) GetName

func (f *FmtRowPipe) GetName() string

func (*FmtRowPipe) GetOutputType

func (f *FmtRowPipe) GetOutputType() DataType

func (*FmtRowPipe) GetTip

func (f *FmtRowPipe) GetTip() string

func (*FmtRowPipe) Process

func (f *FmtRowPipe) Process(data interface{}) interface{}

type JoinPipe

type JoinPipe struct {
	JoinWith string
}

func (*JoinPipe) GetConfigUI

func (j *JoinPipe) GetConfigUI(changed func()) g.Layout

func (*JoinPipe) GetInputType

func (j *JoinPipe) GetInputType() DataType

func (*JoinPipe) GetName

func (j *JoinPipe) GetName() string

func (*JoinPipe) GetOutputType

func (j *JoinPipe) GetOutputType() DataType

func (*JoinPipe) GetTip

func (j *JoinPipe) GetTip() string

func (*JoinPipe) Process

func (j *JoinPipe) Process(data interface{}) interface{}

type LinePipe

type LinePipe struct{}

func (*LinePipe) GetConfigUI

func (l *LinePipe) GetConfigUI(changed func()) g.Layout

func (*LinePipe) GetInputType

func (l *LinePipe) GetInputType() DataType

func (*LinePipe) GetName

func (l *LinePipe) GetName() string

func (*LinePipe) GetOutputType

func (l *LinePipe) GetOutputType() DataType

func (*LinePipe) GetTip

func (l *LinePipe) GetTip() string

func (*LinePipe) Process

func (l *LinePipe) Process(data interface{}) interface{}

type MatchPipe

type MatchPipe struct {
	MatchWith string
}

func (*MatchPipe) GetConfigUI

func (m *MatchPipe) GetConfigUI(changed func()) g.Layout

func (*MatchPipe) GetInputType

func (m *MatchPipe) GetInputType() DataType

func (*MatchPipe) GetName

func (m *MatchPipe) GetName() string

func (*MatchPipe) GetOutputType

func (m *MatchPipe) GetOutputType() DataType

func (*MatchPipe) GetTip

func (m *MatchPipe) GetTip() string

func (*MatchPipe) Process

func (m *MatchPipe) Process(data interface{}) interface{}

type Parameter

type Parameter struct {
	Type  DataType
	Value interface{}
}

type Pipe

type Pipe interface {
	// Get information for the pipe including name, bgColor, nameColor and borderColor
	GetName() string
	GetTip() string
	GetInputType() DataType
	GetOutputType() DataType
	GetConfigUI(changed func()) g.Layout
	Process(data interface{}) interface{}
}

func NewColumn2RowPipe

func NewColumn2RowPipe() Pipe

func NewFieldsPipe

func NewFieldsPipe() Pipe

func NewFmtRowPipe

func NewFmtRowPipe() Pipe

func NewJoinPipe

func NewJoinPipe() Pipe

func NewLinePipe

func NewLinePipe() Pipe

func NewMatchPipe

func NewMatchPipe() Pipe

func NewRegexpSplitPipe

func NewRegexpSplitPipe() Pipe

func NewReplacePipe

func NewReplacePipe() Pipe

func NewSurroundPipe

func NewSurroundPipe() Pipe

func NewTablePipe

func NewTablePipe() Pipe

func NewTrimPipe

func NewTrimPipe() Pipe

type PipeBuilder

type PipeBuilder struct {
	Name    string
	Tip     string
	Builder func() Pipe
}

func QueryPipes

func QueryPipes(byType DataType) []*PipeBuilder

func QueryPipesBetween

func QueryPipesBetween(inType, outType DataType) []*PipeBuilder

type Pipeline

type Pipeline []Pipe

func DecodePipeline

func DecodePipeline(r io.Reader) (*Pipeline, error)

type RegexpSplitPipe

type RegexpSplitPipe struct {
	SplitWith string
}

func (*RegexpSplitPipe) GetConfigUI

func (r *RegexpSplitPipe) GetConfigUI(changed func()) g.Layout

func (*RegexpSplitPipe) GetInputType

func (r *RegexpSplitPipe) GetInputType() DataType

func (*RegexpSplitPipe) GetName

func (r *RegexpSplitPipe) GetName() string

func (*RegexpSplitPipe) GetOutputType

func (r *RegexpSplitPipe) GetOutputType() DataType

func (*RegexpSplitPipe) GetTip

func (r *RegexpSplitPipe) GetTip() string

func (*RegexpSplitPipe) Process

func (r *RegexpSplitPipe) Process(data interface{}) interface{}

type ReplacePipe

type ReplacePipe struct {
	Replace string
	With    string
}

func (*ReplacePipe) GetConfigUI

func (r *ReplacePipe) GetConfigUI(changed func()) g.Layout

func (*ReplacePipe) GetInputType

func (r *ReplacePipe) GetInputType() DataType

func (*ReplacePipe) GetName

func (r *ReplacePipe) GetName() string

func (*ReplacePipe) GetOutputType

func (r *ReplacePipe) GetOutputType() DataType

func (*ReplacePipe) GetTip

func (r *ReplacePipe) GetTip() string

func (*ReplacePipe) Process

func (r *ReplacePipe) Process(data interface{}) interface{}

type SurroundPipe

type SurroundPipe struct {
	Prefix string
	Suffix string
}

func (*SurroundPipe) GetConfigUI

func (p *SurroundPipe) GetConfigUI(changed func()) g.Layout

func (*SurroundPipe) GetInputType

func (p *SurroundPipe) GetInputType() DataType

func (*SurroundPipe) GetName

func (p *SurroundPipe) GetName() string

func (*SurroundPipe) GetOutputType

func (p *SurroundPipe) GetOutputType() DataType

func (*SurroundPipe) GetTip

func (p *SurroundPipe) GetTip() string

func (*SurroundPipe) Process

func (p *SurroundPipe) Process(data interface{}) interface{}

type TablePipe

type TablePipe struct {
	SplitRowWith    string
	SplitColumnWith string
}

func (*TablePipe) GetConfigUI

func (t *TablePipe) GetConfigUI(changed func()) g.Layout

func (*TablePipe) GetInputType

func (t *TablePipe) GetInputType() DataType

func (*TablePipe) GetName

func (t *TablePipe) GetName() string

func (*TablePipe) GetOutputType

func (t *TablePipe) GetOutputType() DataType

func (*TablePipe) GetTip

func (t *TablePipe) GetTip() string

func (*TablePipe) Process

func (t *TablePipe) Process(data interface{}) interface{}

type TrimPipe

type TrimPipe struct {
	TrimWith string
}

func (*TrimPipe) GetConfigUI

func (t *TrimPipe) GetConfigUI(changed func()) g.Layout

func (*TrimPipe) GetInputType

func (t *TrimPipe) GetInputType() DataType

func (*TrimPipe) GetName

func (t *TrimPipe) GetName() string

func (*TrimPipe) GetOutputType

func (t *TrimPipe) GetOutputType() DataType

func (*TrimPipe) GetTip

func (t *TrimPipe) GetTip() string

func (*TrimPipe) Process

func (t *TrimPipe) Process(data interface{}) interface{}

Jump to

Keyboard shortcuts

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