Documentation ¶
Index ¶
- func NewSessionInfo(sessionId string) *session
- type ISessionStore
- type Memory
- func (mem *Memory) Clear()
- func (mem *Memory) GC()
- func (mem *Memory) GetAllSessionId() []string
- func (mem *Memory) GetValue(sessionID string, key string) (interface{}, bool)
- func (mem *Memory) NewID(sessionId string) string
- func (mem *Memory) Remove(sessionId string)
- func (mem *Memory) SetMaxLifeTime(lifetime int64)
- func (mem *Memory) SetValue(sessionID string, key string, value interface{})
- func (mem *Memory) UpdateLastTimeAccessed(sessionId string)
- type Redis
- func (r *Redis) Clear()
- func (r *Redis) GC()
- func (r *Redis) GetAllSessionId() []string
- func (r *Redis) GetValue(sessionID string, key string) (interface{}, bool)
- func (r *Redis) NewID(id string) string
- func (r *Redis) Remove(sessionId string)
- func (r *Redis) SetMaxLifeTime(lifetime int64)
- func (r *Redis) SetValue(sessionID string, key string, value interface{})
- func (r *Redis) UpdateLastTimeAccessed(sessionId string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSessionInfo ¶
func NewSessionInfo(sessionId string) *session
Types ¶
type ISessionStore ¶
type ISessionStore interface { NewID(id string) string GC() SetValue(sessionID string, key string, value interface{}) GetValue(sessionID string, key string) (interface{}, bool) GetAllSessionId() []string Clear() Remove(sessionId string) UpdateLastTimeAccessed(sessionId string) SetMaxLifeTime(lifetime int64) }
func NewMemory ¶
func NewMemory() ISessionStore
func NewRedis ¶ added in v1.6.3
func NewRedis(client *redisdb.RedisDataSource) ISessionStore
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory In-memory session store
func (*Memory) GetAllSessionId ¶
GetAllSessionId get all session id list
func (*Memory) SetMaxLifeTime ¶
func (*Memory) UpdateLastTimeAccessed ¶
type Redis ¶ added in v1.6.3
type Redis struct {
// contains filtered or unexported fields
}
func (*Redis) GetAllSessionId ¶ added in v1.6.3
func (*Redis) SetMaxLifeTime ¶ added in v1.6.3
func (*Redis) UpdateLastTimeAccessed ¶ added in v1.6.3
Click to show internal directories.
Click to hide internal directories.