Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearExpiredSessions ¶
func ClearExpiredSessions()
ClearExpiredSessions deletes all expired Sessions from the database
func RegularlyClearExpiredSessions ¶
func RegularlyClearExpiredSessions()
RegularlyClearExpiredSessions starts a goroutine which calls ClearExpiredSessions() regularly. It initially does a clean-up (which briefly blocks) and then starts the regular clean-up job in the background.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session represents a User session, pretty much like PHP_SESSION in the old days. It is an abstraction to the `session` table in the database. We are using database-backed session in order to be able to communicate the Session to other hosts on the cluster for load-balancing purpose.
func NewSession ¶
func NewSession(data interface{}) *Session
NewSession returns a new *Session which is given a unique UUID
func ResumeSession ¶
ResumeSession returns the Session from the cache or the database