session

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
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

func NewSession(ctx *gin.Context) ISession

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化会话接口 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type SessionExtend

type SessionExtend struct {
	EncryptSecret string
	Cookie        store.CookieOption
	Redis         store.RedisOption
	IsRedis       bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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