steps

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMeta

func AddMeta(opts pipeline.PipelineOptions, metaCfg string) (pipeline.Step[JSON, JSON], error)

func Context

func Context(opts pipeline.PipelineOptions, countBefore, countAfter int) pipeline.Step[JSON, JSON]

func DistinctBy

func DistinctBy(opts pipeline.PipelineOptions, property string) pipeline.Step[JSON, JSON]

func ExcludeRegexp

func ExcludeRegexp(opts pipeline.PipelineOptions, regexps []string) (pipeline.Step[string, string], error)

func ExcludeSubstringsAny

func ExcludeSubstringsAny(opts pipeline.PipelineOptions, substrings []string) pipeline.Step[string, string]

func Expand

func Expand(opts pipeline.PipelineOptions, properties []string) pipeline.Step[JSON, JSON]

func FilterByJq

func FilterByJq(opts pipeline.PipelineOptions, filter string) (pipeline.Step[JSON, JSON], error)

func FilterByKQL

func FilterByKQL(opts pipeline.PipelineOptions, filter string) (pipeline.Step[JSON, JSON], error)

func First

func First(opts pipeline.PipelineOptions, count int) pipeline.Step[JSON, JSON]

func Hide

func Hide(opts pipeline.PipelineOptions, properties []string) pipeline.Step[JSON, JSON]

func IncludeRegexp

func IncludeRegexp(opts pipeline.PipelineOptions, regexps []string) (pipeline.Step[string, string], error)

func IncludeSubstringsAny

func IncludeSubstringsAny(opts pipeline.PipelineOptions, substrings []string) pipeline.Step[string, string]

func JsonToText

func JsonToText(
	opts pipeline.PipelineOptions,
	headProps []string,
	orderProps []string,
	noNewLine,
	noProp bool,
	textDelim string,
	highlights []string) pipeline.Step[JSON, string]

func Last

func Last(opts pipeline.PipelineOptions, count int) pipeline.Step[JSON, JSON]

func Merge added in v0.2.0

func Merge(
	opts pipeline.PipelineOptions,
	properties []string,
	in []pipeline.Seq[JSON]) pipeline.Seq[JSON]

func Noop

func Noop[V any]() pipeline.Step[V, V]

func OpenFile

func OpenFile(fileName string) (close func() error, reader io.Reader, err error)

func ReadByLines

func ReadByLines(fileName string, r io.Reader) pipeline.Seq[string]

func Select

func Select(opts pipeline.PipelineOptions, properties []string) pipeline.Step[JSON, JSON]

func StrToJson

func StrToJson(opts pipeline.PipelineOptions, durationMs []string) pipeline.Step[string, JSON]

func WriteLines

func WriteLines(w io.Writer, showErrors bool, lines pipeline.Seq[string]) error

Types

type JSON

type JSON map[string]any

func (JSON) SortedByKey

func (j JSON) SortedByKey(yield func(key string, val any) bool)

Jump to

Keyboard shortcuts

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