session

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CookieName = "session"

CookieName is the name of the http cookie.

Variables

This section is empty.

Functions

func Clear

func Clear(w http.ResponseWriter)

Clear removes the session cookie.

func Get

func Get(req *http.Request, db *gorm.DB) (*database.Session, error)

Get returns the session from the cookie.

func Set

func Set(w http.ResponseWriter, db *gorm.DB, sess *database.Session) error

Set writes the session cookie.

Types

This section is empty.

Jump to

Keyboard shortcuts

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