flatten

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlattenOperator

type FlattenOperator struct {
	helper.TransformerOperator
	Field entry.RecordField
}

FlattenOperator flattens an object in the body field

func (*FlattenOperator) Process

func (p *FlattenOperator) Process(ctx context.Context, entry *entry.Entry) error

Process will process an entry with a flatten transformation.

func (*FlattenOperator) Transform

func (p *FlattenOperator) Transform(entry *entry.Entry) error

Transform will apply the flatten operation to an entry

type FlattenOperatorConfig

type FlattenOperatorConfig struct {
	helper.TransformerConfig `mapstructure:",squash" yaml:",inline"`
	Field                    entry.RecordField `mapstructure:"field" json:"field" yaml:"field"`
}

FlattenOperatorConfig is the configuration of a flatten operator

func NewFlattenOperatorConfig

func NewFlattenOperatorConfig(operatorID string) *FlattenOperatorConfig

NewFlattenOperatorConfig creates a new flatten operator config with default values

func (FlattenOperatorConfig) Build

Build will build a Flatten operator from the supplied configuration

Jump to

Keyboard shortcuts

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