Documentation ¶
Index ¶
Constants ¶
View Source
const ( SessionFlagNone = iota // 无数据状态 SessionFlagModify // 有数据状态 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RedisSession ¶
type RedisSession struct { SessionId string Expire int SessionMap map[string]interface{} Flag int // contains filtered or unexported fields }
RedisSession结构体
func (*RedisSession) Set ¶
func (this *RedisSession) Set(key string, value interface{}) bool
设置Session内容
type RedisSessionMgr ¶
type RedisSessionMgr struct {
// contains filtered or unexported fields
}
Session管理器结构体
var Ssmgr *RedisSessionMgr
func (*RedisSessionMgr) Del ¶
func (this *RedisSessionMgr) Del(sessionId string) (bool, error)
从Redis中删除Session
func (*RedisSessionMgr) Get ¶
func (this *RedisSessionMgr) Get(sessionId string) (*RedisSession, error)
读取Session
func (*RedisSessionMgr) New ¶
func (this *RedisSessionMgr) New(options ...string) *RedisSession
新建Session
Click to show internal directories.
Click to hide internal directories.