Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transformation ¶
Transformation is the transformation matrix for a given payload.
func NewTransformation ¶
func NewTransformation() Transformation
NewTransformation creates an empty Transformation.
func TransformationFromConfig ¶
func TransformationFromConfig(config map[string]string, funcs template.FuncMap) (out Transformation, err error)
TransformationFromConfig creates a transformation from a configuration description.
func (Transformation) Apply ¶
Apply takes a serialized JSON payload and returns a Blob on which the transformation has been applied, as well as a collection of metadata corresponding to fields prefixed by an underscore.
func (Transformation) ApplyMap ¶
func (t Transformation) ApplyMap(m map[string]interface{}) (map[string]interface{}, error)
ApplyMap is a less capable version of Apply that only knows how to deal with simple objects, and won't handle any metadata fields. It is used when applying a transformation to a nested object where metadata transformation is not expected.
type Transformations ¶
Transformations is a collection of Transformation for different event types.
func NewTransformations ¶
func NewTransformations() *Transformations
func (*Transformations) Get ¶
func (t *Transformations) Get(name string) Transformation
func (*Transformations) Load ¶
func (t *Transformations) Load(config config.SerializedTable) error