Documentation ¶
Overview ¶
Package transformer provides methods for creating event message transformers.
Index ¶
- Variables
- func AddAttribute(attributeKind spec.Kind, value interface{}) binding.TransformerFunc
- func AddExtension(name string, value interface{}) binding.TransformerFunc
- func DeleteAttribute(attributeKind spec.Kind) binding.TransformerFunc
- func DeleteExtension(name string) binding.TransformerFunc
- func SetAttribute(attribute spec.Kind, updater func(interface{}) (interface{}, error)) binding.TransformerFunc
- func SetExtension(name string, updater func(interface{}) (interface{}, error)) binding.TransformerFunc
- func Version(newVersion spec.Version) binding.TransformerFunc
Constants ¶
This section is empty.
Variables ¶
var ( // Add the cloudevents time attribute, if missing, to time.Now() AddTimeNow binding.Transformer = addTimeNow{} )
Functions ¶
func AddAttribute ¶
func AddAttribute(attributeKind spec.Kind, value interface{}) binding.TransformerFunc
AddAttribute adds a cloudevents attribute (if missing) during the encoding process
func AddExtension ¶
func AddExtension(name string, value interface{}) binding.TransformerFunc
AddExtension adds a cloudevents extension (if missing) during the encoding process
func DeleteAttribute ¶
func DeleteAttribute(attributeKind spec.Kind) binding.TransformerFunc
DeleteAttribute deletes a cloudevents attribute during the encoding process
func DeleteExtension ¶
func DeleteExtension(name string) binding.TransformerFunc
DeleteExtension deletes a cloudevents extension during the encoding process
func SetAttribute ¶
func SetAttribute(attribute spec.Kind, updater func(interface{}) (interface{}, error)) binding.TransformerFunc
SetAttribute sets a cloudevents attribute using the provided function. updater gets a zero value as input if no previous value was found. To test a zero value, use types.IsZero(). updater must return nil, nil if the user wants to remove the attribute
func SetExtension ¶
func SetExtension(name string, updater func(interface{}) (interface{}, error)) binding.TransformerFunc
SetExtension sets a cloudevents extension using the provided function. updater gets a zero value as input if no previous value was found. To test a zero value, use types.IsZero() updater must return nil, nil if the user wants to remove the extension
Types ¶
This section is empty.