Documentation ¶
Index ¶
- func AllowEventToDestTransformation(transformerEvent *transformer.TransformerEvent, supportedMsgTypes []string) (bool, *transformer.TransformerResponse)
- func ConvertToArrayOfType[T EventPropsTypes](data interface{}) []T
- func FilterEventsForHybridMode(connectionModeFilterParams ConnectionModeFilterParams) (bool, *transformer.TransformerResponse)
- func GetSupportedMessageEvents(destination *backendconfig.DestinationT) ([]string, bool)
- func GetSupportedMessageTypes(destination *backendconfig.DestinationT) ([]string, bool)
- type AllowTransformerEventParams
- type ConnectionModeFilterParams
- type EventParams
- type EventPropsTypes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowEventToDestTransformation ¶ added in v1.8.0
func AllowEventToDestTransformation(transformerEvent *transformer.TransformerEvent, supportedMsgTypes []string) (bool, *transformer.TransformerResponse)
AllowEventToDestTransformation lets the caller know if we need to allow the event to proceed to destination transformation.
Currently this method supports below validations(executed in the same order):
1. Validate if messageType sent in event is included in SupportedMessageTypes
2. Validate if the event is sendable to destination based on connectionMode, sourceType & messageType
func ConvertToArrayOfType ¶ added in v1.8.0
func ConvertToArrayOfType[T EventPropsTypes](data interface{}) []T
* Converts interface{} to []T if the go type-assertion allows it
func FilterEventsForHybridMode ¶ added in v1.8.0
func FilterEventsForHybridMode(connectionModeFilterParams ConnectionModeFilterParams) (bool, *transformer.TransformerResponse)
FilterEventsForHybridMode lets the caller know if the event is allowed to flow through server for a `specific destination` Introduced to support hybrid-mode event filtering on cloud-side
The template inside `destinationDefinition.Config.hybridModeCloudEventsFilter` would look like this ```
[sourceType]: { [eventProperty]: [...supportedEventPropertyValues] }
```
Example:
{ ... "hybridModeCloudEventsFilter": { "web": { "messageType": ["track", "page"] } }, ... }
func GetSupportedMessageEvents ¶
func GetSupportedMessageEvents(destination *backendconfig.DestinationT) ([]string, bool)
GetSupportedEvents returns the supported message events for the given destination, based on configuration. If no relevant configuration is found, returns false
func GetSupportedMessageTypes ¶
func GetSupportedMessageTypes(destination *backendconfig.DestinationT) ([]string, bool)
GetSupportedMessageTypes returns the supported message types for the given event, based on configuration. If no relevant configuration is found, returns false
Types ¶
type AllowTransformerEventParams ¶ added in v1.8.0
type AllowTransformerEventParams struct { TransformerEvent *transformer.TransformerEvent SupportedMessageTypes []string }
type ConnectionModeFilterParams ¶ added in v1.8.0
type ConnectionModeFilterParams struct { Destination *backendconfig.DestinationT SrcType string Event *EventParams DefaultBehaviour bool }
type EventParams ¶ added in v1.8.0
type EventParams struct {
MessageType string
}
type EventPropsTypes ¶ added in v1.8.0
type EventPropsTypes interface { ~string }