transformations

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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