Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthFunc ¶
Default/Example AuthFunc. This doesn't actually do anything, you will want to create your own func for handling protected routes.
func NotImplemented ¶ added in v0.1.2
func NotImplemented(w http.ResponseWriter, r *http.Request)
The default handler for routes that are not implemented
Types ¶
type Routes ¶
type Routes struct {
Routes map[string]http.HandlerFunc // path -> handler | Unprotected
ProtectedRoutes map[string]http.HandlerFunc // path -> handler | Auto registers behind the AuthFunc
AuthFunc AuthFunc // func(http.HandlerFunc) http.Handler | ProtectedRoutes will not work without this
}
Click to show internal directories.
Click to hide internal directories.