Documentation ¶
Index ¶
- Variables
- type Err
- type Store
- func (s *Store) Bool(r interface{}, err error) (bool, error)
- func (s *Store) Bytes(r interface{}, err error) ([]byte, error)
- func (s *Store) Clear(id string) error
- func (s *Store) Commit(id string) error
- func (s *Store) Create() (string, error)
- func (s *Store) Delete(id string, key string) error
- func (s *Store) Float64(r interface{}, err error) (float64, error)
- func (s *Store) Get(id, key string) (interface{}, error)
- func (s *Store) GetAll(id string) (map[string]interface{}, error)
- func (s *Store) GetMulti(id string, keys ...string) (map[string]interface{}, error)
- func (s *Store) Int(r interface{}, err error) (int, error)
- func (s *Store) Int64(r interface{}, err error) (int64, error)
- func (s *Store) Set(id, key string, val interface{}) error
- func (s *Store) SetPrefix(val string)
- func (s *Store) SetTTL(d time.Duration)
- func (s *Store) String(r interface{}, err error) (string, error)
- func (s *Store) UInt64(r interface{}, err error) (uint64, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Error codes for store errors. This should match the codes // defined in the /simplesessions package exactly. ErrInvalidSession = &Err{code: 1, msg: "invalid session"} ErrFieldNotFound = &Err{code: 2, msg: "field not found"} ErrAssertType = &Err{code: 3, msg: "assertion failed"} ErrNil = &Err{code: 4, msg: "nil returned"} )
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store represents redis session store for simple sessions. Each session is stored as redis hashmap.
func (*Store) Create ¶
Create returns a new session id but doesn't stores it in redis since empty hashmap can't be created.
func (*Store) GetMulti ¶
GetMulti gets a map for values for multiple keys. If key is not found then its set as nil.
Click to show internal directories.
Click to hide internal directories.