Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Admin ¶
func Admin(home string) gin.HandlerFunc
Admin Middleware which ensures the user accessing the route must be an admin, should be called after CookieEnsureAuthed
func Auth ¶
func Auth(s *server.Server) gin.HandlerFunc
Auth middleware which ensures the user is authorised
func SkipIfAuthed ¶
func SkipIfAuthed(session *auth.Session, home string) gin.HandlerFunc
SkipIfAuthed Middleware which skips these routes if the user is already authorised and redirect to the home page instead
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.