Documentation ¶
Index ¶
- type LedisLocalStore
- func (s *LedisLocalStore) Add(id session.Id) bool
- func (s *LedisLocalStore) Clear(id session.Id) bool
- func (s *LedisLocalStore) Del(id session.Id, key string) bool
- func (s *LedisLocalStore) Exist(id session.Id) bool
- func (s *LedisLocalStore) Get(id session.Id, key string) interface{}
- func (s *LedisLocalStore) Keys(id session.Id) ([]string, error)
- func (s *LedisLocalStore) Run() error
- func (s *LedisLocalStore) Set(id session.Id, key string, val interface{}) error
- func (s *LedisLocalStore) SetIdMaxAge(id session.Id, maxAge time.Duration)
- func (s *LedisLocalStore) SetMaxAge(maxAge time.Duration)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LedisLocalStore ¶
LedisLocalStore represents a ledis local session store implementation.
func New ¶
func New(opts ...Options) (*LedisLocalStore, error)
New creates and returns a redis session store.
func (*LedisLocalStore) Del ¶
func (s *LedisLocalStore) Del(id session.Id, key string) bool
Del delete a key from session.
func (*LedisLocalStore) Get ¶
func (s *LedisLocalStore) Get(id session.Id, key string) interface{}
Get gets value by given key in session.
func (*LedisLocalStore) Keys ¶
func (s *LedisLocalStore) Keys(id session.Id) ([]string, error)
Keys gets all keys of the session.
func (*LedisLocalStore) Run ¶
func (s *LedisLocalStore) Run() error
func (*LedisLocalStore) Set ¶
func (s *LedisLocalStore) Set(id session.Id, key string, val interface{}) error
Set sets value to given key in session.
func (*LedisLocalStore) SetIdMaxAge ¶
func (s *LedisLocalStore) SetIdMaxAge(id session.Id, maxAge time.Duration)
func (*LedisLocalStore) SetMaxAge ¶
func (s *LedisLocalStore) SetMaxAge(maxAge time.Duration)
Click to show internal directories.
Click to hide internal directories.