Documentation ¶
Index ¶
- func Classic() *ego.Engine
- func Default() *ego.Engine
- func DisableConsoleColor()
- func ErrorLogger() ego.HandlerFunc
- func ErrorLoggerT(typ util.ErrorType) ego.HandlerFunc
- func Logger() ego.HandlerFunc
- func LoggerWithWriter(out io.Writer, notlogged ...string) ego.HandlerFunc
- func Recovery() ego.HandlerFunc
- func RecoveryWithWriter(out io.Writer) ego.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Classic ¶
Classic returns an Engine instance with the Logger and Recovery middleware already attached.
func Default ¶
Default returns an Engine instance with the Logger and Recovery middleware already attached.
func DisableConsoleColor ¶
func DisableConsoleColor()
DisableConsoleColor disables color output in the console.
func ErrorLogger ¶
func ErrorLogger() ego.HandlerFunc
ErrorLogger returns a handlerfunc for any error type.
func ErrorLoggerT ¶
func ErrorLoggerT(typ util.ErrorType) ego.HandlerFunc
ErrorLoggerT returns a handlerfunc for a given error type.
func Logger ¶
func Logger() ego.HandlerFunc
Logger instances a Logger middleware that will write the logs to mid.DefaultWriter. By default mid.DefaultWriter = os.Stdout.
func LoggerWithWriter ¶
func LoggerWithWriter(out io.Writer, notlogged ...string) ego.HandlerFunc
LoggerWithWriter instance a Logger middleware with the specified writter buffer. Example: os.Stdout, a file opened in write mode, a socket...
func Recovery ¶
func Recovery() ego.HandlerFunc
Recovery returns a middleware that recovers from any panics and writes a 500 if there was one.
func RecoveryWithWriter ¶
func RecoveryWithWriter(out io.Writer) ego.HandlerFunc
Types ¶
This section is empty.