package
0.0.0-20211214184315-14776eaa5bb8
Repository: https://github.com/el-mike/gochat.git
Documentation: pkg.go.dev

# Functions

Returns pair of values (http status, data) that satisfies Gin's handler response.
Returns pair of values (http status, data) that satisfies Gin's handler response.
NewAccessDeniedError - returns APIError related to missing permissions.
NewAuthorizationError - returns APIError related to general authorization problem.
NewBadRequestError - returns APIError related to clients's request being incorrect.
NewInternalError - returns APIError related to internal, runtime problem.
NewLoginCredentialsIncorrectError - returns APIError related to login credentials being incorrect.
NewNotFoundError - returns APIError related to an entity which cannot be found.
NewTokenExpiredError - returns APIError related to expired token.
NewTokenMalforedError - returns APIError related to malformed token.
Returns pair of values (http status, error) that satisfies Gin's handler response.

# Constants

Map of valid error types (ErrorType).
Map of valid error types (ErrorType).
Map of valid error types (ErrorType).
Map of valid error types (ErrorType).
Map of valid error types (ErrorType).

# Structs

APIError holds a custom error for the application, which is later consumed by clients.

# Type aliases

ErrorCode holds an app-specific code for the error.
ErrorType holds a general type for the error.