middlewares

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatrixQuery

func MatrixQuery(render *response.Assembler) func(handlerFunc echo.HandlerFunc) echo.HandlerFunc

MatrixQuery is an echo.MiddlewareFunc that verifies basic prerequisites that the request shall comply with and injects the formatted query request into echo.Context

func PopulateCacheHeader

func PopulateCacheHeader(cacheType CacheType) func(handlerFunc echo.HandlerFunc) echo.HandlerFunc

PopulateCacheHeader populates the `Cache-Control`

func RequestMetadata

func RequestMetadata() func(handlerFunc echo.HandlerFunc) echo.HandlerFunc

RequestMetadata is an echo.MiddlewareFunc that populates response.RequestMetadata and injects it into echo.Context

Types

type CacheType

type CacheType string
const (
	CacheTypeStatic  CacheType = "public, max-age=31356000"
	CacheTypeDynamic CacheType = "public, max-age=300, must-revalidate"
	CacheTypeNoCache CacheType = "no-store"
)

Jump to

Keyboard shortcuts

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