Versions in this module Expand all Collapse all v1 v1.1.0 Jan 8, 2019 Changes in this version + const KEY_ADDITIONAL_ITEMS + const KEY_ADDITIONAL_PROPERTIES + const KEY_ALL_OF + const KEY_ANY_OF + const KEY_CONST + const KEY_CONTAINS + const KEY_DEFINITIONS + const KEY_DEPENDENCIES + const KEY_DESCRIPTION + const KEY_ELSE + const KEY_ENUM + const KEY_EXCLUSIVE_MAXIMUM + const KEY_EXCLUSIVE_MINIMUM + const KEY_FORMAT + const KEY_ID + const KEY_ID_NEW + const KEY_IF + const KEY_ITEMS + const KEY_MAXIMUM + const KEY_MAX_ITEMS + const KEY_MAX_LENGTH + const KEY_MAX_PROPERTIES + const KEY_MINIMUM + const KEY_MIN_ITEMS + const KEY_MIN_LENGTH + const KEY_MIN_PROPERTIES + const KEY_MULTIPLE_OF + const KEY_NOT + const KEY_ONE_OF + const KEY_PATTERN + const KEY_PATTERN_PROPERTIES + const KEY_PROPERTIES + const KEY_PROPERTY_NAMES + const KEY_REF + const KEY_REQUIRED + const KEY_SCHEMA + const KEY_THEN + const KEY_TITLE + const KEY_TYPE + const KEY_UNIQUE_ITEMS + const STRING_ARRAY_OF_SCHEMAS + const STRING_ARRAY_OF_STRINGS + const STRING_CONTEXT_ROOT + const STRING_DEPENDENCY + const STRING_NUMBER + const STRING_PROPERTIES + const STRING_PROPERTY + const STRING_ROOT_SCHEMA_PROPERTY + const STRING_SCHEMA + const STRING_SCHEMA_OR_ARRAY_OF_STRINGS + const STRING_UNDEFINED + const TYPE_ARRAY + const TYPE_BOOLEAN + const TYPE_INTEGER + const TYPE_NULL + const TYPE_NUMBER + const TYPE_OBJECT + const TYPE_STRING + var ErrorTemplateFuncs template.FuncMap + var FormatCheckers = FormatCheckerChain + var JSON_TYPES []string + var Locale locale = DefaultLocale + var SCHEMA_TYPES []string + func NewRawLoader(source interface{}) *jsonRawLoader + type AdditionalPropertyNotAllowedError struct + type ArrayContainsError struct + type ArrayMaxItemsError struct + type ArrayMaxPropertiesError struct + type ArrayMinItemsError struct + type ArrayMinPropertiesError struct + type ArrayNoAdditionalItemsError struct + type ConditionElseError struct + type ConditionThenError struct + type ConstError struct + type DateFormatChecker struct + func (f DateFormatChecker) IsFormat(input interface{}) bool + type DateTimeFormatChecker struct + func (f DateTimeFormatChecker) IsFormat(input interface{}) bool + type DefaultJSONLoaderFactory struct + func (d DefaultJSONLoaderFactory) New(source string) JSONLoader + type DefaultLocale struct + func (l DefaultLocale) AdditionalPropertyNotAllowed() string + func (l DefaultLocale) ArrayContains() string + func (l DefaultLocale) ArrayMaxItems() string + func (l DefaultLocale) ArrayMaxProperties() string + func (l DefaultLocale) ArrayMinItems() string + func (l DefaultLocale) ArrayMinProperties() string + func (l DefaultLocale) ArrayNoAdditionalItems() string + func (l DefaultLocale) ArrayNotEnoughItems() string + func (l DefaultLocale) CannotBeGT() string + func (l DefaultLocale) CannotBeUsedWithout() string + func (l DefaultLocale) ConditionElse() string + func (l DefaultLocale) ConditionThen() string + func (l DefaultLocale) Const() string + func (l DefaultLocale) DoesNotMatchFormat() string + func (l DefaultLocale) DoesNotMatchPattern() string + func (l DefaultLocale) Duplicated() string + func (l DefaultLocale) Enum() string + func (l DefaultLocale) ErrorFormat() string + func (l DefaultLocale) GreaterThanZero() string + func (l DefaultLocale) HttpBadStatus() string + func (l DefaultLocale) Internal() string + func (l DefaultLocale) InvalidPropertyName() string + func (l DefaultLocale) InvalidPropertyPattern() string + func (l DefaultLocale) InvalidType() string + func (l DefaultLocale) KeyCannotBeGreaterThan() string + func (l DefaultLocale) KeyItemsMustBeOfType() string + func (l DefaultLocale) KeyItemsMustBeUnique() string + func (l DefaultLocale) MissingDependency() string + func (l DefaultLocale) MultipleOf() string + func (l DefaultLocale) MustBeGTEZero() string + func (l DefaultLocale) MustBeOfA() string + func (l DefaultLocale) MustBeOfAn() string + func (l DefaultLocale) MustBeOfType() string + func (l DefaultLocale) MustBeValidFormat() string + func (l DefaultLocale) MustBeValidRegex() string + func (l DefaultLocale) NotAValidType() string + func (l DefaultLocale) NumberAllOf() string + func (l DefaultLocale) NumberAnyOf() string + func (l DefaultLocale) NumberGT() string + func (l DefaultLocale) NumberGTE() string + func (l DefaultLocale) NumberLT() string + func (l DefaultLocale) NumberLTE() string + func (l DefaultLocale) NumberNot() string + func (l DefaultLocale) NumberOneOf() string + func (l DefaultLocale) ParseError() string + func (l DefaultLocale) ReferenceMustBeCanonical() string + func (l DefaultLocale) RegexPattern() string + func (l DefaultLocale) Required() string + func (l DefaultLocale) StringGTE() string + func (l DefaultLocale) StringLTE() string + func (l DefaultLocale) Unique() string + type DoesNotMatchFormatError struct + type DoesNotMatchPatternError struct + type Draft int + const Draft4 + const Draft6 + const Draft7 + const Hybrid + type EmailFormatChecker struct + func (f EmailFormatChecker) IsFormat(input interface{}) bool + type EnumError struct + type ErrorDetails map[string]interface + type FileSystemJSONLoaderFactory struct + func (f FileSystemJSONLoaderFactory) New(source string) JSONLoader + type FormatChecker interface + IsFormat func(input interface{}) bool + type FormatCheckerChain struct + func (c *FormatCheckerChain) Add(name string, f FormatChecker) *FormatCheckerChain + func (c *FormatCheckerChain) Has(name string) bool + func (c *FormatCheckerChain) IsFormat(name string, input interface{}) bool + func (c *FormatCheckerChain) Remove(name string) *FormatCheckerChain + type HostnameFormatChecker struct + func (f HostnameFormatChecker) IsFormat(input interface{}) bool + type IPV4FormatChecker struct + func (f IPV4FormatChecker) IsFormat(input interface{}) bool + type IPV6FormatChecker struct + func (f IPV6FormatChecker) IsFormat(input interface{}) bool + type InternalError struct + type InvalidPropertyNameError struct + type InvalidPropertyPatternError struct + type InvalidTypeError struct + type ItemsMustBeUniqueError struct + type JSONLoader interface + JsonReference func() (gojsonreference.JsonReference, error) + JsonSource func() interface{} + LoadJSON func() (interface{}, error) + LoaderFactory func() JSONLoaderFactory + func NewBytesLoader(source []byte) JSONLoader + func NewGoLoader(source interface{}) JSONLoader + func NewReaderLoader(source io.Reader) (JSONLoader, io.Reader) + func NewReferenceLoader(source string) JSONLoader + func NewReferenceLoaderFileSystem(source string, fs http.FileSystem) JSONLoader + func NewStringLoader(source string) JSONLoader + func NewWriterLoader(source io.Writer) (JSONLoader, io.Writer) + type JSONLoaderFactory interface + New func(source string) JSONLoader + type JSONPointerFormatChecker struct + func (f JSONPointerFormatChecker) IsFormat(input interface{}) bool + type JsonContext struct + func NewJsonContext(head string, tail *JsonContext) *JsonContext + func (c *JsonContext) String(del ...string) string + type MissingDependencyError struct + type MultipleOfError struct + type NumberAllOfError struct + type NumberAnyOfError struct + type NumberGTEError struct + type NumberGTError struct + type NumberLTEError struct + type NumberLTError struct + type NumberNotError struct + type NumberOneOfError struct + type RegexFormatChecker struct + func (f RegexFormatChecker) IsFormat(input interface{}) bool + type RelativeJSONPointerFormatChecker struct + func (f RelativeJSONPointerFormatChecker) IsFormat(input interface{}) bool + type RequiredError struct + type Result struct + func Validate(ls JSONLoader, ld JSONLoader) (*Result, error) + func (v *Result) AddError(err ResultError, details ErrorDetails) + func (v *Result) Errors() []ResultError + func (v *Result) Valid() bool + type ResultError interface + Context func() *JsonContext + Description func() string + DescriptionFormat func() string + Details func() ErrorDetails + Field func() string + SetContext func(*JsonContext) + SetDescription func(string) + SetDescriptionFormat func(string) + SetDetails func(ErrorDetails) + SetType func(string) + SetValue func(interface{}) + String func() string + Type func() string + Value func() interface{} + type ResultErrorFields struct + func (v *ResultErrorFields) Context() *JsonContext + func (v *ResultErrorFields) Description() string + func (v *ResultErrorFields) DescriptionFormat() string + func (v *ResultErrorFields) Details() ErrorDetails + func (v *ResultErrorFields) Field() string + func (v *ResultErrorFields) SetContext(context *JsonContext) + func (v *ResultErrorFields) SetDescription(description string) + func (v *ResultErrorFields) SetDescriptionFormat(descriptionFormat string) + func (v *ResultErrorFields) SetDetails(details ErrorDetails) + func (v *ResultErrorFields) SetType(errorType string) + func (v *ResultErrorFields) SetValue(value interface{}) + func (v *ResultErrorFields) Type() string + func (v *ResultErrorFields) Value() interface{} + func (v ResultErrorFields) String() string + type Schema struct + func NewSchema(l JSONLoader) (*Schema, error) + func (d *Schema) SetRootSchemaName(name string) + func (v *Schema) Validate(l JSONLoader) (*Result, error) + type SchemaLoader struct + AutoDetect bool + Draft Draft + Validate bool + func NewSchemaLoader() *SchemaLoader + func (sl *SchemaLoader) AddSchema(url string, loader JSONLoader) error + func (sl *SchemaLoader) AddSchemas(loaders ...JSONLoader) error + func (sl *SchemaLoader) Compile(rootSchema JSONLoader) (*Schema, error) + type StringLengthGTEError struct + type StringLengthLTEError struct + type TimeFormatChecker struct + func (f TimeFormatChecker) IsFormat(input interface{}) bool + type URIFormatChecker struct + func (f URIFormatChecker) IsFormat(input interface{}) bool + type URIReferenceFormatChecker struct + func (f URIReferenceFormatChecker) IsFormat(input interface{}) bool + type URITemplateFormatChecker struct + func (f URITemplateFormatChecker) IsFormat(input interface{}) bool + type UUIDFormatChecker struct + func (f UUIDFormatChecker) IsFormat(input interface{}) bool