Versions in this module Expand all Collapse all v0 v0.1.2 Aug 16, 2021 v0.1.1 Aug 16, 2021 v0.1.0 Aug 16, 2021 Changes in this version + func AddError(err, errs error) error + func ConvertRegexp(re string) string + func IsInteger(val []byte) bool + func NewStringPtr(b []byte) *string + func Validate(value []byte, vt ValueType, schema *Schema) error + func ValidateAllOf(value []byte, vt ValueType, schema *Schema) error + func ValidateAnyOf(value []byte, vt ValueType, schema *Schema) error + func ValidateBoolean(value []byte, vt ValueType, schema *Schema) error + func ValidateConst(value []byte, vt ValueType, schema *Schema) error + func ValidateDependencies(value []byte, vt ValueType, schema *Schema) error + func ValidateEnum(value []byte, vt ValueType, schema *Schema) error + func ValidateFormat(value []byte, vt ValueType, schema *Schema) error + func ValidateIf(value []byte, vt ValueType, schema *Schema) error + func ValidateItems(value []byte, vt ValueType, schema *Schema) error + func ValidateMaxLength(value []byte, vt ValueType, schema *Schema) error + func ValidateMaximum(value []byte, vt ValueType, schema *Schema) error + func ValidateMinLength(value []byte, vt ValueType, schema *Schema) error + func ValidateMinimum(value []byte, vt ValueType, schema *Schema) error + func ValidateMultipleOf(value []byte, vt ValueType, schema *Schema) error + func ValidateNot(value []byte, vt ValueType, schema *Schema) error + func ValidateOneOf(value []byte, vt ValueType, schema *Schema) error + func ValidatePattern(value []byte, vt ValueType, schema *Schema) error + func ValidateProperties(value []byte, vt ValueType, schema *Schema) error + func ValidatePropertyNames(value []byte, vt ValueType, schema *Schema) error + func ValidateRef(value []byte, vt ValueType, schema *Schema) error + func ValidateRequired(value []byte, vt ValueType, schema *Schema) error + func ValidateType(value []byte, vt ValueType, schema *Schema) error + func ValidateValue(value []byte, vt ValueType, schema *Schema) error + type Definitions map[string]*Schema + func (p Definitions) MarshalJSON() ([]byte, error) + type Dependencies map[string]*Dependency + func NewDependencies(jsonVal []byte, vt jsonparser.ValueType, parentSchema *Schema) (*Dependencies, error) + func (d Dependencies) MarshalJSON() ([]byte, error) + type Dependency struct + Schema *Schema + Strings *Strings + func NewDependency(jsonVal []byte, vt jsonparser.ValueType, parentSchema *Schema) (*Dependency, error) + func (i Dependency) MarshalJSON() ([]byte, error) + type Enum []*Value + func NewEnum(jsonVal []byte, vt jsonparser.ValueType) (*Enum, error) + func (e Enum) MarshalJSON() ([]byte, error) + type Items struct + Boolean *bool + Schema *Schema + Schemas *Schemas + func NewItems(jsonVal []byte, vt jsonparser.ValueType, parentSchema *Schema) (*Items, error) + func (i Items) MarshalJSON() ([]byte, error) + type Properties map[string]*Schema + func NewDefinitions(jsonVal []byte, vt jsonparser.ValueType, parentSchema *Schema) (*Properties, error) + func NewProperties(jsonVal []byte, vt jsonparser.ValueType, parentSchema *Schema) (*Properties, error) + func (p Properties) MarshalJSON() ([]byte, error) + type Ref struct + Schema *Schema + String *string + func NewRef(jsonVal []byte, vt jsonparser.ValueType, parentSchema *Schema) (*Ref, error) + func (r Ref) MarshalJSON() ([]byte, error) + type Schema struct + AdditionalItems *Schema + AdditionalProperties *Schema + AllOf *Schemas + AnyOf *Schemas + Comment *string + Const *Value + Contains *Schema + ContentEncoding *string + ContentMediaType *string + Default *Value + Definitions *Properties + Dependencies *Dependencies + Description *string + Else *Schema + Enum *Enum + Examples *Values + ExclusiveMaximum *Value + ExclusiveMinimum *Value + Format *string + ID *string + IDDraft04 *string + If *Schema + Items *Items + MaxItems *int64 + MaxLength *int64 + MaxProperties *int64 + Maximum *Value + MinItems *int64 + MinLength *int64 + MinProperties *int64 + Minimum *Value + MultipleOf *json.Number + Not *Schema + OneOf *Schemas + Pattern *string + PatternProperties *Properties + Properties *Properties + PropertyNames *Schema + ReadOnly *bool + Ref *Ref + Required *Strings + Schema *string + Then *Schema + Title *string + Type *Type + UniqueItems *bool + WriteOnly *bool + func New(schema []byte) (*Schema, error) + func NewFromString(schema string) (*Schema, error) + func (s *Schema) DeRef() error + func (s *Schema) ExpandURI(uri string) (*url.URL, error) + func (s *Schema) Parse(jsonSchema []byte) (*Schema, error) + func (s *Schema) ResolveRef(ref *Ref) (*Schema, error) + func (s *Schema) Validate(jsonDoc []byte) (bool, error) + func (s Schema) GetID() string + func (s Schema) IsDraft4() bool + func (s Schema) IsDraft6() bool + func (s Schema) IsDraft7() bool + func (s Schema) IsEmpty() bool + func (s Schema) MarshalJSON() ([]byte, error) + func (s Schema) String() string + type SchemaProp uint8 + const PropAdditionalItems + const PropAdditionalProperties + const PropAllOf + const PropAnyOf + const PropComment + const PropConst + const PropContains + const PropContentEncoding + const PropContentMediaType + const PropDefault + const PropDefinitions + const PropDependencies + const PropDescription + const PropElse + const PropEnum + const PropExamples + const PropExclusiveMaximum + const PropExclusiveMinimum + const PropFormat + const PropID + const PropIDDraft04 + const PropIf + const PropItems + const PropMaxItems + const PropMaxLength + const PropMaxProperties + const PropMaximum + const PropMinItems + const PropMinLength + const PropMinProperties + const PropMinimum + const PropMultipleOf + const PropNot + const PropOneOf + const PropPattern + const PropPatternProperties + const PropProperties + const PropPropertyNames + const PropReadOnly + const PropRef + const PropRequired + const PropSchema + const PropThen + const PropTitle + const PropType + const PropUniqueItems + const PropWriteOnly + type Schemas []*Schema + func NewSubSchemas(jsonVal []byte, vt jsonparser.ValueType, parentSchema *Schema) (*Schemas, error) + func (s Schemas) MarshalJSON() ([]byte, error) + type Strings []*string + func NewStrings(jsonVal []byte, vt jsonparser.ValueType) (*Strings, error) + func (p Strings) MarshalJSON() ([]byte, error) + type Type struct + String *string + Strings *[]*string + func NewType(jsonVal []byte, vt jsonparser.ValueType) (*Type, error) + func (t Type) Has(vt ValueType) bool + func (t Type) MarshalJSON() ([]byte, error) + type Value struct + Array *[]interface{} + Boolean *bool + Null *bool + Number *big.Float + Object *map[string]interface{} + String *string + func NewValue(jsonVal []byte, vt jsonparser.ValueType) (*Value, error) + func (v *Value) Equal(val *Value) bool + func (v Value) MarshalJSON() ([]byte, error) + type ValueType uint8 + const Array + const Boolean + const Integer + const NotExist + const Null + const Number + const Object + const String + const Unknown + func DetectJSONType(data []byte) ValueType + func (v ValueType) ParserValueType() jsonparser.ValueType + func (v ValueType) String() string + type Values []*Value + func NewValues(jsonVal []byte, vt jsonparser.ValueType) (*Values, error) + func (v Values) MarshalJSON() ([]byte, error)