Documentation ¶
Index ¶
- type MemProvider
- func (rp *MemProvider) SessionAll() int
- func (rp *MemProvider) SessionDestroy(sid string) error
- func (rp *MemProvider) SessionExist(sid string) bool
- func (rp *MemProvider) SessionGC()
- func (rp *MemProvider) SessionInit(maxlifetime int64, savePath string) error
- func (rp *MemProvider) SessionRead(sid string) (session.SessionStore, error)
- func (rp *MemProvider) SessionRegenerate(oldsid, sid string) (session.SessionStore, error)
- type MemcacheSessionStore
- func (rs *MemcacheSessionStore) Delete(key interface{}) error
- func (rs *MemcacheSessionStore) Flush() error
- func (rs *MemcacheSessionStore) Get(key interface{}) interface{}
- func (rs *MemcacheSessionStore) SessionID() string
- func (rs *MemcacheSessionStore) SessionRelease(w http.ResponseWriter)
- func (rs *MemcacheSessionStore) Set(key, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemProvider ¶
type MemProvider struct {
// contains filtered or unexported fields
}
redis session provider
func (*MemProvider) SessionDestroy ¶
func (rp *MemProvider) SessionDestroy(sid string) error
delete redis session by id
func (*MemProvider) SessionExist ¶
func (rp *MemProvider) SessionExist(sid string) bool
check redis session exist by sid
func (*MemProvider) SessionInit ¶
func (rp *MemProvider) SessionInit(maxlifetime int64, savePath string) error
init redis session savepath like e.g. 127.0.0.1:9090
func (*MemProvider) SessionRead ¶
func (rp *MemProvider) SessionRead(sid string) (session.SessionStore, error)
read redis session by sid
func (*MemProvider) SessionRegenerate ¶
func (rp *MemProvider) SessionRegenerate(oldsid, sid string) (session.SessionStore, error)
generate new sid for redis session
type MemcacheSessionStore ¶
type MemcacheSessionStore struct {
// contains filtered or unexported fields
}
memcache session store
func (*MemcacheSessionStore) Delete ¶
func (rs *MemcacheSessionStore) Delete(key interface{}) error
delete value in memcache session
func (*MemcacheSessionStore) Flush ¶
func (rs *MemcacheSessionStore) Flush() error
clear all values in memcache session
func (*MemcacheSessionStore) Get ¶
func (rs *MemcacheSessionStore) Get(key interface{}) interface{}
get value in memcache session
func (*MemcacheSessionStore) SessionID ¶
func (rs *MemcacheSessionStore) SessionID() string
get redis session id
func (*MemcacheSessionStore) SessionRelease ¶
func (rs *MemcacheSessionStore) SessionRelease(w http.ResponseWriter)
save session values to redis
func (*MemcacheSessionStore) Set ¶
func (rs *MemcacheSessionStore) Set(key, value interface{}) error
set value in memcache session
Click to show internal directories.
Click to hide internal directories.