Documentation ¶
Index ¶
- type LedisProvider
- func (lp *LedisProvider) SessionAll() int
- func (lp *LedisProvider) SessionDestroy(sid string) error
- func (lp *LedisProvider) SessionExist(sid string) bool
- func (lp *LedisProvider) SessionGC()
- func (lp *LedisProvider) SessionInit(maxlifetime int64, savePath string) error
- func (lp *LedisProvider) SessionRead(sid string) (session.SessionStore, error)
- func (lp *LedisProvider) SessionRegenerate(oldsid, sid string) (session.SessionStore, error)
- type LedisSessionStore
- func (ls *LedisSessionStore) Delete(key interface{}) error
- func (ls *LedisSessionStore) Flush() error
- func (ls *LedisSessionStore) Get(key interface{}) interface{}
- func (ls *LedisSessionStore) SessionID() string
- func (ls *LedisSessionStore) SessionRelease(w http.ResponseWriter)
- func (ls *LedisSessionStore) Set(key, value 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
}
ledis session provider
func (*LedisProvider) SessionDestroy ¶
func (lp *LedisProvider) SessionDestroy(sid string) error
delete ledis session by id
func (*LedisProvider) SessionExist ¶
func (lp *LedisProvider) SessionExist(sid string) bool
check ledis session exist by sid
func (*LedisProvider) SessionInit ¶
func (lp *LedisProvider) SessionInit(maxlifetime int64, savePath string) error
init ledis session savepath like ledis server saveDataPath,pool size e.g. 127.0.0.1:6379,100,astaxie
func (*LedisProvider) SessionRead ¶
func (lp *LedisProvider) SessionRead(sid string) (session.SessionStore, error)
read ledis session by sid
func (*LedisProvider) SessionRegenerate ¶
func (lp *LedisProvider) SessionRegenerate(oldsid, sid string) (session.SessionStore, error)
generate new sid for ledis session
type LedisSessionStore ¶
type LedisSessionStore struct {
// contains filtered or unexported fields
}
ledis session store
func (*LedisSessionStore) Delete ¶
func (ls *LedisSessionStore) Delete(key interface{}) error
delete value in ledis session
func (*LedisSessionStore) Flush ¶
func (ls *LedisSessionStore) Flush() error
clear all values in ledis session
func (*LedisSessionStore) Get ¶
func (ls *LedisSessionStore) Get(key interface{}) interface{}
get value in ledis session
func (*LedisSessionStore) SessionID ¶
func (ls *LedisSessionStore) SessionID() string
get ledis session id
func (*LedisSessionStore) SessionRelease ¶
func (ls *LedisSessionStore) SessionRelease(w http.ResponseWriter)
save session values to ledis
func (*LedisSessionStore) Set ¶
func (ls *LedisSessionStore) Set(key, value interface{}) error
set value in ledis session
Click to show internal directories.
Click to hide internal directories.