errors

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultError

type DefaultError struct {
	// contains filtered or unexported fields
}

-------------------------------------------------------------------------- //

func NewError

func NewError(statusCode int, errMsg string, stackTrace string, data gin.H) DefaultError

func (DefaultError) Data

func (this DefaultError) Data() gin.H

func (DefaultError) Error

func (this DefaultError) Error() string

func (DefaultError) StackTrace

func (this DefaultError) StackTrace() string

func (DefaultError) StatusCode

func (this DefaultError) StatusCode() StatusCode

type Error

type Error interface {
	StatusCode() StatusCode
	Error() string
	StackTrace() string
	Data() gin.H
}

type StatusCode

type StatusCode int

-------------------------------------------------------------------------- //

func (StatusCode) Int

func (this StatusCode) Int() int

func (StatusCode) Is2xxSuccess

func (this StatusCode) Is2xxSuccess() bool

func (StatusCode) Is4xxClientError

func (this StatusCode) Is4xxClientError() bool

func (StatusCode) Is501NotImplemented

func (this StatusCode) Is501NotImplemented() bool

func (StatusCode) Is5xxServerError

func (this StatusCode) Is5xxServerError() bool

Jump to

Keyboard shortcuts

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