context

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SessionEnable = false

SessionEnable 开启Session

View Source
var SessionTimeout = 1200

SessionTimeout 自动过期时间,单位:秒

Functions

func ClearSession

func ClearSession()

ClearSession 移除过期的Session对象

Types

type HttpSession

type HttpSession struct {
	// contains filtered or unexported fields
}

func InitSession

func InitSession(w http.ResponseWriter, r *http.Request) *HttpSession

InitSession 初始化httpSession

func (*HttpSession) Clear

func (r *HttpSession) Clear()

Clear 清空Session

func (*HttpSession) GetValue

func (r *HttpSession) GetValue(name string) any

GetValue 获取Session

func (*HttpSession) Remove

func (r *HttpSession) Remove(name string)

Remove 删除Session

func (*HttpSession) SetValue

func (r *HttpSession) SetValue(name string, val any)

SetValue 设置Session

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL