Versions in this module Expand all Collapse all v0 v0.45.0 Jun 27, 2022 v0.44.0 Jun 27, 2022 Changes in this version + const KeyAdditionalItems + const KeyAdditionalProperties + const KeyAllOf + const KeyAnyOf + const KeyConst + const KeyContains + const KeyDefinitions + const KeyDependencies + const KeyDescription + const KeyElse + const KeyEnum + const KeyExclusiveMaximum + const KeyExclusiveMinimum + const KeyFormat + const KeyID + const KeyIDNew + const KeyIf + const KeyItems + const KeyMaxItems + const KeyMaxLength + const KeyMaxProperties + const KeyMaximum + const KeyMinItems + const KeyMinLength + const KeyMinProperties + const KeyMinimum + const KeyMultipleOf + const KeyNot + const KeyOneOf + const KeyPattern + const KeyPatternProperties + const KeyProperties + const KeyPropertyNames + const KeyRef + const KeyRequired + const KeySchema + const KeyThen + const KeyTitle + const KeyType + const KeyUniqueItems + const StringArrayOfSchemas + const StringArrayOfStrings + const StringContextRoot + const StringDependency + const StringNumber + const StringProperties + const StringProperty + const StringRootSchemaProperty + const StringSchema + const StringSchemaOrArrayOfStrings + const StringUndefined + const TypeArray + const TypeBoolean + const TypeInteger + const TypeNull + const TypeNumber + const TypeObject + const TypeString + var ErrorTemplateFuncs template.FuncMap + var FormatCheckers = FormatCheckerChain + var JSONTypes []string + var Locale locale = DefaultLocale + var SchemaTypes []string + func SetAllowNet(hosts []string) + 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) False() 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 FalseError struct + 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 JSONContext struct + func NewJSONContext(head string, tail *JSONContext) *JSONContext + func (c *JSONContext) String(del ...string) string + 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 NewRawLoader(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 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 + DocumentReference gojsonreference.JsonReference + Pool *schemaPool + ReferencePool *schemaReferencePool + RootSchema *SubSchema + 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 SubSchema struct + AllOf []*SubSchema + AnyOf []*SubSchema + Draft *Draft + ID *gojsonreference.JsonReference + ItemsChildren []*SubSchema + ItemsChildrenIsSingleSchema bool + Parent *SubSchema + PropertiesChildren []*SubSchema + Property string + Ref *gojsonreference.JsonReference + RefSchema *SubSchema + Types jsonSchemaType + 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