customerrors

package
v0.0.0-...-e3ece06 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CategoryBusiness      string = "Business Error"
	CategoryAccessControl string = "Access Control"
	CategoryGeneral       string = "General"
)

Variables

This section is empty.

Functions

func ErrorHandler

func ErrorHandler(logger *zap.SugaredLogger) gin.HandlerFunc

func NewErrorMessageList

func NewErrorMessageList(errorMessages ...string) []string

Types

type RestError

type RestError struct {
	Status        int      `json:"status"`
	ErrorMessages []string `json:"errorMessage"`
	Category      string   `json:"category"`
	Username      string   `json:"username"`
}

func (*RestError) Error

func (r *RestError) Error() string

Jump to

Keyboard shortcuts

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