copy

package
v0.29.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopyOperator

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

CopyOperator copies a value from one field and creates a new field with that value

func (*CopyOperator) Process

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

Process will process an entry with a copy transformation.

func (*CopyOperator) Transform

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

Transform will apply the copy operation to an entry

type CopyOperatorConfig

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

CopyOperatorConfig is the configuration of a copy operator

func NewCopyOperatorConfig

func NewCopyOperatorConfig(operatorID string) *CopyOperatorConfig

NewCopyOperatorConfig creates a new copy operator config with default values

func (CopyOperatorConfig) Build

Build will build a copy operator from the supplied configuration

Jump to

Keyboard shortcuts

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