Documentation ¶
Index ¶
- Variables
- type Store
- func (s *Store) Clear() error
- func (s *Store) Delete(key interface{}) error
- func (s *Store) Destroy()
- func (s *Store) Get(key interface{}) interface{}
- func (s *Store) GetAll() map[interface{}]interface{}
- func (s *Store) GetInt(key interface{}) int
- func (s *Store) GetString(key interface{}) string
- func (s *Store) ID() string
- func (s *Store) LastAccessedTime() time.Time
- func (s *Store) Set(key interface{}, value interface{}) error
- func (s *Store) SetLastAccessedTime(lastacc time.Time)
- func (s *Store) VisitAll(cb func(k interface{}, v interface{}))
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Provider the memory provider Provider = sessions.NewProvider("memory") )
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store the memory store, contains the session id and the values
func (*Store) Destroy ¶
func (s *Store) Destroy()
Destroy does nothing here, to destroy the session use the manager's .Destroy func
func (*Store) Get ¶
func (s *Store) Get(key interface{}) interface{}
Get returns the value of an entry by its key
func (*Store) GetAll ¶
func (s *Store) GetAll() map[interface{}]interface{}
GetAll returns all values
func (*Store) GetString ¶
GetString same as Get but returns as string, if nil then returns an empty string
func (*Store) LastAccessedTime ¶
LastAccessedTime returns the last time this session has been used
func (*Store) Set ¶
Set fills the session with an entry, it receives a key and a value returns an error, which is always nil
func (*Store) SetLastAccessedTime ¶
SetLastAccessedTime updates the last accessed time
Click to show internal directories.
Click to hide internal directories.