transformer

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Sets the cloudevents id attribute to a UUID.New()
	SetUUID binding.TransformerFactory = setUUID{}
	// Add the cloudevents time attribute, if missing, to time.Now()
	AddTimeNow binding.TransformerFactory = addTimeNow{}
)

Functions

func AddAttribute

func AddAttribute(attributeKind spec.Kind, value interface{}) binding.TransformerFactory

Add cloudevents attribute (if missing) during the encoding process

func AddExtension

func AddExtension(name string, value interface{}) binding.TransformerFactory

Add cloudevents extension (if missing) during the encoding process

func DeleteAttribute

func DeleteAttribute(attributeKind spec.Kind) binding.TransformerFactory

Delete cloudevents attribute during the encoding process

func DeleteExtension

func DeleteExtension(name string) binding.TransformerFactory

Delete cloudevents extension during the encoding process

func SetAttribute

func SetAttribute(attribute spec.Kind, defaultValue interface{}, updater func(interface{}) (interface{}, error)) []binding.TransformerFactory

Sets a cloudevents attribute (if missing) to defaultValue or update it with updater function

func SetExtension

func SetExtension(name string, defaultValue interface{}, updater func(interface{}) (interface{}, error)) []binding.TransformerFactory

Sets a cloudevents extension (if missing) to defaultValue or update it with updater function

func UpdateAttribute

func UpdateAttribute(attributeKind spec.Kind, updater func(interface{}) (interface{}, error)) binding.TransformerFactory

Update cloudevents attribute (if present) using the provided function

func UpdateExtension

func UpdateExtension(name string, updater func(interface{}) (interface{}, error)) binding.TransformerFactory

Update cloudevents extension (if present) using the provided function

func Version

func Version(version spec.Version) binding.TransformerFactory

Converts the event context version to the specified one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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