Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrInvalidSchema ¶
type ErrInvalidSchema struct {
Errors []gojsonschema.ResultError
}
ErrInvalidSchema is return when a JSON schema is invalid
func (ErrInvalidSchema) Error ¶
func (e ErrInvalidSchema) Error() string
type JSONValidator ¶
type JSONValidator struct {
// contains filtered or unexported fields
}
JSONValidator validates graph nodes and edges using a JSON schema
func NewJSONValidator ¶
func NewJSONValidator() *JSONValidator
NewJSONValidator returns a new JSON schema validator
func (*JSONValidator) LoadSchema ¶
func (v *JSONValidator) LoadSchema(kind string, schema []byte)
LoadSchema loads a JSON schema for a kind of object
func (*JSONValidator) Validate ¶
func (v *JSONValidator) Validate(kind string, obj interface{}) error
Validate an object against the JSON schema associated to its kind
Click to show internal directories.
Click to hide internal directories.