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 ¶ added in v1.6.0
type Provider struct {
// contains filtered or unexported fields
}
Provider ledis session provider
func (*Provider) SessionAll ¶ added in v1.6.0
SessionAll return all active session
func (*Provider) SessionDestroy ¶ added in v1.6.0
SessionDestroy delete ledis session by id
func (*Provider) SessionExist ¶ added in v1.6.0
SessionExist check ledis session exist by sid
func (*Provider) SessionGC ¶ added in v1.6.0
func (lp *Provider) SessionGC()
SessionGC Impelment method, no used.
func (*Provider) SessionInit ¶ added in v1.6.0
SessionInit init ledis session savepath like ledis server saveDataPath,pool size e.g. 127.0.0.1:6379,100,astaxie
func (*Provider) SessionRead ¶ added in v1.6.0
SessionRead read ledis session by sid
type SessionStore ¶ added in v1.6.0
type SessionStore struct {
// contains filtered or unexported fields
}
SessionStore ledis session store
func (*SessionStore) Delete ¶ added in v1.6.0
func (ls *SessionStore) Delete(key interface{}) error
Delete value in ledis session
func (*SessionStore) Flush ¶ added in v1.6.0
func (ls *SessionStore) Flush() error
Flush clear all values in ledis session
func (*SessionStore) Get ¶ added in v1.6.0
func (ls *SessionStore) Get(key interface{}) interface{}
Get value in ledis session
func (*SessionStore) SessionID ¶ added in v1.6.0
func (ls *SessionStore) SessionID() string
SessionID get ledis session id
func (*SessionStore) SessionRelease ¶ added in v1.6.0
func (ls *SessionStore) SessionRelease(w http.ResponseWriter)
SessionRelease save session values to ledis
func (*SessionStore) Set ¶ added in v1.6.0
func (ls *SessionStore) Set(key, value interface{}) error
Set value in ledis session
Click to show internal directories.
Click to hide internal directories.