Documentation ¶
Overview ¶
*
- @Author: DollarKiller
- @Description:
- @Github: https://github.com/dollarkillerx
- @Date: Create in 18:48 2019-10-13
*
- @Author: DollarKiller
- @Description:
- @Github: https://github.com/dollarkillerx
- @Date: Create in 18:57 2019-10-13
Index ¶
- type GoSessionNode
- type Session
- type SessionEngine
- func (s *SessionEngine) Del(ctx *erguotou.Context) error
- func (s *SessionEngine) Get(ctx *erguotou.Context, key string) (interface{}, bool)
- func (s *SessionEngine) Save(ctx *erguotou.Context) error
- func (s *SessionEngine) SaveTime(ctx *erguotou.Context, time time.Duration) error
- func (s *SessionEngine) Set(key string, val interface{})
- type SessionInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoSessionNode ¶
type GoSessionNode struct {
// contains filtered or unexported fields
}
================================不同数据源的实现===================================== 系统自带 gocache 存储
func (*GoSessionNode) Del ¶
func (g *GoSessionNode) Del(id string) error
func (*GoSessionNode) Expired ¶
func (g *GoSessionNode) Expired(id string) bool
type Session ¶
type Session struct { Data map[string]interface{} // 存储器 CreationTime int64 // 创建时间 ExpirationTime int64 // 过期时间 // contains filtered or unexported fields }
session node
type SessionEngine ¶
type SessionEngine struct {
// contains filtered or unexported fields
}
func GetSessionCache ¶
func GetSessionCache() *SessionEngine
func (*SessionEngine) Del ¶ added in v0.0.17
func (s *SessionEngine) Del(ctx *erguotou.Context) error
func (*SessionEngine) Get ¶
func (s *SessionEngine) Get(ctx *erguotou.Context, key string) (interface{}, bool)
func (*SessionEngine) Set ¶
func (s *SessionEngine) Set(key string, val interface{})
type SessionInterface ¶
Click to show internal directories.
Click to hide internal directories.