middleware

package
v0.0.0-...-eca6f23 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnforceContentType

func EnforceContentType(ctype ContentType) echo.MiddlewareFunc

EncforceContentType is a middleware function that will reject requests which do not include the specified content type header.

func LogRequestID

func LogRequestID() echo.MiddlewareFunc

LogRequestID includes the request ID in all logs for the given request. This requires that the middleware that includes the request ID be executed before this middleware func.

Types

type ContentType

type ContentType string

ContentType is a type alias for a string.

const (
	// JSON represents the application/json content type.
	JSON ContentType = "application/json"
)

Jump to

Keyboard shortcuts

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