integrations

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
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

func GetDestinationURL(destType string) string

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 Init added in v0.1.10

func Init()

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

type TransResponseT added in v0.1.10

type TransResponseT struct {
	Message             string      `json:"message"`
	DestinationResponse interface{} `json:"destinationResponse"`
	AuthErrorCategory   string      `json:"authErrorCategory"`
}

type TransStatsT added in v0.1.10

type TransStatsT struct {
	StatTags map[string]string `json:"statTags"`
}

Jump to

Keyboard shortcuts

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