transformations

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type ColumnTemplateVariables

type ColumnTemplateVariables struct {
	Row    map[string]string
	Table  map[string]string
	Global map[string]string
}

type ColumnTransformationFunction

type ColumnTransformationFunction func(row MappedRow, rowMeta RowMeta, variables ColumnTemplateVariables, fieldValue ast.ValueExpr) (interface{}, error)

func GetColumnTransformation

func GetColumnTransformation(t ColumnTransformationType, opts json.RawMessage, additionalOptions any) (ColumnTransformationFunction, error)

type ColumnTransformationInitializer

type ColumnTransformationInitializer func(rawOptions json.RawMessage, extraOptions any) (ColumnTransformationFunction, error)

type ColumnTransformationType

type ColumnTransformationType string
var TransformationTypeTemplate ColumnTransformationType = "template"
var TransformationTypeValue ColumnTransformationType = "value"

type MappedRow

type MappedRow map[string]interface{}

type RowMeta

type RowMeta struct {
	Index int
}

type TemplateTransformationOptions

type TemplateTransformationOptions struct {
	Template string `json:"template,omitempty"`
}

type TransformationOptions

type TransformationOptions map[string]interface{}

type ValueTransformationOptions

type ValueTransformationOptions struct {
	Value interface{} `json:"value"`
}

Jump to

Keyboard shortcuts

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