Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
http.ResponseWriter
Request *http.Request
SessionID string
SessionData map[string]interface{}
Store Store
}
Context 用于处理会话数据的自定义上下文
func (*Context) GetSessionValue ¶
GetSessionValue 获取会话中的值
func (*Context) SetSessionValue ¶
SetSessionValue 设置会话中的值
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
MemoryStore 使用内存存储会话数据
func (*MemoryStore) Get ¶
func (store *MemoryStore) Get(sessionID string) (map[string]interface{}, bool)
Get 获取会话数据
func (*MemoryStore) Set ¶
func (store *MemoryStore) Set(sessionID string, data map[string]interface{})
Set 设置会话数据
Click to show internal directories.
Click to hide internal directories.