Documentation ¶
Index ¶
- func Configure(s *Session)
- func Empty(sess *sessions.Session)
- func GetFlash(w http.ResponseWriter, r *http.Request) string
- func GetUserFromSession(r *http.Request) model.User
- func Instance(r *http.Request) (*sessions.Session, error)
- func IsLoggedIn(r *http.Request) bool
- func IsTeacher(r *http.Request) bool
- func SaveUserToSession(user model.User, w http.ResponseWriter, r *http.Request) bool
- func SetFlash(message string, w http.ResponseWriter, r *http.Request) error
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFlash ¶
func GetFlash(w http.ResponseWriter, r *http.Request) string
GetFlash returns the value of a flash-message
func GetUserFromSession ¶
GetUserFromSession returns user object stored in session
func IsLoggedIn ¶
IsLoggedIn returns if user is authenticated or not
func SaveUserToSession ¶
SaveUserToSession saves user object to session store
Types ¶
Click to show internal directories.
Click to hide internal directories.