Documentation
¶
Overview ¶
Package apperror defines the platform-wide application error type used to map domain and application failures to transport-level responses.
Index ¶
Constants ¶
View Source
const ( CodeValidation = Code(TypeValidation) CodeNotFound = Code(TypeNotFound) CodeAuthentication = Code(TypeAuthentication) CodeAuthorization = Code(TypeAuthorization) )
Variables ¶
This section is empty.
Functions ¶
func IsAppError ¶
Types ¶
type AppError ¶
type AppError struct {
Type Type `json:"type"`
Code Code `json:"code"`
Message string `json:"message"`
Details []interface{} `json:"details"`
}
func Authentication ¶
func Authorization ¶
func NotFoundEntity ¶
func Validation ¶
func (*AppError) IsAuthentication ¶
func (*AppError) IsAuthorization ¶
func (*AppError) IsNotFound ¶
func (*AppError) IsValidation ¶
Click to show internal directories.
Click to hide internal directories.