Versions in this module Expand all Collapse all v0 v0.2.0 May 9, 2024 Changes in this version type Type + const KeysCaseInsensitiveConstraintType v0.1.1 Nov 16, 2022 Changes in this version + type AdditionalProperties struct + func NewAdditionalProperties(ruleValue bytes.Bytes) *AdditionalProperties + func (AdditionalProperties) IsJsonTypeCompatible(t json.Type) bool + func (AdditionalProperties) Type() Type + func (c AdditionalProperties) ASTNode() schema.RuleASTNode + func (c AdditionalProperties) IsEqual(c2 AdditionalProperties) bool + func (c AdditionalProperties) Mode() AdditionalPropertiesMode + func (c AdditionalProperties) SchemaType() schema.SchemaType + func (c AdditionalProperties) String() string + func (c AdditionalProperties) TypeName() bytes.Bytes + type AdditionalPropertiesMode int + const AdditionalPropertiesCanBeAny + const AdditionalPropertiesMustBeSchemaType + const AdditionalPropertiesMustBeUserType + const AdditionalPropertiesNotAllowed + type AllOf struct + func NewAllOf() *AllOf + func (AllOf) IsJsonTypeCompatible(t json.Type) bool + func (AllOf) Type() Type + func (c *AllOf) Append(scalar bytes.Bytes) + func (c AllOf) ASTNode() schema.RuleASTNode + func (c AllOf) SchemaNames() []string + func (c AllOf) String() string + type AnyConstraint struct + func NewAny() *AnyConstraint + func (AnyConstraint) ASTNode() schema.RuleASTNode + func (AnyConstraint) IsJsonTypeCompatible(json.Type) bool + func (AnyConstraint) String() string + func (AnyConstraint) Type() Type + type ArrayValidator interface + ValidateTheArray func(numberOfChildren uint) + Value func() uint + type BoolKeeper interface + Bool func() bool + type BytesKeeper interface + Bytes func() bytes.Bytes + type Const struct + func NewConst(value, nodeValue bytes.Bytes) *Const + func (Const) IsJsonTypeCompatible(t json.Type) bool + func (Const) Type() Type + func (c Const) ASTNode() schema.RuleASTNode + func (c Const) Bool() bool + func (c Const) String() string + func (c Const) Validate(v bytes.Bytes) + type Constraint interface + ASTNode func() schema.RuleASTNode + IsJsonTypeCompatible func(json.Type) bool + String func() string + Type func() Type + func NewConstraintFromRule(ruleNameLex lexeme.LexEvent, ruleValue bytes.Bytes, nodeValue bytes.Bytes) Constraint + type Date struct + func NewDate() *Date + func (Date) ASTNode() schema.RuleASTNode + func (Date) IsJsonTypeCompatible(t json.Type) bool + func (Date) String() string + func (Date) Type() Type + func (Date) Validate(value bytes.Bytes) + type DateTime struct + func NewDateTime() *DateTime + func (DateTime) ASTNode() schema.RuleASTNode + func (DateTime) IsJsonTypeCompatible(t json.Type) bool + func (DateTime) String() string + func (DateTime) Type() Type + func (DateTime) Validate(value bytes.Bytes) + type Email struct + func NewEmail() *Email + func (Email) ASTNode() schema.RuleASTNode + func (Email) IsJsonTypeCompatible(t json.Type) bool + func (Email) String() string + func (Email) Type() Type + func (Email) Validate(email bytes.Bytes) + type Enum struct + func NewEnum() *Enum + func (Enum) IsJsonTypeCompatible(t json.Type) bool + func (Enum) Type() Type + func (c *Enum) Append(i EnumItem) int + func (c *Enum) RuleName() string + func (c *Enum) SetComment(idx int, comment string) + func (c *Enum) SetRuleName(s string) + func (c Enum) ASTNode() schema.RuleASTNode + func (c Enum) String() string + func (c Enum) Validate(a bytes.Bytes) + type EnumItem struct + func NewEnumItem(b bytes.Bytes, c string) EnumItem + func (v EnumItem) String() string + type ExclusiveMaximum struct + func NewExclusiveMaximum(ruleValue bytes.Bytes) *ExclusiveMaximum + func (ExclusiveMaximum) IsJsonTypeCompatible(t json.Type) bool + func (ExclusiveMaximum) Type() Type + func (c ExclusiveMaximum) ASTNode() schema.RuleASTNode + func (c ExclusiveMaximum) IsExclusive() bool + func (c ExclusiveMaximum) String() string + type ExclusiveMinimum struct + func NewExclusiveMinimum(ruleValue bytes.Bytes) *ExclusiveMinimum + func (ExclusiveMinimum) IsJsonTypeCompatible(t json.Type) bool + func (ExclusiveMinimum) Type() Type + func (c ExclusiveMinimum) ASTNode() schema.RuleASTNode + func (c ExclusiveMinimum) IsExclusive() bool + func (c ExclusiveMinimum) String() string + type LiteralValidator interface + Validate func(bytes.Bytes) + type Max struct + func NewMax(ruleValue bytes.Bytes) *Max + func (Max) IsJsonTypeCompatible(t json.Type) bool + func (Max) Type() Type + func (c *Max) Exclusive() bool + func (c *Max) SetExclusive(exclusive bool) + func (c *Max) Value() *json.Number + func (c Max) ASTNode() schema.RuleASTNode + func (c Max) String() string + func (c Max) Validate(value bytes.Bytes) + type MaxItems struct + func NewMaxItems(ruleValue bytes.Bytes) *MaxItems + func (MaxItems) IsJsonTypeCompatible(t json.Type) bool + func (MaxItems) Type() Type + func (c MaxItems) ASTNode() schema.RuleASTNode + func (c MaxItems) String() string + func (c MaxItems) ValidateTheArray(numberOfChildren uint) + func (c MaxItems) Value() uint + type MaxLength struct + func NewMaxLength(ruleValue bytes.Bytes) *MaxLength + func (MaxLength) IsJsonTypeCompatible(t json.Type) bool + func (MaxLength) Type() Type + func (c MaxLength) ASTNode() schema.RuleASTNode + func (c MaxLength) String() string + func (c MaxLength) Validate(value bytes.Bytes) + func (c MaxLength) Value() uint + type Min struct + func NewMin(ruleValue bytes.Bytes) *Min + func (Min) IsJsonTypeCompatible(t json.Type) bool + func (Min) Type() Type + func (c *Min) Exclusive() bool + func (c *Min) SetExclusive(exclusive bool) + func (c *Min) Value() *json.Number + func (c Min) ASTNode() schema.RuleASTNode + func (c Min) String() string + func (c Min) Validate(value bytes.Bytes) + type MinItems struct + func NewMinItems(ruleValue bytes.Bytes) *MinItems + func (MinItems) IsJsonTypeCompatible(t json.Type) bool + func (MinItems) Type() Type + func (c MinItems) ASTNode() schema.RuleASTNode + func (c MinItems) String() string + func (c MinItems) ValidateTheArray(numberOfChildren uint) + func (c MinItems) Value() uint + type MinLength struct + func NewMinLength(ruleValue bytes.Bytes) *MinLength + func (MinLength) IsJsonTypeCompatible(t json.Type) bool + func (MinLength) Type() Type + func (c MinLength) ASTNode() schema.RuleASTNode + func (c MinLength) String() string + func (c MinLength) Validate(value bytes.Bytes) + func (c MinLength) Value() uint + type Nullable struct + func NewNullable(ruleValue bytes.Bytes) *Nullable + func (Nullable) IsJsonTypeCompatible(json.Type) bool + func (Nullable) Type() Type + func (c Nullable) ASTNode() schema.RuleASTNode + func (c Nullable) Bool() bool + func (c Nullable) String() string + type Optional struct + func NewOptional(ruleValue bytes.Bytes) *Optional + func (Optional) IsJsonTypeCompatible(json.Type) bool + func (Optional) Type() Type + func (c Optional) ASTNode() schema.RuleASTNode + func (c Optional) Bool() bool + func (c Optional) String() string + type Or struct + func NewOr(s schema.RuleASTNodeSource) *Or + func (Or) ASTNode() schema.RuleASTNode + func (Or) IsJsonTypeCompatible(json.Type) bool + func (Or) String() string + func (Or) Type() Type + func (c Or) IsGenerated() bool + type Precision struct + func NewPrecision(ruleValue bytes.Bytes) *Precision + func (Precision) IsJsonTypeCompatible(t json.Type) bool + func (Precision) Type() Type + func (c Precision) ASTNode() schema.RuleASTNode + func (c Precision) String() string + func (c Precision) Validate(value bytes.Bytes) + type Regex struct + func NewRegex(value bytes.Bytes) *Regex + func (Regex) IsJsonTypeCompatible(t internalJSON.Type) bool + func (Regex) Type() Type + func (c Regex) ASTNode() schema.RuleASTNode + func (c Regex) String() string + func (c Regex) Validate(value bytes.Bytes) + type RequiredKeys struct + func NewRequiredKeys() *RequiredKeys + func (RequiredKeys) IsJsonTypeCompatible(t json.Type) bool + func (RequiredKeys) Type() Type + func (c *RequiredKeys) AddKey(key string) + func (c RequiredKeys) ASTNode() schema.RuleASTNode + func (c RequiredKeys) Keys() []string + func (c RequiredKeys) String() string + type Type int + const AdditionalPropertiesConstraintType + const AllOfConstraintType + const AnyConstraintType + const ConstConstraintType + const DateConstraintType + const DateTimeConstraintType + const EmailConstraintType + const EnumConstraintType + const ExclusiveMaximumConstraintType + const ExclusiveMinimumConstraintType + const MaxConstraintType + const MaxItemsConstraintType + const MaxLengthConstraintType + const MinConstraintType + const MinItemsConstraintType + const MinLengthConstraintType + const NullableConstraintType + const OptionalConstraintType + const OrConstraintType + const PrecisionConstraintType + const RegexConstraintType + const RequiredKeysConstraintType + const TypeConstraintType + const TypesListConstraintType + const UriConstraintType + const UuidConstraintType + func (t Type) String() string + type TypeConstraint struct + func NewType(ruleValue bytes.Bytes, source schema.RuleASTNodeSource) *TypeConstraint + func (TypeConstraint) IsJsonTypeCompatible(json.Type) bool + func (TypeConstraint) Type() Type + func (c TypeConstraint) ASTNode() schema.RuleASTNode + func (c TypeConstraint) Bytes() bytes.Bytes + func (c TypeConstraint) IsGenerated() bool + func (c TypeConstraint) Source() schema.RuleASTNodeSource + func (c TypeConstraint) String() string + type TypesList struct + func NewTypesList(s schema.RuleASTNodeSource) *TypesList + func (TypesList) IsJsonTypeCompatible(json.Type) bool + func (TypesList) Type() Type + func (c *TypesList) AddName(name, typ string, s schema.RuleASTNodeSource) + func (c *TypesList) AddNameWithASTNode(name, typ string, an schema.RuleASTNode) + func (c TypesList) ASTNode() schema.RuleASTNode + func (c TypesList) HasUserTypes() bool + func (c TypesList) Len() int + func (c TypesList) Names() []string + func (c TypesList) Source() schema.RuleASTNodeSource + func (c TypesList) String() string + type UUID struct + func NewUuid() *UUID + func (UUID) ASTNode() schema.RuleASTNode + func (UUID) IsJsonTypeCompatible(t json.Type) bool + func (UUID) String() string + func (UUID) Type() Type + func (UUID) Validate(value bytes.Bytes) + type Uri struct + func NewUri() *Uri + func (Uri) ASTNode() schema.RuleASTNode + func (Uri) IsJsonTypeCompatible(t json.Type) bool + func (Uri) String() string + func (Uri) Type() Type + func (Uri) Validate(value bytes.Bytes)