Versions in this module Expand all Collapse all v1 v1.0.0 May 31, 2022 Changes in this version + var ErrUrlUsernameNotMatchHeader = NewHttpError(http.StatusUnprocessableEntity, ...) + var ErrUserNotFound = NewHttpError(http.StatusNotFound, "user not found") + var Logger = New() + func AbortWithError(c *gin.Context, err error) + func ErrorHandleMiddleware() gin.HandlerFunc + func LogJson(level LogLevel, jsonMap map[string]interface{}) + type HttpError struct + Hidden bool + Message string + RelatedErr error + StatusCode int + func NewBadRequestError(message string) HttpError + func NewBadRequestErrorFromError(err error) HttpError + func NewHiddenHttpError(statusCode int, message string) HttpError + func NewHiddenHttpErrorWithRelatedError(statusCode int, message string, err error) HttpError + func NewHttpError(statusCode int, message string) HttpError + func NewHttpErrorWithRelatedError(statusCode int, message string, err error) HttpError + func NewInternalServerError(err error) HttpError + func (e HttpError) Error() string + type Log struct + func New() *Log + func NewUsingBuffer(buffer *bufio.Writer) *Log + func (l *Log) Error(_ context.Context, msg string, data ...interface{}) + func (l *Log) Fatal(v ...interface{}) + func (l *Log) Fatalf(format string, args ...interface{}) + func (l *Log) Fatalln(message string) + func (l *Log) Info(_ context.Context, msg string, data ...interface{}) + func (l *Log) LogMode(level logger.LogLevel) logger.Interface + func (l *Log) Print(v ...interface{}) + func (l *Log) Printf(format string, args ...interface{}) + func (l *Log) Println(message string) + func (l *Log) Trace(_ context.Context, begin time.Time, fc func() (string, int64), err error) + func (l *Log) Warn(_ context.Context, msg string, data ...interface{}) + func (l *Log) Warnf(format string, args ...interface{}) + func (l *Log) Warnln(message string) + type LogLevel int + const Error + const Fatal + const Info + const Panic + const Silent + const Warn