Documentation ¶
Index ¶
- func AdminOnly(ctx *context.Context, next http.Handler) http.Handler
- func Authenticate(allowToken bool) context.Middleware
- func AuthenticatedOnly(ctx *context.Context, next http.Handler) http.Handler
- func Context(setupContext func(ctx *context.Context)) context.Middleware
- func CreateUpload(ctx *context.Context, next http.Handler) http.Handler
- func File(ctx *context.Context, next http.Handler) http.Handler
- func Impersonate(ctx *context.Context, next http.Handler) http.Handler
- func Log(ctx *context.Context, next http.Handler) http.Handler
- func Paginate(ctx *context.Context, next http.Handler) http.Handler
- func Recover(ctx *context.Context, next http.Handler) http.Handler
- func RedirectOnFailure(ctx *context.Context, next http.Handler) http.Handler
- func SourceIP(ctx *context.Context, next http.Handler) http.Handler
- func Upload(ctx *context.Context, next http.Handler) http.Handler
- func User(ctx *context.Context, next http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
func Authenticate(allowToken bool) context.Middleware
Authenticate verify that a request has either a whitelisted url or a valid auth token
func AuthenticatedOnly ¶
AuthenticatedOnly middleware to allow only authenticated users to the next middleware in the chain
func Context ¶
func Context(setupContext func(ctx *context.Context)) context.Middleware
Context sets necessary request context values
func CreateUpload ¶
CreateUpload create a new upload on the fly to be used in the next handler
func File ¶
File retrieve the requested file metadata from the metadataBackend and save it in the request context.
func Impersonate ¶
Impersonate allow an administrator to pretend being another user
func RedirectOnFailure ¶
RedirectOnFailure enable webapp http redirection instead of string error
func SourceIP ¶
SourceIP extract the source IP address from the request and save it to the request context
Types ¶
This section is empty.