middleware

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtxLogger

func CtxLogger() echo.MiddlewareFunc

func CtxLoggerWithLevel added in v0.2.1

func CtxLoggerWithLevel(l logrus.Level) echo.MiddlewareFunc

Types

type CtxLogData

type CtxLogData struct {
	Request   Request  `json:"request"`
	Response  Response `json:"response"`
	RequestId string   `json:"requestId"`
}

type Request

type Request struct {
	Header http.Header `json:"header"`
	Uri    string      `json:"uri"`
	Method string      `json:"method"`
	Body   *echo.Map   `json:"body"`
}

type Response

type Response struct {
	Body   *echo.Map `json:"body"`
	Status int       `json:"status"`
}

type Writer

type Writer struct {
	http.ResponseWriter
	Bytes []byte
}

func (*Writer) Write

func (w *Writer) Write(bytes []byte) (int, error)

Jump to

Keyboard shortcuts

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