integrations

package
v1.13.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

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