redissession

package
v0.0.0-...-2c34b4b Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionManager

type SessionManager struct {
	CookieName   string
	CookieDomain string
	// contains filtered or unexported fields
}

func New

func New(pool *redis.Pool, cookieName, cookieDomain string, expires int) *SessionManager

func (*SessionManager) Clear

func (s *SessionManager) Clear(rw http.ResponseWriter, req *http.Request)

func (*SessionManager) Get

func (s *SessionManager) Get(rw http.ResponseWriter, req *http.Request) map[string]interface{}

func (*SessionManager) Len

func (s *SessionManager) Len() int64

func (*SessionManager) Set

func (s *SessionManager) Set(session map[string]interface{}, rw http.ResponseWriter, req *http.Request)

func (*SessionManager) SetEX

func (s *SessionManager) SetEX(session map[string]interface{}, rw http.ResponseWriter, req *http.Request, exprie int)

设置session和cookie

Jump to

Keyboard shortcuts

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