core

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigString

func GetConfigString(config map[string]any, key string) string

func GetConfigStringSlice

func GetConfigStringSlice(config map[string]any, key string) []string

func GetFromMapPath

func GetFromMapPath(m map[string]any, path string) any

GetFromMapPath resolves a dotted path in a nested map[string]any.

func ParameterizeTemplate

func ParameterizeTemplate(driver, tpl string, data map[string]any) (string, []any)

ParameterizeTemplate replaces all {{ ... }} tokens in the SQL template with driver-specific placeholders and returns the parameterized SQL text and a corresponding args slice. Token content should be either a path like `source.foo` or a quoted literal. Paths are resolved against `data`.

func SplitComma

func SplitComma(s string) []string

func SplitSQLConditions

func SplitSQLConditions(s string) []string

SplitSQLConditions splits a WHERE clause by "AND" while respecting single/double quotes.

Types

type CharMapTransformer

type CharMapTransformer struct{}

func (*CharMapTransformer) Transform

func (t *CharMapTransformer) Transform(ctx context.Context, msg hermod.Message, config map[string]any) (hermod.Message, error)

type DataConversionTransformer

type DataConversionTransformer struct{}

func (*DataConversionTransformer) Transform

func (t *DataConversionTransformer) Transform(ctx context.Context, msg hermod.Message, config map[string]any) (hermod.Message, error)

type FilterTransformer

type FilterTransformer struct{}

func (*FilterTransformer) Prepare

func (t *FilterTransformer) Prepare(config map[string]any) (map[string]any, error)

func (*FilterTransformer) Transform

func (t *FilterTransformer) Transform(ctx context.Context, msg hermod.Message, config map[string]any) (hermod.Message, error)

type MappingTransformer

type MappingTransformer struct{}

func (*MappingTransformer) Prepare

func (t *MappingTransformer) Prepare(config map[string]any) (map[string]any, error)

func (*MappingTransformer) Transform

func (t *MappingTransformer) Transform(ctx context.Context, msg hermod.Message, config map[string]any) (hermod.Message, error)

Jump to

Keyboard shortcuts

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