session

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(c *gin.Context, key string) error

Delete session delete

func Next

func Next() gin.HandlerFunc

Next returns a Session middleware.

func NextWithConfig

func NextWithConfig(config SessionConfig) gin.HandlerFunc

NextWithConfig with config a Session middleware.

func NextWithStore

func NextWithStore(store sessions.Store) gin.HandlerFunc

NextWithStore returns a Session middleware.

func Session

func Session(c *gin.Context, name string) (*sessions.Session, error)

Session Get returns a named session.

func Set

func Set(c *gin.Context, key string, value Value, options ...*sessions.Options) error

Set session set

Types

type SessionConfig

type SessionConfig struct {
	// Skipper defines a function to skip middleware.
	Skipper middleware.Skipper
	// Session store.
	// Required.
	Store sessions.Store
}

SessionConfig defines the config for Session middleware.

type Value

type Value map[interface{}]interface{}

func Get

func Get(c *gin.Context, key string) (Value, error)

Get session get

Jump to

Keyboard shortcuts

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