Documentation ¶
Overview ¶
Package ledis provide session Provider
Index ¶
- type Provider
- func (lp *Provider) SessionAll() int
- func (lp *Provider) SessionDestroy(sid string) error
- func (lp *Provider) SessionExist(sid string) bool
- func (lp *Provider) SessionGC()
- func (lp *Provider) SessionInit(maxlifetime int64, savePath string) error
- func (lp *Provider) SessionRead(sid string) (session.Store, error)
- func (lp *Provider) SessionRegenerate(oldsid, sid string) (session.Store, error)
- type SessionStore
- func (ls *SessionStore) Delete(key interface{}) error
- func (ls *SessionStore) Flush() error
- func (ls *SessionStore) Get(key interface{}) interface{}
- func (ls *SessionStore) SessionID() string
- func (ls *SessionStore) SessionRelease(w http.ResponseWriter)
- func (ls *SessionStore) Set(key, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider ledis session provider
func (*Provider) SessionAll ¶
SessionAll return all active session
func (*Provider) SessionDestroy ¶
SessionDestroy delete ledis session by id
func (*Provider) SessionExist ¶
SessionExist check ledis session exist by sid
func (*Provider) SessionInit ¶
SessionInit init ledis session savepath like ledis server saveDataPath,pool size e.g. 127.0.0.1:6379,100,astaxie
func (*Provider) SessionRead ¶
SessionRead read ledis session by sid
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
SessionStore ledis session store
func (*SessionStore) Delete ¶
func (ls *SessionStore) Delete(key interface{}) error
Delete value in ledis session
func (*SessionStore) Flush ¶
func (ls *SessionStore) Flush() error
Flush clear all values in ledis session
func (*SessionStore) Get ¶
func (ls *SessionStore) Get(key interface{}) interface{}
Get value in ledis session
func (*SessionStore) SessionID ¶
func (ls *SessionStore) SessionID() string
SessionID get ledis session id
func (*SessionStore) SessionRelease ¶
func (ls *SessionStore) SessionRelease(w http.ResponseWriter)
SessionRelease save session values to ledis
func (*SessionStore) Set ¶
func (ls *SessionStore) Set(key, value interface{}) error
Set value in ledis session
Click to show internal directories.
Click to hide internal directories.