Documentation ¶
Index ¶
- func Auth(opts ...*AuthOpts) fibre.MiddlewareFunc
- func Cors(opts ...*CorsOpts) fibre.MiddlewareFunc
- func Fail() fibre.MiddlewareFunc
- func Gzip() fibre.MiddlewareFunc
- func Info(opts ...*InfoOpts) fibre.MiddlewareFunc
- func JWt(opts ...*SignOpts) fibre.MiddlewareFunc
- func Logs() fibre.MiddlewareFunc
- func Quit(opts ...*QuitOpts) fibre.MiddlewareFunc
- func Secure(opts ...*SecureOpts) fibre.MiddlewareFunc
- func Size(opts ...*SizeOpts) fibre.MiddlewareFunc
- func Type(opts ...*TypeOpts) fibre.MiddlewareFunc
- func Uniq(opts ...*UniqOpts) fibre.MiddlewareFunc
- type AuthOpts
- type CorsOpts
- type InfoOpts
- type QuitOpts
- type SecureOpts
- type SignOpts
- type SizeOpts
- type TypeOpts
- type UniqOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Auth ¶
func Auth(opts ...*AuthOpts) fibre.MiddlewareFunc
Auth defines middleware for basic http authentication.
func Cors ¶
func Cors(opts ...*CorsOpts) fibre.MiddlewareFunc
Cors defines middleware for setting and checking CORS headers,
func Gzip ¶
func Gzip() fibre.MiddlewareFunc
Gzip defines middleware for compressing response output.
func Info ¶
func Info(opts ...*InfoOpts) fibre.MiddlewareFunc
Info defines middleware for specifying the server powered-by header.
func JWt ¶
func JWt(opts ...*SignOpts) fibre.MiddlewareFunc
JWt defines middleware for JWT authentication.
func Logs ¶
func Logs() fibre.MiddlewareFunc
Logs defines middleware for logging requests and responses.
func Quit ¶
func Quit(opts ...*QuitOpts) fibre.MiddlewareFunc
Quit defines middleware for timing out a connection.
func Secure ¶
func Secure(opts ...*SecureOpts) fibre.MiddlewareFunc
Secure defines middleware for specifying secure headers.
func Size ¶
func Size(opts ...*SizeOpts) fibre.MiddlewareFunc
Size defines middleware for checking the request content length.
func Type ¶
func Type(opts ...*TypeOpts) fibre.MiddlewareFunc
Type defines middleware for checking the request content type.
func Uniq ¶
func Uniq(opts ...*UniqOpts) fibre.MiddlewareFunc
Uniq defines middleware for assigning a unique request id.
Types ¶
type CorsOpts ¶
type CorsOpts struct { AllowedOrigin string AllowedMethods []string AllowedHeaders []string AccessControlMaxAge int AccessControlAllowCredentials bool }
CorsOpts defines options for the Cors middleware.
type InfoOpts ¶
type InfoOpts struct {
PoweredBy string
}
InfoOpts defines options for the Info middleware.
type SecureOpts ¶
type SecureOpts struct { RedirectHTTP bool XSSProtection string FrameOptions string ContentTypeOptions string HSTSMaxAge int HSTSIncludeSubdomains bool ContentSecurityPolicy string PublicKeyPins string }
SecureOpts defines options for the Secure middleware.
type SignOpts ¶
type SignOpts struct { Key []byte Fnc func(*fibre.Context, map[string]interface{}, map[string]interface{}) error }
SignOpts defines options for the JWt middleware.
type SizeOpts ¶
type SizeOpts struct {
AllowedLength int64
}
SizeOpts defines options for the Head middleware.