mutate

package
v0.0.0-...-ac5fac0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

README

mutate transformers

专门放字符串变化相关的Transformers

Documentation

Index

Constants

View Source
const (
	Prefix = "prefix"
	Suffix = "suffix"
	Both   = "both"
)
View Source
const TYPE = "pick"

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayExpand

type ArrayExpand struct {
	Key string `json:"key"`
	// contains filtered or unexported fields
}

func (*ArrayExpand) ConfigOptions

func (p *ArrayExpand) ConfigOptions() []Option

func (*ArrayExpand) Description

func (p *ArrayExpand) Description() string

func (*ArrayExpand) Init

func (p *ArrayExpand) Init() error

func (*ArrayExpand) RawTransform

func (p *ArrayExpand) RawTransform(datas []string) ([]string, error)

func (*ArrayExpand) SampleConfig

func (p *ArrayExpand) SampleConfig() string

func (*ArrayExpand) SetStats

func (p *ArrayExpand) SetStats(err string) StatsInfo

func (*ArrayExpand) Stage

func (p *ArrayExpand) Stage() string

func (*ArrayExpand) Stats

func (p *ArrayExpand) Stats() StatsInfo

func (*ArrayExpand) Transform

func (p *ArrayExpand) Transform(datas []Data) ([]Data, error)

func (*ArrayExpand) Type

func (p *ArrayExpand) Type() string

type Converter

type Converter struct {
	DSL string `json:"dsl"`
	// contains filtered or unexported fields
}

func (*Converter) ConfigOptions

func (g *Converter) ConfigOptions() []Option

func (*Converter) Description

func (g *Converter) Description() string

func (*Converter) RawTransform

func (g *Converter) RawTransform(datas []string) ([]string, error)

func (*Converter) SampleConfig

func (g *Converter) SampleConfig() string

func (*Converter) SetStats

func (g *Converter) SetStats(err string) StatsInfo

func (*Converter) Stage

func (g *Converter) Stage() string

func (*Converter) Stats

func (g *Converter) Stats() StatsInfo

func (*Converter) Transform

func (g *Converter) Transform(datas []Data) ([]Data, error)

func (*Converter) Type

func (g *Converter) Type() string

type Discarder

type Discarder struct {
	Key       string `json:"key"`
	StageTime string `json:"stage"`
	// contains filtered or unexported fields
}

func (*Discarder) ConfigOptions

func (g *Discarder) ConfigOptions() []Option

func (*Discarder) Description

func (g *Discarder) Description() string

func (*Discarder) Init

func (g *Discarder) Init() error

func (*Discarder) RawTransform

func (g *Discarder) RawTransform(datas []string) ([]string, error)

func (*Discarder) SampleConfig

func (g *Discarder) SampleConfig() string

func (*Discarder) SetStats

func (g *Discarder) SetStats(err string) StatsInfo

func (*Discarder) Stage

func (g *Discarder) Stage() string

func (*Discarder) Stats

func (g *Discarder) Stats() StatsInfo

func (*Discarder) Transform

func (g *Discarder) Transform(datas []Data) ([]Data, error)

func (*Discarder) Type

func (g *Discarder) Type() string

type DslSchemaEntry

type DslSchemaEntry struct {
	Key       string           `json:"key"`
	ValueType string           `json:"valtype"`
	Default   interface{}      `json:"default,omitempty"`
	ElemType  string           `json:"elemtype,omitempty"`
	Schema    []DslSchemaEntry `json:"schema,omitempty"`
}

func ParseDsl

func ParseDsl(dsl string, depth int) (schemas []DslSchemaEntry, err error)

type Json

type Json struct {
	Key string `json:"key"`
	New string `json:"new"`
	// contains filtered or unexported fields
}

func (*Json) ConfigOptions

func (g *Json) ConfigOptions() []Option

func (*Json) Description

func (g *Json) Description() string

func (*Json) Init

func (g *Json) Init() error

func (*Json) RawTransform

func (g *Json) RawTransform(datas []string) ([]string, error)

func (*Json) SampleConfig

func (g *Json) SampleConfig() string

func (*Json) SetStats

func (g *Json) SetStats(err string) StatsInfo

func (*Json) Stage

func (g *Json) Stage() string

func (*Json) Stats

func (g *Json) Stats() StatsInfo

func (*Json) Transform

func (g *Json) Transform(datas []Data) ([]Data, error)

func (*Json) Type

func (g *Json) Type() string

type Label

type Label struct {
	Key      string `json:"key"`
	Value    string `json:"value"`
	Override bool   `json:"override"`
	// contains filtered or unexported fields
}

func (*Label) ConfigOptions

func (g *Label) ConfigOptions() []Option

func (*Label) Description

func (g *Label) Description() string

func (*Label) RawTransform

func (g *Label) RawTransform(datas []string) ([]string, error)

func (*Label) SampleConfig

func (g *Label) SampleConfig() string

func (*Label) SetStats

func (g *Label) SetStats(err string) StatsInfo

func (*Label) Stage

func (g *Label) Stage() string

func (*Label) Stats

func (g *Label) Stats() StatsInfo

func (*Label) Transform

func (g *Label) Transform(datas []Data) ([]Data, error)

func (*Label) Type

func (g *Label) Type() string

type MapReplacer

type MapReplacer struct {
	Key     string `json:"key"`
	Map     string `json:"map"`
	MapFile string `json:"map_file"`
	New     string `json:"new"`
	// contains filtered or unexported fields
}

func (*MapReplacer) ConfigOptions

func (g *MapReplacer) ConfigOptions() []Option

func (*MapReplacer) Description

func (g *MapReplacer) Description() string

func (*MapReplacer) Init

func (g *MapReplacer) Init() error

func (*MapReplacer) RawTransform

func (g *MapReplacer) RawTransform(datas []string) ([]string, error)

func (*MapReplacer) SampleConfig

func (g *MapReplacer) SampleConfig() string

func (*MapReplacer) SetStats

func (g *MapReplacer) SetStats(err string) StatsInfo

func (*MapReplacer) Stage

func (g *MapReplacer) Stage() string

func (*MapReplacer) Stats

func (g *MapReplacer) Stats() StatsInfo

func (*MapReplacer) Transform

func (g *MapReplacer) Transform(datas []Data) ([]Data, error)

func (*MapReplacer) Type

func (g *MapReplacer) Type() string

type PandoraKeyConvert

type PandoraKeyConvert struct {
	// contains filtered or unexported fields
}

func (*PandoraKeyConvert) ConfigOptions

func (g *PandoraKeyConvert) ConfigOptions() []Option

func (*PandoraKeyConvert) Description

func (g *PandoraKeyConvert) Description() string

func (*PandoraKeyConvert) Init

func (g *PandoraKeyConvert) Init() error

func (*PandoraKeyConvert) RawTransform

func (g *PandoraKeyConvert) RawTransform(datas []string) ([]string, error)

func (*PandoraKeyConvert) SampleConfig

func (g *PandoraKeyConvert) SampleConfig() string

func (*PandoraKeyConvert) SetStats

func (g *PandoraKeyConvert) SetStats(err string) StatsInfo

func (*PandoraKeyConvert) Stage

func (g *PandoraKeyConvert) Stage() string

func (*PandoraKeyConvert) Stats

func (g *PandoraKeyConvert) Stats() StatsInfo

func (*PandoraKeyConvert) Transform

func (g *PandoraKeyConvert) Transform(datas []Data) ([]Data, error)

func (*PandoraKeyConvert) Type

func (g *PandoraKeyConvert) Type() string

type Pick

type Pick struct {
	Key       string `json:"key"`
	StageTime string `json:"stage"`
	// contains filtered or unexported fields
}

func (*Pick) ConfigOptions

func (g *Pick) ConfigOptions() []Option

func (*Pick) Description

func (g *Pick) Description() string

func (*Pick) RawTransform

func (g *Pick) RawTransform(datas []string) ([]string, error)

func (*Pick) SampleConfig

func (g *Pick) SampleConfig() string

func (*Pick) SetStats

func (g *Pick) SetStats(err string) StatsInfo

func (*Pick) Stage

func (g *Pick) Stage() string

func (*Pick) Stats

func (g *Pick) Stats() StatsInfo

func (*Pick) Transform

func (g *Pick) Transform(datas []Data) ([]Data, error)

func (*Pick) Type

func (g *Pick) Type() string

type Rename

type Rename struct {
	Key        string `json:"key"`
	NewKeyName string `json:"new_key_name"`
	NewKey     string `json:"new"`
	// contains filtered or unexported fields
}

func (*Rename) ConfigOptions

func (g *Rename) ConfigOptions() []Option

func (*Rename) Description

func (g *Rename) Description() string

func (*Rename) Init

func (g *Rename) Init() error

func (*Rename) RawTransform

func (g *Rename) RawTransform(datas []string) ([]string, error)

func (*Rename) SampleConfig

func (g *Rename) SampleConfig() string

func (*Rename) SetStats

func (g *Rename) SetStats(err string) StatsInfo

func (*Rename) Stage

func (g *Rename) Stage() string

func (*Rename) Stats

func (g *Rename) Stats() StatsInfo

func (*Rename) Transform

func (g *Rename) Transform(datas []Data) ([]Data, error)

func (*Rename) Type

func (g *Rename) Type() string

type Replacer

type Replacer struct {
	StageTime string `json:"stage"`
	Key       string `json:"key"`
	Old       string `json:"old"`
	New       string `json:"new"`
	Regex     bool   `json:"regex"`

	Regexp *regexp.Regexp
	// contains filtered or unexported fields
}

func (*Replacer) ConfigOptions

func (g *Replacer) ConfigOptions() []Option

func (*Replacer) Description

func (g *Replacer) Description() string

func (*Replacer) Init

func (g *Replacer) Init() error

func (*Replacer) RawTransform

func (g *Replacer) RawTransform(datas []string) ([]string, error)

func (*Replacer) SampleConfig

func (g *Replacer) SampleConfig() string

func (*Replacer) SetStats

func (g *Replacer) SetStats(err string) StatsInfo

func (*Replacer) Stage

func (g *Replacer) Stage() string

func (*Replacer) Stats

func (g *Replacer) Stats() StatsInfo

func (*Replacer) Transform

func (g *Replacer) Transform(datas []Data) ([]Data, error)

func (*Replacer) Type

func (g *Replacer) Type() string

type Script

type Script struct {
	Key         string `json:"key"`
	New         string `json:"new"`
	Interpreter string `json:"interprepter"`
	ScriptPath  string `json:"scriptpath"`
	Script      string `json:"script"`
	// contains filtered or unexported fields
}

func (*Script) ConfigOptions

func (g *Script) ConfigOptions() []Option

func (*Script) Description

func (g *Script) Description() string

func (*Script) Init

func (g *Script) Init() error

func (*Script) RawTransform

func (g *Script) RawTransform(datas []string) ([]string, error)

func (*Script) SampleConfig

func (g *Script) SampleConfig() string

func (*Script) SetStats

func (g *Script) SetStats(err string) StatsInfo

func (*Script) Stage

func (g *Script) Stage() string

func (*Script) Stats

func (g *Script) Stats() StatsInfo

func (*Script) Transform

func (g *Script) Transform(datas []Data) ([]Data, error)

func (*Script) Type

func (g *Script) Type() string

type Spliter

type Spliter struct {
	Key           string `json:"key"`
	SeperateKey   string `json:"sep"`
	ArraryName    string `json:"newfield"`
	ArraryNameNew string `json:"new"`
	// contains filtered or unexported fields
}

func (*Spliter) ConfigOptions

func (g *Spliter) ConfigOptions() []Option

func (*Spliter) Description

func (g *Spliter) Description() string

func (*Spliter) RawTransform

func (g *Spliter) RawTransform(datas []string) ([]string, error)

func (*Spliter) SampleConfig

func (g *Spliter) SampleConfig() string

func (*Spliter) SetStats

func (g *Spliter) SetStats(err string) StatsInfo

func (*Spliter) Stage

func (g *Spliter) Stage() string

func (*Spliter) Stats

func (g *Spliter) Stats() StatsInfo

func (*Spliter) Transform

func (g *Spliter) Transform(datas []Data) ([]Data, error)

func (*Spliter) Type

func (g *Spliter) Type() string

type Trim

type Trim struct {
	Key        string `json:"key"`
	Characters string `json:"characters"`
	Place      string `json:"place"`
	// contains filtered or unexported fields
}

func (*Trim) ConfigOptions

func (g *Trim) ConfigOptions() []Option

func (*Trim) Description

func (g *Trim) Description() string

func (*Trim) RawTransform

func (g *Trim) RawTransform(datas []string) ([]string, error)

func (*Trim) SampleConfig

func (g *Trim) SampleConfig() string

func (*Trim) SetStats

func (g *Trim) SetStats(err string) StatsInfo

func (*Trim) Stage

func (g *Trim) Stage() string

func (*Trim) Stats

func (g *Trim) Stats() StatsInfo

func (*Trim) Transform

func (g *Trim) Transform(datas []Data) ([]Data, error)

func (*Trim) Type

func (g *Trim) Type() string

type UrlParam

type UrlParam struct {
	Key        string `json:"key"`
	SelectKeys string `json:"select_keys"`
	// contains filtered or unexported fields
}

func (*UrlParam) ConfigOptions

func (p *UrlParam) ConfigOptions() []Option

func (*UrlParam) Description

func (p *UrlParam) Description() string

func (*UrlParam) Init

func (p *UrlParam) Init() error

func (*UrlParam) RawTransform

func (p *UrlParam) RawTransform(datas []string) ([]string, error)

func (*UrlParam) SampleConfig

func (p *UrlParam) SampleConfig() string

func (*UrlParam) SetStats

func (p *UrlParam) SetStats(err string) StatsInfo

func (*UrlParam) Stage

func (p *UrlParam) Stage() string

func (*UrlParam) Stats

func (p *UrlParam) Stats() StatsInfo

func (*UrlParam) Transform

func (p *UrlParam) Transform(datas []Data) ([]Data, error)

func (*UrlParam) Type

func (p *UrlParam) Type() string

type Xml

type Xml struct {
	Key string `json:"key"`
	New string `json:"new"`
	// contains filtered or unexported fields
}

func (*Xml) ConfigOptions

func (g *Xml) ConfigOptions() []Option

func (*Xml) Description

func (g *Xml) Description() string

func (*Xml) Init

func (g *Xml) Init() error

func (*Xml) RawTransform

func (g *Xml) RawTransform(datas []string) ([]string, error)

func (*Xml) SampleConfig

func (g *Xml) SampleConfig() string

func (*Xml) SetStats

func (g *Xml) SetStats(err string) StatsInfo

func (*Xml) Stage

func (g *Xml) Stage() string

func (*Xml) Stats

func (g *Xml) Stats() StatsInfo

func (*Xml) Transform

func (g *Xml) Transform(datas []Data) ([]Data, error)

func (*Xml) Type

func (g *Xml) Type() string

Jump to

Keyboard shortcuts

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