Documentation ¶
Overview ¶
Package validator holds utilities for validating data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONSchemaValidator ¶
type JSONSchemaValidator struct {
// contains filtered or unexported fields
}
JSONSchemaValidator is entity that has ability to validate data against JSON schema.
func NewJSONSchemaValidator ¶
func NewJSONSchemaValidator(schemasDir string) JSONSchemaValidator
func (JSONSchemaValidator) Validate ¶
func (jsv JSONSchemaValidator) Validate(document, schemaPath string) error
Validate validates document against JSON schema located in schemaPath.
type SchemaValidator ¶
type SchemaValidator interface { // Validate validates document against some kind of schema located in schemaPath. Validate(document, schemaPath string) error }
SchemaValidator describes entity that can validate document against some kind of schema.
Click to show internal directories.
Click to hide internal directories.