Documentation ¶
Index ¶
- Constants
- func CollectDestErrorStats(input []byte)
- func CollectIntgTransformErrorStats(input []byte)
- func FilterClientIntegrations(clientEvent types.SingularEventT, ...) (retVal []string)
- func GetDestinationURL(destType string) string
- func GetTrackingPlanValidationURL() string
- func GetTransformerURL() string
- func GetUserTransformURL() string
- func Init()
- func ValidatePostInfo(transformRawParams PostParametersT) error
- type PostParametersT
- type TransResponseT
- type TransStatsT
Constants ¶
const ( // PostDataKV means post data is sent as KV PostDataKV = iota + 1 // PostDataJSON means post data is sent as JSON PostDataJSON // PostDataXML means post data is sent as XML PostDataXML )
Variables ¶
This section is empty.
Functions ¶
func CollectDestErrorStats ¶ added in v0.1.10
func CollectDestErrorStats(input []byte)
func CollectIntgTransformErrorStats ¶ added in v0.1.10
func CollectIntgTransformErrorStats(input []byte)
func FilterClientIntegrations ¶ added in v0.1.10
func FilterClientIntegrations(clientEvent types.SingularEventT, destNameIDMap map[string]backendconfig.DestinationDefinitionT) (retVal []string)
FilterClientIntegrations parses the destination names from the input JSON, matches them with enabled destinations from controle plane and returns the IDSs
func GetDestinationURL ¶
GetDestinationURL returns node URL
func GetTrackingPlanValidationURL ¶ added in v0.1.10
func GetTrackingPlanValidationURL() string
GetTrackingPlanValidationURL returns the port of running tracking plan validation
func GetTransformerURL ¶ added in v0.1.10
func GetTransformerURL() string
GetTransformerURL gets the transfomer base url endpoint
func GetUserTransformURL ¶
func GetUserTransformURL() string
GetUserTransformURL returns the port of running user transform
func ValidatePostInfo ¶ added in v0.1.10
func ValidatePostInfo(transformRawParams PostParametersT) error
GetPostInfo parses the transformer response
Types ¶
type PostParametersT ¶ added in v0.1.10
type PostParametersT struct { Type string `json:"type"` URL string `json:"endpoint"` RequestMethod string `json:"method"` // Invalid tag used in struct. skipcq: SCC-SA5008 UserID string `json:"userId,,optional"` //nolint:staticcheck Headers map[string]interface{} `json:"headers"` QueryParams map[string]interface{} `json:"params"` Body map[string]interface{} `json:"body"` Files map[string]interface{} `json:"files"` }
PostParametersT is a struct for holding all the values from transformerResponse and use them to publish an event to a destination optional is a custom tag introduced by us and is handled by GetMandatoryJSONFieldNames. Its intentionally added after two commas because the tag that comes after the first comma should be known by json parser