hexerr

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InterfaceLayer   Layer = 1
	ApplicationLayer Layer = 2
	DomainLayer      Layer = 3
	Infrastructure   Layer = 4

	EntityNotFound            Code = 1
	Forbidden                 Code = 2
	InvalidArguments          Code = 3
	Internal                  Code = 4
	InvalidRequest            Code = 5
	UniqueConstraintViolation Code = 6
)

Variables

This section is empty.

Functions

func NewApplicationLayerError

func NewApplicationLayerError(code Code, message string) error

func NewDomainLayerError

func NewDomainLayerError(code Code, message string) error

func NewInfrastructureLayerError

func NewInfrastructureLayerError(code Code, message string) error

func NewInterfaceLayerError

func NewInterfaceLayerError(code Code, message string) error

Types

type Code

type Code int

type HexagonalError

type HexagonalError struct {
	Layer        Layer
	Code         Code
	Message      string
	ThrownAtLine string
	// contains filtered or unexported fields
}

func (*HexagonalError) Details

func (h *HexagonalError) Details() string

func (*HexagonalError) Error

func (h *HexagonalError) Error() string

func (*HexagonalError) StackTrace

func (h *HexagonalError) StackTrace() string

type Layer

type Layer int

Jump to

Keyboard shortcuts

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