Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
Service middleware (closure).
func ErrorLoggingMiddleware ¶
func ErrorLoggingMiddleware(logger log.Logger) Middleware
ErrorLoggingMiddleware writes to logger any error, if it is not nil.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
LoggingMiddleware writes params, results and working time of method call to provided logger after its execution.
func RecoveringMiddleware ¶
func RecoveringMiddleware(logger log.Logger) Middleware
RecoveringMiddleware recovers panics from method calls, writes to provided logger and returns the error of panic as method error.
Click to show internal directories.
Click to hide internal directories.