errs

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code int
const (
	ErrGeneric        Code = 0
	ErrRuntimeFailure Code = 1

	ErrUserTypeFound                       Code = 101
	ErrUnknownValueOfTheTypeRule           Code = 102
	ErrUnknownJSchemaType                  Code = 103
	ErrInfiniteRecursionDetected           Code = 104
	ErrNodeTypeCantBeGuessed               Code = 105
	ErrUnableToDetermineTheTypeOfJsonValue Code = 106

	ErrValidator                       Code = 201
	ErrEmptySchema                     Code = 202
	ErrEmptyJson                       Code = 203
	ErrOrRuleSetValidation             Code = 204
	ErrRequiredKeyNotFound             Code = 205
	ErrSchemaDoesNotSupportKey         Code = 206
	ErrUnexpectedLexInLiteralValidator Code = 207
	ErrUnexpectedLexInObjectValidator  Code = 208
	ErrUnexpectedLexInArrayValidator   Code = 209
	ErrInvalidValueType                Code = 210
	ErrInvalidKeyType                  Code = 211
	ErrUnexpectedLexInMixedValidator   Code = 212
	ErrObjectExpected                  Code = 213
	ErrPropertyNotFound                Code = 214

	ErrInvalidCharacter                      Code = 301
	ErrInvalidCharacterInAnnotationObjectKey Code = 302
	ErrUnexpectedEOF                         Code = 303
	ErrAnnotationNotAllowed                  Code = 304
	ErrEmptySetOfLexicalEvents               Code = 305
	ErrIncorrectEndingOfTheLexicalEvent      Code = 306

	ErrNodeGrow                 Code = 401
	ErrDuplicateKeysInSchema    Code = 402
	ErrDuplicationOfNameOfTypes Code = 403

	ErrDuplicateRule          Code = 501
	ErrUnexpectedLexicalEvent Code = 502

	ErrUnknownRule                                 Code = 601
	ErrConstraintValidation                        Code = 602
	ErrConstraintStringLengthValidation            Code = 603
	ErrInvalidValueOfConstraint                    Code = 604
	ErrZeroPrecision                               Code = 605
	ErrEmptyEmail                                  Code = 606
	ErrInvalidEmail                                Code = 607
	ErrConstraintMinItemsValidation                Code = 608
	ErrConstraintMaxItemsValidation                Code = 609
	ErrDoesNotMatchAnyOfTheEnumValues              Code = 610
	ErrDoesNotMatchRegularExpression               Code = 611
	ErrInvalidURI                                  Code = 612
	ErrInvalidDateTime                             Code = 613
	ErrInvalidUUID                                 Code = 614
	ErrInvalidConst                                Code = 615
	ErrInvalidDate                                 Code = 616
	ErrValueOfOneConstraintGreaterThanAnother      Code = 617
	ErrValueOfOneConstraintGreaterOrEqualToAnother Code = 618

	ErrInvalidSchemaName                Code = 701
	ErrInvalidSchemaNameInAllOfRule     Code = 702
	ErrUnacceptableRecursionInAllOfRule Code = 703
	ErrUnacceptableUserTypeInAllOfRule  Code = 704
	ErrConflictAdditionalProperties     Code = 705
	ErrLoadError                        Code = 706

	ErrLoader                           Code = 801
	ErrIncorrectRuleValueType           Code = 802
	ErrIncorrectRuleWithoutExample      Code = 803
	ErrIncorrectRuleForSeveralNode      Code = 804
	ErrLiteralValueExpected             Code = 805
	ErrInvalidValueInEnumRule           Code = 806
	ErrIncorrectArrayItemTypeInEnumRule Code = 807
	ErrUnacceptableValueInAllOfRule     Code = 808
	ErrTypeNameNotFoundInAllOfRule      Code = 809
	ErrDuplicationInEnumRule            Code = 810
	ErrRuleIsAlreadyCompiled            Code = 811
	ErrRuleIsNil                        Code = 812

	ErrArrayWasExpectedInOrRule       Code = 901
	ErrEmptyArrayInOrRule             Code = 902
	ErrOneElementInArrayInOrRule      Code = 903
	ErrIncorrectArrayItemTypeInOrRule Code = 904
	ErrEmptyRuleSet                   Code = 905
	ErrTypIsRequiredInsideOr          Code = 906

	ErrRuleOptionalAppliesOnlyToObjectProperties Code = 1101
	ErrCannotSpecifyOtherRulesWithTypeReference  Code = 1102
	ErrShouldBeNoOtherRulesInSetWithOr           Code = 1103
	ErrShouldBeNoOtherRulesInSetWithEnum         Code = 1104
	ErrShouldBeNoOtherRulesInSetWithAny          Code = 1105
	ErrInvalidNestedElementsFoundForTypeAny      Code = 1106
	ErrInvalidChildNodeTogetherWithTypeReference Code = 1107
	ErrInvalidChildNodeTogetherWithOrRule        Code = 1108
	ErrConstraintMinNotFound                     Code = 1109
	ErrConstraintMaxNotFound                     Code = 1110
	ErrInvalidValueInTheTypeRule                 Code = 1111
	ErrNotFoundRulePrecision                     Code = 1112
	ErrNotFoundRuleEnum                          Code = 1113
	ErrNotFoundRuleOr                            Code = 1114
	ErrIncompatibleTypes                         Code = 1115

	ErrUnexpectedConstraint Code = 1117

	ErrChecker                               Code = 1201
	ErrElementNotFoundInArray                Code = 1203
	ErrIncorrectConstraintValueForEmptyArray Code = 1204

	ErrIncorrectUserType                              Code = 1301
	ErrUserTypeNotFound                               Code = 1302
	ErrImpossibleToDetermineTheJsonTypeDueToRecursion Code = 1303
	ErrInvalidKeyShortcutType                         Code = 1304

	ErrEmptyType                          Code = 1401
	ErrUnnecessaryLexemeAfterTheEndOfEnum Code = 1402

	ErrRegexUnexpectedStart Code = 1500
	ErrRegexUnexpectedEnd   Code = 1501
	ErrRegexInvalid         Code = 1502

	ErrEnumArrayExpected  Code = 1600
	ErrEnumIsHoldRuleName Code = 1601
	ErrEnumRuleNotFound   Code = 1602
	ErrNotAnEnumRule      Code = 1603
	ErrInvalidEnumValues  Code = 1604

	ErrInvalidBoolValue         Code = 1701
	ErrNotEnoughDataInParseUint Code = 1702
	ErrInvalidByteInParseUint   Code = 1703
	ErrTooMuchDataForInt        Code = 1704
	ErrIncorrectNumberValue     Code = 1705
	ErrURNPrefix                Code = 1706
	ErrUUIDLength               Code = 1708
	ErrUUIDFormat               Code = 1709
	ErrUUIDPrefix               Code = 1710
	ErrIncorrectExponentValue   Code = 1711

	ErrRegexExample          Code = 1801
	ErrCantCollectRulesTypes Code = 1802

	ErrInTheTest Code = 9901
)

func (Code) F

func (c Code) F(args ...any) *Err

func (Code) Itoa

func (c Code) Itoa() string

type CodeKeeper

type CodeKeeper interface {
	error
	Code() Code
}

type Err

type Err struct {
	Code_ Code
	// contains filtered or unexported fields
}

func (Err) Code

func (e Err) Code() Code

func (Err) Equal

func (e Err) Equal(b Err) bool

func (Err) Error

func (e Err) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL