 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type LedisProvider
- func (p *LedisProvider) Count() int
- func (p *LedisProvider) Destory(sid string) error
- func (p *LedisProvider) Exist(sid string) bool
- func (p *LedisProvider) GC()
- func (p *LedisProvider) Init(maxlifetime int64, savePath string) error
- func (p *LedisProvider) Read(sid string) (session.RawStore, error)
- func (p *LedisProvider) Regenerate(oldsid, sid string) (session.RawStore, error)
 
- type LedisSessionStore
- func (s *LedisSessionStore) Delete(key interface{}) error
- func (s *LedisSessionStore) Flush() error
- func (s *LedisSessionStore) Get(key interface{}) interface{}
- func (s *LedisSessionStore) ID() string
- func (s *LedisSessionStore) Release() error
- func (s *LedisSessionStore) Set(key, val interface{}) error
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LedisProvider ¶
type LedisProvider struct {
	// contains filtered or unexported fields
}
    LedisProvider represents a ledis session provider implementation.
func (*LedisProvider) Count ¶
func (p *LedisProvider) Count() int
Count counts and returns number of sessions.
func (*LedisProvider) Destory ¶
func (p *LedisProvider) Destory(sid string) error
Destory deletes a session by session ID.
func (*LedisProvider) Exist ¶
func (p *LedisProvider) Exist(sid string) bool
Exist returns true if session with given ID exists.
func (*LedisProvider) Init ¶
func (p *LedisProvider) Init(maxlifetime int64, savePath string) error
Init initializes memory session provider.
type LedisSessionStore ¶
type LedisSessionStore struct {
	// contains filtered or unexported fields
}
    LedisSessionStore represents a ledis session store implementation.
func (*LedisSessionStore) Delete ¶
func (s *LedisSessionStore) Delete(key interface{}) error
Delete delete a key from session.
func (*LedisSessionStore) Flush ¶
func (s *LedisSessionStore) Flush() error
Flush deletes all session data.
func (*LedisSessionStore) Get ¶
func (s *LedisSessionStore) Get(key interface{}) interface{}
Get gets value by given key in session.
func (*LedisSessionStore) ID ¶
func (s *LedisSessionStore) ID() string
ID returns current session ID.
func (*LedisSessionStore) Release ¶
func (s *LedisSessionStore) Release() error
Release releases resource and save data to provider.
func (*LedisSessionStore) Set ¶
func (s *LedisSessionStore) Set(key, val interface{}) error
Set sets value to given key in session.
       Source Files
      ¶
      Source Files
      ¶
    
- ledis.go
 Click to show internal directories. 
   Click to hide internal directories.