BaseSession

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseMemorySession map[int]*BaseSession

BaseMemorySession 基础内存型Session存储

Functions

This section is empty.

Types

type BaseSession

type BaseSession struct {
	KV         map[string]interface{}
	ExpireTime time.Duration
	// contains filtered or unexported fields
}

BaseSession 基础Session模型

func (*BaseSession) Create

func (baseSession *BaseSession) Create()

func (BaseSession) Delete

func (baseSession BaseSession) Delete()

func (*BaseSession) Read

func (baseSession *BaseSession) Read(req *http.Request)

func (BaseSession) Save

func (baseSession BaseSession) Save(w http.ResponseWriter)

type SessionInterface

type SessionInterface interface {
	Create()
	Save(w http.ResponseWriter)
	Read(req *http.Request)
	Delete()
}

SessionInterface Session接口,只要符合此接口,可不必修改应用

Jump to

Keyboard shortcuts

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