Documentation
¶
Index ¶
- func MatrixQuery(render *response.Assembler) func(handlerFunc echo.HandlerFunc) echo.HandlerFunc
- func NewPrometheus(e *echo.Echo)
- func PopulateCacheHeader(cacheType CacheType) func(handlerFunc echo.HandlerFunc) echo.HandlerFunc
- func RequestMetadata() func(handlerFunc echo.HandlerFunc) echo.HandlerFunc
- func SiteStatsQuery(render *response.Assembler) func(handlerFunc echo.HandlerFunc) echo.HandlerFunc
- type CacheType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatrixQuery ¶
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 NewPrometheus ¶ added in v1.1.0
func NewPrometheus(e *echo.Echo)
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
func SiteStatsQuery ¶ added in v1.1.0
SiteStatsQuery is an echo.MiddlewareFunc that verifies siteStats.Query parameters and inject to echo.Context
Types ¶
type CacheType ¶
type CacheType string
CacheType describes the type of cache shall be used, which its value is the content of the `Cache-Control` header that is being populated
const ( // CacheTypeStatic describes the resource should never be changed and therefore is safe for long-term caching CacheTypeStatic CacheType = "public, max-age=31356000" // CacheTypeDynamic describes the resource as if it is a valuable-to-cache dynamic resource CacheTypeDynamic CacheType = "public, max-age=300, must-revalidate" // CacheTypeNoCache describes the resource should always not be cached CacheTypeNoCache CacheType = "no-store" )
Click to show internal directories.
Click to hide internal directories.