validator

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidPayload = InvalidMessage{
	Type:       "invalid payload",
	Resolution: "publish a valid payload",
}
View Source
var InvalidSchema = InvalidMessage{
	Type:       "invalid schema",
	Resolution: "ensure schema is properly formatted",
}
View Source
var NoSchemaAssociated = InvalidMessage{
	Type:       "no schema associated",
	Resolution: "associate a schema with the event",
}
View Source
var NoSchemaInBackend = InvalidMessage{
	Type:       "schema not published to cache backend",
	Resolution: "publish schema to the cache backed",
}
View Source
var PayloadNotPresent = InvalidMessage{
	Type:       "payload not present",
	Resolution: "publish the event with a payload",
}
View Source
var UnknownSnowplowEventType = InvalidMessage{
	Type:       "unknown snowplow event type",
	Resolution: "event type should adhere to the snowplow tracker protocol",
}

Functions

func ValidatePayload

func ValidatePayload(schemaName string, payload event.Payload, registry *registry.Registry) (isValid bool, validationError envelope.ValidationError, schema []byte)

Types

type InvalidMessage

type InvalidMessage struct {
	Type       string `json:"type"`
	Resolution string `json:"resolution"`
}

Jump to

Keyboard shortcuts

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