Documentation ¶
Index ¶
Constants ¶
View Source
const ( UserTransformerStage = "user_transformer" EventFilterStage = "event_filter" DestTransformerStage = "dest_transformer" TrackingPlanValidationStage = "trackingPlan_validation" )
View Source
const ( StatusCPDown = 809 TransformerRequestFailure = 909 )
Variables ¶
This section is empty.
Functions ¶
func GetVersion ¶
func GetVersion() (transformerBuildVersion string)
GetVersion gets the transformer version by asking it on /transfomerBuildVersion. if there is any error it returns empty string
Types ¶
type HandleT ¶
HandleT is the handle for this class
type MetadataT ¶
type MetadataT struct { SourceID string `json:"sourceId"` WorkspaceID string `json:"workspaceId"` Namespace string `json:"namespace"` InstanceID string `json:"instanceId"` SourceType string `json:"sourceType"` SourceCategory string `json:"sourceCategory"` TrackingPlanId string `json:"trackingPlanId"` TrackingPlanVersion int `json:"trackingPlanVersion"` SourceTpConfig map[string]map[string]interface{} `json:"sourceTpConfig"` MergedTpConfig map[string]interface{} `json:"mergedTpConfig"` DestinationID string `json:"destinationId"` JobID int64 `json:"jobId"` SourceJobID string `json:"sourceJobId"` SourceJobRunID string `json:"sourceJobRunId"` SourceTaskRunID string `json:"sourceTaskRunId"` RecordID interface{} `json:"recordId"` DestinationType string `json:"destinationType"` MessageID string `json:"messageId"` OAuthAccessToken string `json:"oauthAccessToken"` // set by user_transformer to indicate transformed event is part of group indicated by messageIDs MessageIDs []string `json:"messageIds"` RudderID string `json:"rudderId"` ReceivedAt string `json:"receivedAt"` EventName string `json:"eventName"` EventType string `json:"eventType"` SourceDefinitionID string `json:"sourceDefinitionId"` DestinationDefinitionID string `json:"destinationDefinitionId"` TransformationID string `json:"transformationId"` TransformationVersionID string `json:"transformationVersionId"` SourceDefinitionType string `json:"-"` }
type ResponseT ¶
type ResponseT struct { Events []TransformerResponseT FailedEvents []TransformerResponseT }
ResponseT represents a Transformer response
type Transformer ¶
type Transformer interface { Setup() Transform(ctx context.Context, clientEvents []TransformerEventT, url string, batchSize int) ResponseT Validate(clientEvents []TransformerEventT, url string, batchSize int) ResponseT }
Transformer provides methods to transform events
type TransformerEventT ¶
type TransformerEventT struct { Message types.SingularEventT `json:"message"` Metadata MetadataT `json:"metadata"` Destination backendconfig.DestinationT `json:"destination"` Libraries []backendconfig.LibraryT `json:"libraries"` }
type TransformerResponseT ¶
type TransformerResponseT struct { // Not marking this Singular Event, since this not a RudderEvent Output map[string]interface{} `json:"output"` Metadata MetadataT `json:"metadata"` StatusCode int `json:"statusCode"` Error string `json:"error"` ValidationErrors []ValidationErrorT `json:"validationErrors"` }
Click to show internal directories.
Click to hide internal directories.