Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorCodeAuthNotAuthenticated = ErrorCode{ Name: "AUTH_NOT_AUTHENTICATED", StatusCode: http.StatusUnauthorized, }
View Source
var ErrorCodeAuthPermissionDenied = ErrorCode{ Name: "AUTH_PERMISSION_DENIED", StatusCode: http.StatusForbidden, }
View Source
var ErrorCodeInternalProcess = ErrorCode{ Name: "INTERNAL_PROCESS", StatusCode: http.StatusInternalServerError, }
View Source
var ErrorCodeParameterInvalid = ErrorCode{ Name: "PARAMETER_INVALID", StatusCode: http.StatusBadRequest, }
View Source
var ErrorCodeRemoteProcess = ErrorCode{ Name: "REMOTE_PROCESS_ERROR", StatusCode: http.StatusBadGateway, }
View Source
var ErrorCodeResourceNotFound = ErrorCode{ Name: "RESOURCE_NOT_FOUND", StatusCode: http.StatusNotFound, }
Functions ¶
This section is empty.
Types ¶
type DomainError ¶
type DomainError struct {
// contains filtered or unexported fields
}
DomainError used for expressing errors occurring in application.
func (DomainError) ClientMsg ¶
func (e DomainError) ClientMsg() string
func (DomainError) Detail ¶
func (e DomainError) Detail() map[string]interface{}
func (DomainError) Error ¶
func (e DomainError) Error() string
func (DomainError) HTTPStatus ¶
func (e DomainError) HTTPStatus() int
func (DomainError) Name ¶
func (e DomainError) Name() string
func (DomainError) RemoteHTTPStatus ¶
func (e DomainError) RemoteHTTPStatus() int
type ErrorOption ¶
type ErrorOption func(*DomainError)
func WithDetail ¶
func WithDetail(detail map[string]interface{}) ErrorOption
func WithMsg ¶
func WithMsg(msg string) ErrorOption
func WithStatus ¶
func WithStatus(status int) ErrorOption
Click to show internal directories.
Click to hide internal directories.