Documentation ¶
Overview ¶
Package session standardizes session management with Gorilla sessions
Index ¶
- Constants
- func AddErrorMessage(s *sessions.Session, message string)
- func GetErrorMessages(s *sessions.Session) ([]string, error)
- func Invalidate(s *sessions.Session)
- func NewCSRFMiddleware(config Config, opts ...csrf.Option) func(http.Handler) http.Handler
- func Regenerate(s *sessions.Session)
- type CSRFOptions
- type CSRFTokenChecker
- type Config
- type Store
- func (ss *Store) CSRFOptions() CSRFOptions
- func (ss *Store) Get(r *http.Request) (*sessions.Session, error)
- func (ss *Store) Lookup(id string) (*sessions.Session, error)
- func (ss *Store) New(r *http.Request) (*sessions.Session, error)
- func (ss *Store) NewCSRFMiddleware(opts ...csrf.Option) func(http.Handler) http.Handler
- type Timeouts
Constants ¶
View Source
const FlashErrorsKey = "_flash_errors"
Variables ¶
This section is empty.
Functions ¶
func AddErrorMessage ¶
func Invalidate ¶
func NewCSRFMiddleware ¶
func Regenerate ¶
Types ¶
type CSRFOptions ¶
type CSRFTokenChecker ¶
type CSRFTokenChecker struct {
// contains filtered or unexported fields
}
func NewCSRFTokenChecker ¶
func NewCSRFTokenChecker(config Config) *CSRFTokenChecker
type Config ¶
type Store ¶
type Store struct { Config Config BackingStore sessions.Store Codecs []securecookie.Codec }
func (*Store) CSRFOptions ¶
func (ss *Store) CSRFOptions() CSRFOptions
Directories ¶
Path | Synopsis |
---|---|
Package memstore provides an in-RAM (non-persistent) session store
|
Package memstore provides an in-RAM (non-persistent) session store |
Package sqlitestore store provides a sqlite-backed session store using [database.DB]
|
Package sqlitestore store provides a sqlite-backed session store using [database.DB] |
Click to show internal directories.
Click to hide internal directories.