move

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MoveOperator

type MoveOperator struct {
	helper.TransformerOperator
	From entry.Field
	To   entry.Field
}

MoveOperator is an operator that moves a field's value to a new field

func (*MoveOperator) Process

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

Process will process an entry with a move transformation.

func (*MoveOperator) Transform

func (p *MoveOperator) Transform(e *entry.Entry) error

Transform will apply the move operation to an entry

type MoveOperatorConfig

type MoveOperatorConfig struct {
	helper.TransformerConfig `mapstructure:",squash" yaml:",inline"`
	From                     entry.Field `mapstructure:"from" yaml:"from"`
	To                       entry.Field `mapstructure:"to" yaml:"to"`
}

MoveOperatorConfig is the configuration of a move operator

func NewMoveOperatorConfig

func NewMoveOperatorConfig(operatorID string) *MoveOperatorConfig

NewMoveOperatorConfig creates a new move operator config with default values

func (MoveOperatorConfig) Build

Build will build a Move operator from the supplied configuration

Jump to

Keyboard shortcuts

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