Documentation ¶
Index ¶
- Variables
- func AbsoluteURL(r *http.Request, u string, params url.Values) string
- func Authenticator(ds model.DataStore) func(next http.Handler) http.Handler
- func Index(ds model.DataStore, fs fs.FS) http.HandlerFunc
- func IndexWithShare(ds model.DataStore, fs fs.FS, shareInfo *model.Share) http.HandlerFunc
- func JWTRefresher(next http.Handler) http.Handler
- func URLParamsMiddleware(next http.Handler) http.Handler
- func UsernameFromConfig(r *http.Request) string
- func UsernameFromReverseProxyHeader(r *http.Request) string
- func UsernameFromToken(r *http.Request) string
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoUsers = errors.New("no users created") ErrUnauthenticated = errors.New("request not authenticated") )
Functions ¶
func AbsoluteURL ¶ added in v0.49.0
func Authenticator ¶ added in v0.44.0
func IndexWithShare ¶ added in v0.49.0
func JWTRefresher ¶ added in v0.44.0
JWTRefresher updates the expiry date of the received JWT token, and add the new one to the Authorization Header
func URLParamsMiddleware ¶ added in v0.49.0
URLParamsMiddleware is a middleware function that decodes the query string of the incoming HTTP request, adds the URL parameters from the routing context, and re-encodes the modified query string.
func UsernameFromConfig ¶ added in v0.44.0
func UsernameFromReverseProxyHeader ¶ added in v0.44.0
func UsernameFromToken ¶ added in v0.44.0
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) MountRouter ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.