Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LoggerHandler ¶
type LoggerHandler struct {
// contains filtered or unexported fields
}
LoggerHandler Handler only for logger middleware
func NewLoggerHandler ¶
func NewLoggerHandler(logger *zap.SugaredLogger) *LoggerHandler
NewLoggerHandler creates a new LoggerHandler
func (*LoggerHandler) ContentTypeJSON ¶
func (h *LoggerHandler) ContentTypeJSON(next http.Handler) http.Handler
ContentTypeJSON sets the content type and x-content-type-options to json
func (*LoggerHandler) LogRoute ¶
func (h *LoggerHandler) LogRoute(next http.Handler) http.Handler
LogRoute logs the called route together
func (*LoggerHandler) LogRouteWithIP ¶
func (h *LoggerHandler) LogRouteWithIP(next http.Handler) http.Handler
LogRouteWithIP logs the called route together with the ip
Click to show internal directories.
Click to hide internal directories.