Documentation ¶
Index ¶
- Variables
- type Context
- type Engine
- type Error
- func (e *Error) Error() (result string)
- func (e *Error) Format(s fmt.State, verb rune)
- func (e *Error) JSON(stack bool) interface{}
- func (e *Error) New(err error) *Error
- func (e *Error) NewError(message string) *Error
- func (e *Error) NewErrorf(format string, args ...interface{}) *Error
- func (e *Error) NewWithMessage(err error, message string) *Error
- func (e *Error) NewWithMessagef(err error, format string, args ...interface{}) *Error
- type Server
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Logger is the default application logger Logger = getLogger() // Config is the application configration Config *viper.Viper // Driver is applications http driver Driver *Engine // Errors contains applications errors Errors *Error )
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Message string // error message Code int // app error code HttpStatusCode int // http response code Err error // the original error }
Error is a warpper over error to allow passing custom values to it.
func (*Error) NewWithMessage ¶
NewWithMessage creates error with custom message for response
Click to show internal directories.
Click to hide internal directories.