parse

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IdentityMap = func(s string) (interface{}, error) { return s, nil }

IdentityMap maps an event attribute into a string without any change

Functions

func Parse

func Parse(attributes map[string]string, parsers []*AttributeParser) ([]interface{}, error)

Parse applies all parsers to the given attribute map. Returns map results in the order of the parsers.

Types

type AttributeParser

type AttributeParser struct {
	Key string
	Map func(string) (interface{}, error)
}

AttributeParser represents a structure to map a single event attribute into an arbitrary data type

Jump to

Keyboard shortcuts

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