session

package
v0.0.0-...-684414d Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSession

func GetSession(c *gin.Context) *redisSessionStore

func Init

func Init(option *Option) *session

func Middleware

func Middleware(s *session) gin.HandlerFunc

Types

type Option

type Option struct {
	// redis setting
	Host        string
	Password    string
	DB          int
	MaxActive   int
	MaxIdle     int
	IdleTimeout int
	KeyPrefix   string
	// session setting
	Path       string
	Domain     string
	MaxAge     int // 过期时间
	Secure     bool
	HttpOnly   bool
	CookieName string
}

Jump to

Keyboard shortcuts

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