Documentation
¶
Index ¶
- type MySQLXStore
- func (m *MySQLXStore) Cleanup(interval time.Duration) (chan<- struct{}, <-chan struct{})
- func (m *MySQLXStore) Close()
- func (m *MySQLXStore) Delete(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
- func (m *MySQLXStore) Get(r *http.Request, name string) (*sessions.Session, error)
- func (m *MySQLXStore) New(r *http.Request, name string) (*sessions.Session, error)
- func (m *MySQLXStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
- func (m *MySQLXStore) StopCleanup(quit chan<- struct{}, done <-chan struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLXStore ¶
type MySQLXStore struct {
Codecs []securecookie.Codec
Options *sessions.Options
// contains filtered or unexported fields
}
func NewMySQLXStore ¶
func (*MySQLXStore) Cleanup ¶
func (m *MySQLXStore) 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 (*MySQLXStore) Close ¶
func (m *MySQLXStore) Close()
func (*MySQLXStore) Delete ¶
func (m *MySQLXStore) Delete(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
func (*MySQLXStore) Save ¶
func (m *MySQLXStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
func (*MySQLXStore) StopCleanup ¶
func (m *MySQLXStore) StopCleanup(quit chan<- struct{}, done <-chan struct{})
StopCleanup stops the background cleanup from running.
Click to show internal directories.
Click to hide internal directories.