Documentation
¶
Overview ¶
Gorilla Sessions backend for MySQL.
Copyright (c) 2013 Contributors. See the list of contributors in the CONTRIBUTORS file for details.
This software is licensed under a MIT style license available in the LICENSE file.
Index ¶
- type SqliteStore
- func (m *SqliteStore) Cleanup(interval time.Duration) (chan<- struct{}, <-chan struct{})
- func (m *SqliteStore) Close()
- func (m *SqliteStore) Delete(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
- func (m *SqliteStore) Get(r *http.Request, name string) (*sessions.Session, error)
- func (m *SqliteStore) New(r *http.Request, name string) (*sessions.Session, error)
- func (m *SqliteStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
- func (m *SqliteStore) StopCleanup(quit chan<- struct{}, done <-chan struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SqliteStore ¶
type SqliteStore struct { Codecs []securecookie.Codec Options *sessions.Options // contains filtered or unexported fields }
func NewSqliteStore ¶
func (*SqliteStore) Cleanup ¶
func (m *SqliteStore) Cleanup(interval time.Duration) (chan<- struct{}, <-chan struct{})
Cleanup runs a background goroutine every interval that deletes expired sessions from the database.
The design is based on https://github.com/yosssi/boltstore
func (*SqliteStore) Close ¶
func (m *SqliteStore) Close()
func (*SqliteStore) Delete ¶
func (m *SqliteStore) Delete(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
func (*SqliteStore) Save ¶
func (m *SqliteStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
func (*SqliteStore) StopCleanup ¶
func (m *SqliteStore) StopCleanup(quit chan<- struct{}, done <-chan struct{})
StopCleanup stops the background cleanup from running.
Click to show internal directories.
Click to hide internal directories.