Documentation ¶
Index ¶
- type Options
- type Store
- func (st *Store) Cleanup()
- func (st *Store) Get(r *http.Request, name string) (*sessions.Session, error)
- func (st *Store) MaxAge(age int)
- func (st *Store) MaxLength(l int)
- func (st *Store) New(r *http.Request, name string) (*sessions.Session, error)
- func (st *Store) PeriodicCleanup(interval time.Duration, quit <-chan struct{})
- func (st *Store) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { Codecs []securecookie.Codec SessionOpts *sessions.Options // contains filtered or unexported fields }
Store represent a gormstore
func NewOptions ¶
NewOptions creates a new gormstore session with options
func (*Store) MaxAge ¶
MaxAge sets the maximum age for the store and the underlying c01_cookie implementation. Individual sessions can be deleted by setting Options.MaxAge = -1 for that session.
func (*Store) MaxLength ¶
MaxLength restricts the maximum length of new sessions to l. If l is 0 there is no limit to the size of a session, use with caution. The default is 4096 (default for securecookie)
func (*Store) PeriodicCleanup ¶
PeriodicCleanup runs Cleanup every interval. Close quit channel to stop.
Click to show internal directories.
Click to hide internal directories.