add

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitStep bool = false

InitStep is used to figure out if this operation should run before main Transformations. For example, Store operation needs to run first to load all Pipeline variables.

Functions

func Register

func Register(m map[string]transformer.Transformer)

Register adds this transformation to the map which will be used to create Transformation pipeline.

Types

type Add

type Add struct {
	Path  string
	Value string
	// contains filtered or unexported fields
}

Add object implements Transformer interface.

func (*Add) Apply

func (a *Add) Apply(data []byte) ([]byte, error)

Apply is a main method of Transformation that adds any type of variables into existing JSON.

func (*Add) InitStep

func (a *Add) InitStep() bool

InitStep returns "true" if this Transformation should run as init step.

func (*Add) New

func (a *Add) New(key, value string) transformer.Transformer

New returns a new instance of Add object.

func (*Add) SetStorage

func (a *Add) SetStorage(storage *storage.Storage)

SetStorage sets a shared Storage with Pipeline variables.

Jump to

Keyboard shortcuts

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