interfaces

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	error
	Code() string
	HTTPStatus() int
	Is(target error) bool
	Unwrap() error
}

Error is a generic error interface that can be used for different error categories

type ErrorType

type ErrorType string

ErrorType is a type for error categories

const (
	DomainErrorType      ErrorType = "DOMAIN_ERROR"
	ValidationErrorType  ErrorType = "VALIDATION_ERROR"
	RepositoryErrorType  ErrorType = "REPOSITORY_ERROR"
	ApplicationErrorType ErrorType = "APPLICATION_ERROR"
)

Standard error types

type Wrapper

type Wrapper interface {
	Wrap(err error, operation string, format string, args ...interface{}) error
	WithDetails(err error, details map[string]interface{}) error
}

Wrapper is an interface for error wrappers

Jump to

Keyboard shortcuts

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