Documentation
¶
Overview ¶
An implementation of the gorilla/sessions#Store interface for `babou`
This uses a PostgreSQL database as a storage backend. This allows sessions to be accessed by any instance of `babou` which share a common session encryption key in their configuration.
Index ¶
Constants ¶
View Source
const (
SESSIONS_TABLE = "http_sessions"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseStore ¶
type DatabaseStore struct { Codecs []securecookie.Codec Options *sessions.Options // contains filtered or unexported fields }
func NewDatabaseStore ¶
func NewDatabaseStore(keyPairs ...[]byte) *DatabaseStore
func (*DatabaseStore) Get ¶
Fetches a session for a given name after it has been added to the registry.
func (*DatabaseStore) New ¶
New returns a new session for the given name w/o adding it to the registry.
func (*DatabaseStore) Save ¶
func (db *DatabaseStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
Click to show internal directories.
Click to hide internal directories.