middleware

package
v0.0.0-...-2921379 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const MaxBodySize = 1000000000
View Source
const MaxJSONBodySize = 2097152

Variables

This section is empty.

Functions

func APIHeaders

func APIHeaders(srv *mattrax.Server) mux.MiddlewareFunc

func AuthClaimsFromContext

func AuthClaimsFromContext(ctx context.Context) *authentication.AuthClaims

func DBTxFromContext

func DBTxFromContext(ctx context.Context) *sql.Tx

func FrontendHeaders

func FrontendHeaders() mux.MiddlewareFunc

FrontendHeaders sets the headers for the frontend UI routes

func GetPaginationParams

func GetPaginationParams(v url.Values) (int32, int32, error)

func Headers

func Headers() mux.MiddlewareFunc

Headers sets the global headers for the server

func Logging

func Logging() mux.MiddlewareFunc

Logging logs each request

func RequireAuthentication

func RequireAuthentication(srv *mattrax.Server) mux.MiddlewareFunc

func ZipkinExtended

func ZipkinExtended(next http.Handler) http.Handler

ZipkinExtended extends Zipkin intergration by naming the spans the Gorilla Mux route name & setting the X-Request-ID header

Types

This section is empty.

Jump to

Keyboard shortcuts

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