validator

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

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