builder

package
v0.0.0-...-20277e9 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct{}

Builder builds Validator objects from JSON schemas

func New

func New() *Builder

New creates a new builder object

func (*Builder) Build

func (b *Builder) Build(s *schema.Schema) (v *jsval.JSVal, err error)

Build creates a new validator from the specified schema

func (*Builder) BuildWithCtx

func (b *Builder) BuildWithCtx(s *schema.Schema, jsctx interface{}) (v *jsval.JSVal, err error)

BuildWithCtx creates a new validator from the specified schema, using the jsctx parameter as the context to resolve JSON References with. If you expect your schema to contain JSON references to itself, you will have to pass the context as a map with raw decoded JSON data

Jump to

Keyboard shortcuts

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