sessions

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sessions

type Sessions struct{}

func New

func New(sessionsFeatureOn bool) *Sessions

New initiate sessions var

func Resolve

func Resolve() *Sessions

Resolve return sessions var

func (*Sessions) Clear

func (s *Sessions) Clear(c *gin.Context)

Clear deletes all values in the session.

func (*Sessions) Delete

func (s *Sessions) Delete(key interface{}, c *gin.Context)

Delete deletes session entry matching the given key

func (*Sessions) Get

func (s *Sessions) Get(key interface{}, c *gin.Context) interface{}

Get retrieves the key's value

func (*Sessions) Has added in v1.1.0

func (s *Sessions) Has(key interface{}, c *gin.Context) bool

Get retrieves the key's value

func (*Sessions) InitiateCookieStore

func (s *Sessions) InitiateCookieStore(secret string, name string) gin.HandlerFunc

InitiateCookieStore initiates cookie store of sessions

func (*Sessions) InitiateMemstoreStore

func (s *Sessions) InitiateMemstoreStore(secret string, name string) gin.HandlerFunc

InitiateMemStore initiates memstore store of sessions

func (*Sessions) InitiateRedistore

func (s *Sessions) InitiateRedistore(secret string, name string) gin.HandlerFunc

InitiateRedistore initiates redis store of sessions

func (*Sessions) Pull

func (s *Sessions) Pull(key interface{}, c *gin.Context) interface{}

Get retrieves the key's value and delete it

func (*Sessions) Set

func (s *Sessions) Set(key interface{}, val interface{}, c *gin.Context)

Set sets key, val in session

Jump to

Keyboard shortcuts

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