Versions in this module Expand all Collapse all v0 v0.1.0 Sep 17, 2026 Changes in this version + const CodeAlreadyExists + const CodeAppConflict + const CodeAppDependencyFailed + const CodeAppForbidden + const CodeAppInvalidCommand + const CodeAppNotFound + const CodeAppPreconditionFailed + const CodeAppTransactionFailed + const CodeAppUnauthorized + const CodeAppUnknown + const CodeAppUseCaseFailed + const CodeBadRequest + const CodeBucketNotFound + const CodeConflict + const CodeDatabase + const CodeDeleteFailed + const CodeDisabledAccount + const CodeDomainConcurrency + const CodeDomainConflict + const CodeDomainInvalidState + const CodeDomainInvalidValue + const CodeDomainInvariant + const CodeDomainNotFound + const CodeDomainRule + const CodeDomainUnknown + const CodeExpiredToken + const CodeExtAsynqConnection + const CodeExtAsynqEnqueueFailed + const CodeExtAsynqPayloadError + const CodeExtAsynqTimeout + const CodeExtEventBusConnection + const CodeExtEventBusPublishFailed + const CodeExtEventBusSubscribeFailed + const CodeExtEventBusTimeout + const CodeExtFirebaseInvalidToken + const CodeExtFirebaseQuotaExceeded + const CodeExtFirebaseSendFailed + const CodeExtFirebaseUnavailable + const CodeExtKafkaAuth + const CodeExtKafkaConnection + const CodeExtKafkaOffset + const CodeExtKafkaPayload + const CodeExtKafkaRebalance + const CodeExtKafkaTimeout + const CodeExtKafkaTopicMissing + const CodeExtKafkaUnavailable + const CodeExtKafkaUnknown + const CodeExtNatsAuth + const CodeExtNatsConnection + const CodeExtNatsMaxPayload + const CodeExtNatsNoResponders + const CodeExtNatsNotFound + const CodeExtNatsTimeout + const CodeExtNatsUnknown + const CodeExtRabbitAuth + const CodeExtRabbitConnection + const CodeExtRabbitNack + const CodeExtRabbitNoRoute + const CodeExtRabbitNotFound + const CodeExtRabbitPrecondition + const CodeExtRabbitTimeout + const CodeExtRabbitUnavailable + const CodeExtRabbitUnknown + const CodeExtTelegramAPIError + const CodeExtTelegramConnection + const CodeExtTelegramRateLimit + const CodeExtTelegramTimeout + const CodeFileNotFound + const CodeForbidden + const CodeHandlerBadRequest + const CodeHandlerConflict + const CodeHandlerForbidden + const CodeHandlerInternal + const CodeHandlerMethodNotAllowed + const CodeHandlerNotFound + const CodeHandlerNotImplemented + const CodeHandlerServiceUnavailable + const CodeHandlerTooManyRequests + const CodeHandlerUnauthorized + const CodeHandlerUnknown + const CodeInfraConfig + const CodeInfraConflict + const CodeInfraConnection + const CodeInfraIO + const CodeInfraNotFound + const CodeInfraPermissionDenied + const CodeInfraRateLimited + const CodeInfraSerialization + const CodeInfraTimeout + const CodeInfraUnavailable + const CodeInfraUnknown + const CodeInternal + const CodeInvalidFileFormat + const CodeInvalidInput + const CodeInvalidToken + const CodeNotFound + const CodePermissionDenied + const CodeRepoAlreadyExists + const CodeRepoConnection + const CodeRepoConstraint + const CodeRepoDatabase + const CodeRepoNotFound + const CodeRepoQuotaExceeded + const CodeRepoReadOnly + const CodeRepoSerialization + const CodeRepoTimeout + const CodeRepoTransaction + const CodeRepoUnauthorized + const CodeRepoUnavailable + const CodeRepoUnknown + const CodeRevokedToken + const CodeServiceAlreadyExists + const CodeServiceBusinessRule + const CodeServiceConflict + const CodeServiceDependency + const CodeServiceForbidden + const CodeServiceInvalidInput + const CodeServiceNotFound + const CodeServicePermissionNotFound + const CodeServicePolicyViolation + const CodeServiceRelationNotFound + const CodeServiceRoleNotFound + const CodeServiceScopeNotFound + const CodeServiceUnauthorized + const CodeServiceUnknown + const CodeServiceValidation + const CodeSessionNotFound + const CodeTimeout + const CodeUnauthorized + const CodeUnknown + const CodeUploadFailed + const CodeUserNotFound + const CodeValidation + const ErrAlreadyExists + const ErrAppConflict + const ErrAppDependencyFailed + const ErrAppForbidden + const ErrAppInvalidCommand + const ErrAppNotFound + const ErrAppPreconditionFailed + const ErrAppTransactionFailed + const ErrAppUnauthorized + const ErrAppUnknown + const ErrAppUseCaseFailed + const ErrBadRequest + const ErrBucketNotFound + const ErrConflict + const ErrDatabase + const ErrDeleteFailed + const ErrDisabledAccount + const ErrDomainConcurrency + const ErrDomainConflict + const ErrDomainInvalidState + const ErrDomainInvalidValue + const ErrDomainInvariant + const ErrDomainNotFound + const ErrDomainRule + const ErrDomainUnknown + const ErrExpiredToken + const ErrExtAsynqConnection + const ErrExtAsynqEnqueueFailed + const ErrExtAsynqPayloadError + const ErrExtAsynqTimeout + const ErrExtEventBusConnection + const ErrExtEventBusPublishFailed + const ErrExtEventBusSubscribeFailed + const ErrExtEventBusTimeout + const ErrExtFirebaseInvalidToken + const ErrExtFirebaseQuotaExceeded + const ErrExtFirebaseSendFailed + const ErrExtFirebaseUnavailable + const ErrExtKafkaAuth + const ErrExtKafkaConnection + const ErrExtKafkaOffset + const ErrExtKafkaPayload + const ErrExtKafkaRebalance + const ErrExtKafkaTimeout + const ErrExtKafkaTopicMissing + const ErrExtKafkaUnavailable + const ErrExtKafkaUnknown + const ErrExtNatsAuth + const ErrExtNatsConnection + const ErrExtNatsMaxPayload + const ErrExtNatsNoResponders + const ErrExtNatsNotFound + const ErrExtNatsTimeout + const ErrExtNatsUnknown + const ErrExtRabbitAuth + const ErrExtRabbitConnection + const ErrExtRabbitNack + const ErrExtRabbitNoRoute + const ErrExtRabbitNotFound + const ErrExtRabbitPrecondition + const ErrExtRabbitTimeout + const ErrExtRabbitUnavailable + const ErrExtRabbitUnknown + const ErrExtTelegramAPIError + const ErrExtTelegramConnection + const ErrExtTelegramRateLimit + const ErrExtTelegramTimeout + const ErrFileNotFound + const ErrForbidden + const ErrHandlerBadRequest + const ErrHandlerConflict + const ErrHandlerForbidden + const ErrHandlerInternal + const ErrHandlerMethodNotAllowed + const ErrHandlerNotFound + const ErrHandlerNotImplemented + const ErrHandlerServiceUnavailable + const ErrHandlerTooManyRequests + const ErrHandlerUnauthorized + const ErrHandlerUnknown + const ErrInfraConfig + const ErrInfraConflict + const ErrInfraConnection + const ErrInfraIO + const ErrInfraNotFound + const ErrInfraPermissionDenied + const ErrInfraRateLimited + const ErrInfraSerialization + const ErrInfraTimeout + const ErrInfraUnavailable + const ErrInfraUnknown + const ErrInternal + const ErrInvalidFileFormat + const ErrInvalidInput + const ErrInvalidToken + const ErrNotFound + const ErrPermissionDenied + const ErrRepoAlreadyExists + const ErrRepoConnection + const ErrRepoConstraint + const ErrRepoDatabase + const ErrRepoNotFound + const ErrRepoQuotaExceeded + const ErrRepoReadOnly + const ErrRepoSerialization + const ErrRepoTimeout + const ErrRepoTransaction + const ErrRepoUnauthorized + const ErrRepoUnavailable + const ErrRepoUnknown + const ErrRevokedToken + const ErrServiceAlreadyExists + const ErrServiceBusinessRule + const ErrServiceConflict + const ErrServiceDependency + const ErrServiceForbidden + const ErrServiceInvalidInput + const ErrServiceNotFound + const ErrServicePermissionNotFound + const ErrServicePolicyViolation + const ErrServiceRelationNotFound + const ErrServiceRoleNotFound + const ErrServiceScopeNotFound + const ErrServiceUnauthorized + const ErrServiceUnknown + const ErrServiceValidation + const ErrSessionNotFound + const ErrTimeout + const ErrUnauthorized + const ErrUnknown + const ErrUploadFailed + const ErrUserNotFound + const ErrValidation + const JSONMediaType + const ProblemMediaType + var ErrTestBase = errors.New("base error") + var ErrTestCheckConstraint = errors.New("check constraint violation") + var ErrTestConnectionTimeout = errors.New("connection timeout") + var ErrTestCountError = errors.New("count error") + var ErrTestDB = errors.New("database error") + var ErrTestDBConnection = errors.New("database connection error") + var ErrTestDatabaseLocked = errors.New("database is locked") + var ErrTestDeleteFailed = errors.New("delete failed") + var ErrTestDuplicateKey = errors.New("duplicate key value violates unique constraint") + var ErrTestForeignKey = errors.New("foreign key constraint violation") + var ErrTestHandler = errors.New("handler error") + var ErrTestInvalidCompanyID = errors.New("invalid company ID") + var ErrTestInvalidFilter = errors.New("invalid filter") + var ErrTestInvalidPhone = errors.New("invalid phone format") + var ErrTestInvalidSession = errors.New("invalid session") + var ErrTestInvalidUserID = errors.New("invalid user ID") + var ErrTestPasswordHashEmpty = errors.New("password hash cannot be empty") + var ErrTestPermissionDenied = errors.New("permission denied for table") + var ErrTestRedisBrokenPipe = errors.New("write: broken pipe") + var ErrTestRedisClusterDown = errors.New("CLUSTERDOWN The cluster is down") + var ErrTestRedisConnection = errors.New("redis connection failed") + var ErrTestRedisContextDeadline = errors.New("context deadline exceeded") + var ErrTestRedisDialTCP = errors.New("dial tcp: connection refused") + var ErrTestRedisEOF = errors.New("EOF") + var ErrTestRedisError = errors.New("some redis error") + var ErrTestRedisIOTimeout = errors.New("i/o timeout") + var ErrTestRedisNoAuth = errors.New("NOAUTH Authentication required") + var ErrTestRedisNoScript = errors.New("NOSCRIPT No matching script. Please use EVAL") + var ErrTestRedisOOM = errors.New("OOM command not allowed when used memory > 'maxmemory'") + var ErrTestRedisRandom = errors.New("some random redis error") + var ErrTestRedisReadOnly = errors.New("READONLY You can't write against a read only replica") + var ErrTestRedisScan = errors.New("redis scan error") + var ErrTestRedisWrongPass = errors.New("WRONGPASS invalid username-password pair") + var ErrTestRedisWrongType = errors.New("WRONGTYPE Operation against a key holding the wrong kind of value") + var ErrTestRegular = errors.New("regular error") + var ErrTestScanError = errors.New("scan error") + var ErrTestSelectQuery = errors.New("select query error") + var ErrTestService = errors.New("service error") + var ErrTestSessionCreationFailed = errors.New("session creation failed") + var ErrTestSessionNotFound = errors.New("session not found") + var ErrTestSessionRevokeFailed = errors.New("session revoke failed") + var ErrTestUniqueConstraint = errors.New("unique constraint violation") + var ErrTestUpdateFailed = errors.New("update failed") + var ErrTestUserNotFound = errors.New("user not found") + var ErrTestValidationFailed = errors.New("validation failed") + var SupportedLanguages = []string + func AllCodes(err error) []string + func ChainHook(chain *ErrorChain) func(ctx context.Context, err *AppError) + func ConfigureError(code string, config ErrorDetailConfig) + func GetCaller(skip int) (file, function string) + func GetCode(err error) string + func GetDomainNumericCode(code string) string + func GetDomainServiceCode(code string) string + func GetHTTPStatus(code string) int + func GetNumericCode(code string) string + func GetUserMessage(code, lang string) string + func GetUserMessageWithDetails(code, lang, details string) string + func HasCode(err error, code string) bool + func Is(err error, code string) bool + func IsDomainError(err error) bool + func IsInfraError(err error) bool + func IsRegistered(code string) bool + func IsRetryable(code string) bool + func Join(errs ...error) error + func LanguageFromContext(ctx context.Context) string + func LogError(logger *zap.Logger, err error) + func LogInfo(logger *zap.Logger, err error, message string) + func LogWarn(logger *zap.Logger, err error) + func MapToHTTPStatus(code string) int + func MapToServiceError(err error) error + func MustRegisterError(c CustomError) + func MustRegisterErrors(codes ...CustomError) + func NegotiateLanguage(header string) string + func RateMonitorHook(monitor *RateMonitor) func(error) + func RecordErrorGlobal(ctx context.Context, err *AppError) + func RecordGlobal(ctx context.Context, err error) + func RegisterDomainCode(c DomainCode) + func RegisterDomainCodes(codes ...DomainCode) + func RegisterError(c CustomError) error + func RegisterErrors(codes ...CustomError) error + func RemoveError(code string) + func ResolverHook(resolver *Resolver) func(ctx context.Context, err *AppError) + func RetryExponential(ctx context.Context, maxAttempts int, initialDelay time.Duration, ...) error + func RetryImmediate(ctx context.Context, maxAttempts int, fn func() error) error + func RetryLinear(ctx context.Context, maxAttempts int, delay time.Duration, fn func() error) error + func RetryWithBackoff(ctx context.Context, config RetryConfig, fn func() error) error + func SLOMiddlewareHook(tracker *SLOTracker) func(ctx context.Context, err *AppError) + func SafeExecute(ctx context.Context, fn func() error) (err error) + func SafeExecuteWithRetry(ctx context.Context, fn func() error) error + func SetHTTPStatus(code string, status int) + func SetProblemBaseURI(base string) + func SetProblemLanguage(lang string) + func SetReporter(r Reporter) + func ShouldAlertOps(code string) bool + func UnregisterDomainCode(code string) + func UnregisterError(code string) + func UpdateUserMessage(code string, msg UserMessage) + func ValidateRegistryErr() error + func WithErrorContext(ctx context.Context, ec *ErrorContext) context.Context + func WithLanguage(ctx context.Context, lang string) context.Context + func WithRetry(ctx context.Context, fn func() error) error + func WriteCreated(w http.ResponseWriter, location string, payload any) error + func WriteJSON(w http.ResponseWriter, status int, payload any) error + func WriteNoContent(w http.ResponseWriter) + func WriteOK(w http.ResponseWriter, payload any) error + func WriteProblem(w http.ResponseWriter, err error, instance string) error + func WriteProblemCtx(ctx context.Context, w http.ResponseWriter, err error, instance string) error + func WriteProblemRequest(w http.ResponseWriter, r *http.Request, err error) error + func WriteResult(w http.ResponseWriter, status int, payload any, err error, instance string) error + func WriteResultCtx(ctx context.Context, w http.ResponseWriter, status int, payload any, err error, ...) error + func WriteResultRequest(w http.ResponseWriter, r *http.Request, status int, payload any, err error) error + type AppError struct + Category ErrorCategory + Code string + Details string + Err error + Extensions map[string]any + Fields map[string]any + HTTPStatus int + Input any + Message string + Output any + RetryAfter time.Duration + Severity ErrorSeverity + Stack []uintptr + Suggestion string + Type string + UserMsg string + Validation []FieldError + func AutoSource(err *AppError) *AppError + func AutoSourceSkip(err *AppError, skip int) *AppError + func Flatten(err error) []*AppError + func MapDomainToServiceError(err error) *AppError + func MapInfraToServiceError(err error) *AppError + func MapRepoToServiceError(err error, notFoundCode ...string) *AppError + func MapServiceToHandlerError(err error) *AppError + func MapToApplicationError(err error) *AppError + func New(code, message string) *AppError + func NewApplicationError(code, message string) *AppError + func NewBadRequest(message string) *AppError + func NewConflict(message string) *AppError + func NewDomainError(code, message string) *AppError + func NewForbidden(message string) *AppError + func NewHandlerError(code, message string) *AppError + func NewInfraError(code, message string) *AppError + func NewInternalError(message string) *AppError + func NewNotFound(message string) *AppError + func NewRepoError(code, message string) *AppError + func NewServiceError(code, message string) *AppError + func NewTimeoutError(message string) *AppError + func NewUnauthorized(message string) *AppError + func NewValidationError(message string) *AppError + func RecoverFromPanic(ctx context.Context) *AppError + func Split(err error) (retryable, fatal []*AppError) + func WithCaller(err *AppError, skip int) *AppError + func WithSource(err *AppError, file, function string) *AppError + func Wrap(err error, code, message string) *AppError + func WrapApplicationError(err error, code, message string) *AppError + func WrapBadRequest(err error, message string) *AppError + func WrapConflict(err error, message string) *AppError + func WrapDomainError(err error, code, message string) *AppError + func WrapForbidden(err error, message string) *AppError + func WrapHandlerError(err error, code, message string) *AppError + func WrapInfraError(err error, code, message string) *AppError + func WrapInternal(err error, message string) *AppError + func WrapNotFound(err error, message string) *AppError + func WrapRepoError(err error, code, message string) *AppError + func WrapServiceError(err error, code, message string) *AppError + func WrapUnauthorized(err error, message string) *AppError + func (e *AppError) Error() string + func (e *AppError) Fingerprint() string + func (e *AppError) GetCategory() ErrorCategory + func (e *AppError) GetMetadata() ErrorMetadata + func (e *AppError) GetSeverity() ErrorSeverity + func (e *AppError) IsRetryable() bool + func (e *AppError) MarshalJSON() ([]byte, error) + func (e *AppError) Problem(instance string) Problem + func (e *AppError) ProblemCtx(ctx context.Context, instance string) Problem + func (e *AppError) String() string + func (e *AppError) Unwrap() error + func (e *AppError) WithContext(ctx context.Context) *AppError + func (e *AppError) WithDetails(details string) *AppError + func (e *AppError) WithExtension(key string, value any) *AppError + func (e *AppError) WithField(key string, value any) *AppError + func (e *AppError) WithInput(input any) *AppError + func (e *AppError) WithMetadata(key string, value any) *AppError + func (e *AppError) WithOperation(operation string) *AppError + func (e *AppError) WithOutput(output any) *AppError + func (e *AppError) WithResource(resource, resourceID string) *AppError + func (e *AppError) WithRetryAfter(d time.Duration) *AppError + func (e *AppError) WithSuggestion(suggestion string) *AppError + func (e *AppError) WithTag(tag string) *AppError + type ChainEntry struct + Code string + Layer string + Message string + Timestamp time.Time + type ContextKey string + const ContextKeyErrorContext + const ContextKeyLanguage + const ContextKeyRequestID + const ContextKeyUserID + type CustomError = DomainCode + func LookupError(code string) (CustomError, bool) + func RegisteredErrors() []CustomError + type DomainCode struct + Category ErrorCategory + Code string + HTTPStatus int + Layer ErrorLayer + Message UserMessage + Numeric string + Retry RetryPolicy + ServiceCode string + Severity ErrorSeverity + type DomainError interface + Code func() string + type ErrorCategory string + const CategoryBusiness + const CategoryData + const CategoryExternal + const CategoryNetwork + const CategorySecurity + const CategorySystem + const CategoryValidation + func GetCategory(code string) ErrorCategory + type ErrorChain struct + func NewErrorChain(maxAge time.Duration) *ErrorChain + func (c *ErrorChain) Cleanup() + func (c *ErrorChain) Get(requestID string) []ChainEntry + func (c *ErrorChain) Record(ctx context.Context, err *AppError) + func (c *ErrorChain) RecordAll(ctx context.Context, err error) + func (c *ErrorChain) StartCleanup(ctx context.Context) + type ErrorContext struct + IPAddress string + Metadata map[string]any + Method string + Operation string + Path string + RequestID string + Resource string + ResourceID string + UserAgent string + UserID string + func GetErrorContext(ctx context.Context) *ErrorContext + type ErrorDefinition struct + Category string + Code string + HTTPStatus int + Layer string + Message string + NumericCode string + func GetAllErrors() []ErrorDefinition + func GetErrorsByFilter(layer, category, code string) []ErrorDefinition + type ErrorDetailConfig struct + HTTPStatus int + Message UserMessage + type ErrorHook func(ctx context.Context, err *AppError) + func AlertingHook(alertFn func(ctx context.Context, err *AppError)) ErrorHook + func LoggingHook(logger *zap.Logger) ErrorHook + func MetricsHook(recordFn func(code string, severity ErrorSeverity, category ErrorCategory)) ErrorHook + type ErrorHookManager struct + func GetGlobalHookManager() *ErrorHookManager + func NewErrorHookManager() *ErrorHookManager + func (m *ErrorHookManager) AddHook(hook ErrorHook) + func (m *ErrorHookManager) ExecuteHooks(ctx context.Context, err *AppError) + type ErrorLayer string + const LayerApplication + const LayerDomain + const LayerExternal + const LayerHandler + const LayerInfrastructure + const LayerRepository + const LayerService + const LayerSystem + func GetLayer(code string) ErrorLayer + type ErrorMetadata struct + AlertOps bool + Category ErrorCategory + CustomData map[string]any + Layer ErrorLayer + RetryStrategy RetryStrategy + Retryable bool + Severity ErrorSeverity + Tags []string + UserVisible bool + func GetErrorMetadata(code string) ErrorMetadata + type ErrorMetrics struct + func GetGlobalMetrics() *ErrorMetrics + func NewErrorMetrics() *ErrorMetrics + func (m *ErrorMetrics) GetStats() map[string]any + func (m *ErrorMetrics) RecordError(err *AppError) + func (m *ErrorMetrics) Reset() + type ErrorSeverity string + const SeverityCritical + const SeverityHigh + const SeverityInfo + const SeverityLow + const SeverityMedium + func GetSeverity(code string) ErrorSeverity + type FieldError struct + Code string + Field string + Message string + func GetValidationErrors(err error) []FieldError + func (f FieldError) Error() string + type MultiError struct + Errors []error + func (m *MultiError) As(target any) bool + func (m *MultiError) Error() string + func (m *MultiError) IsRetryable() bool + func (m *MultiError) Unwrap() []error + type Problem struct + Code string + Detail string + Extensions map[string]any + Instance string + NumericCode int + Retryable bool + Status int + Title string + Type string + Validation []FieldError + func (p *Problem) UnmarshalJSON(data []byte) error + func (p Problem) MarshalJSON() ([]byte, error) + func (p Problem) WithExtension(key string, value any) Problem + type RateMonitor struct + func NewRateMonitor(cfg RateMonitorConfig) *RateMonitor + func (m *RateMonitor) Cleanup() + func (m *RateMonitor) Record(code string) + func (m *RateMonitor) StartCleanup(ctx context.Context) + type RateMonitorConfig struct + OnBreach func(code string, count int) + Threshold int + Window time.Duration + type RegistryProblem struct + Code string + Problem string + func ValidateRegistry() []RegistryProblem + func (p RegistryProblem) String() string + type Reporter interface + SendError func(err error) error + type ResolutionAction func(ctx context.Context, err *AppError) bool + type Resolver struct + func NewResolver() *Resolver + func (r *Resolver) Register(code string, action ResolutionAction) + func (r *Resolver) Resolve(ctx context.Context, err *AppError) bool + type RetryConfig struct + InitialDelay time.Duration + MaxAttempts int + MaxDelay time.Duration + Multiplier float64 + ShouldRetry func(error) bool + func DefaultRetryConfig() RetryConfig + type RetryPolicy struct + MaxRetries int + RetryAfter int + Retryable bool + func GetRetryPolicy(code string) RetryPolicy + type RetryStrategy string + const RetryNever + const RetryStrategyExponential + const RetryStrategyImmediate + const RetryStrategyLinear + func GetRetryStrategy(code string) RetryStrategy + type SLOConfig struct + OnBudgetExhausted func(stats SLOStats) + Target float64 + Window time.Duration + type SLOStats struct + BudgetRemaining int64 + BudgetTotal int64 + BudgetUsed int64 + ErrorRequests int64 + Exhausted bool + SuccessRate float64 + Target float64 + TotalRequests int64 + WindowStart string + type SLOTracker struct + func NewSLOTracker(cfg SLOConfig) *SLOTracker + func (s *SLOTracker) RecordError() + func (s *SLOTracker) RecordSuccess() + func (s *SLOTracker) Stats() SLOStats + type Sampler struct + func NewSampler(cfg SamplerConfig) *Sampler + func (s *Sampler) ShouldLog(code string) bool + type SamplerConfig struct + SampleRate int + Threshold int + Window time.Duration + type UserMessage struct + En string + Ru string + Uz string + type ValidationBuilder struct + func NewValidation() *ValidationBuilder + func (v *ValidationBuilder) Add(field, code, message string) *ValidationBuilder + func (v *ValidationBuilder) AddErr(field string, err error) *ValidationBuilder + func (v *ValidationBuilder) Err() *AppError + func (v *ValidationBuilder) Fields() []FieldError + func (v *ValidationBuilder) HasErrors() bool + func (v *ValidationBuilder) Len() int + func (v *ValidationBuilder) WithLang(lang string) *ValidationBuilder