Documentation ¶
Overview ¶
Package middleware provides middleware for http Handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
A Chain is a middleware chain use for http request processing.
func NewChain ¶
func NewChain(middlewares ...MiddlewareFunc) Chain
NewChain creates a new Middleware chain
type MiddlewareFunc ¶
MiddlewareFunc is a function that acts as middleware for http Handlers.
func Conditional ¶
func Conditional(middleware MiddlewareFunc, condition func(r *http.Request) bool) MiddlewareFunc
Conditional is a middleware that only executes middleware if the condition returns true for the request. If the condition returns false, the middleware is skipped, and request handling moves on to the next handler in the chain.
Directories ¶
Path | Synopsis |
---|---|
Package auth handles auth
|
Package auth handles auth |
Package authtest is a mini server and token generator with a mock test to confirm keygen works correctly; not intended to test the whole api but rather just the token issuance and authentication
|
Package authtest is a mini server and token generator with a mock test to confirm keygen works correctly; not intended to test the whole api but rather just the token issuance and authentication |
Package cachecontrol creates a cache control echo middleware
|
Package cachecontrol creates a cache control echo middleware |
Package cors does cors stuff
|
Package cors does cors stuff |
Package debug contains utility helper functions for debugging when working with echo server
|
Package debug contains utility helper functions for debugging when working with echo server |
Package echocontext adds the echo context to the parent context
|
Package echocontext adds the echo context to the parent context |
Package mime does mime stuff
|
Package mime does mime stuff |
Package ratelimit implements a rate limiting middleware
|
Package ratelimit implements a rate limiting middleware |
Package redirect does redirect stuff
|
Package redirect does redirect stuff |
Package secure is middleware that provides protection against cross-site scripting (XSS) attack, content type sniffing, clickjacking, insecure connection and other code injection attacks
|
Package secure is middleware that provides protection against cross-site scripting (XSS) attack, content type sniffing, clickjacking, insecure connection and other code injection attacks |
Package session provides session middleware to the echo server
|
Package session provides session middleware to the echo server |
Package transaction implements a transaction middleware for REST endpoints using the ent db client
|
Package transaction implements a transaction middleware for REST endpoints using the ent db client |
Click to show internal directories.
Click to hide internal directories.