package
0.0.0-20240619081448-a25b4f51b4f4
Repository: https://github.com/root-gg/plik.git
Documentation: pkg.go.dev

# Functions

AdminOnly middleware to allow only admin users to the next middleware in the chain.
Authenticate verify that a request has either a whitelisted url or a valid auth token.
AuthenticatedOnly middleware to allow only authenticated users to the next middleware in the chain.
Context sets necessary request context values.
CreateUpload create a new upload on the fly to be used in the next handler.
File retrieve the requested file metadata from the metadataBackend and save it in the request context.
Impersonate allow an administrator to pretend being another user.
Log the http request.
Paginate parse pagination requests.
Recover the http request in case of panic.
RedirectOnFailure enable webapp http redirection instead of string error.
SourceIP extract the source IP address from the request and save it to the request context.
Upload retrieve the requested upload metadata from the metadataBackend and save it to the request context.
User middleware for all the /user/{userID} routes.