validator

package
v0.15.10 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 9 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 backend",
}
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 Validate added in v0.14.0

func Validate(e envelope.Envelope, registry *registry.Registry) (isValid bool, validationError envelope.ValidationError, schema []byte)

Validate an envelope's payload according to the corresponding schema

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