Documentation
¶
Index ¶
Constants ¶
const (
SESSION_IDENTITY string = "__ging_s__"
)
================================================================================ * Session中间件模块 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================
Variables ¶
This section is empty.
Functions ¶
func SessionMiddleware ¶
func SessionMiddleware(extend SessionExtend) gin.HandlerFunc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Session会话中间件 * option: option扩展数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Types ¶
type ISession ¶
type ISession interface {
SessionId() string
Values() map[interface{}]interface{}
Get(key interface{}) interface{}
Set(key interface{}, val interface{})
AddFlash(value interface{}, vars ...string)
Flashes(vars ...string) []interface{}
Save() error
Delete(key interface{})
Clear()
Options(store.CookieOption)
}
================================================================================ * Session接口模块 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================
func NewSession ¶
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化会话接口 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
type SessionExtend ¶
type SessionExtend struct {
EncryptSecret string
Cookie store.CookieOption
Redis store.RedisOption
IsRedis bool
}