mid

package
Version: v0.0.0-...-263eb77 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Classic

func Classic() *ego.Engine

Classic returns an Engine instance with the Logger and Recovery middleware already attached.

func Default

func Default() *ego.Engine

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.

Directories

Path Synopsis
example
Package example is a generated protocol buffer package.
Package example is a generated protocol buffer package.
Package rego renders vgo
Package rego renders vgo

Jump to

Keyboard shortcuts

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