add

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOperator

type AddOperator struct {
	helper.TransformerOperator

	Field entry.Field
	Value interface{}
	// contains filtered or unexported fields
}

AddOperator is an operator that adds a string value or an expression value

func (*AddOperator) Process

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

Process will process an entry with a add transformation.

func (*AddOperator) Transform

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

Transform will apply the add operations to an entry

type AddOperatorConfig

type AddOperatorConfig struct {
	helper.TransformerConfig `mapstructure:",squash" yaml:",inline"`
	Field                    entry.Field `mapstructure:"field" json:"field" yaml:"field"`
	Value                    interface{} `mapstructure:"value,omitempty" json:"value,omitempty" yaml:"value,omitempty"`
}

AddOperatorConfig is the configuration of an add operator

func NewAddOperatorConfig

func NewAddOperatorConfig(operatorID string) *AddOperatorConfig

NewAddOperatorConfig creates a new add operator config with default values

func (AddOperatorConfig) Build

Build will build an add operator from the supplied configuration

Jump to

Keyboard shortcuts

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