session

package
v0.0.0-...-8eab22a Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package session provides a wrapper for gorilla/sessions package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Empty

func Empty(sess *sessions.Session)

Empty deletes all the current session values.

Types

type Info

type Info struct {
	Options    sessions.Options `json:"Options"`    // Pulled from: http://www.gorillatoolkit.org/pkg/sessions#Options
	Name       string           `json:"Name"`       // Name for: http://www.gorillatoolkit.org/pkg/sessions#CookieStore.Get
	AuthKey    string           `json:"AuthKey"`    // Key for: http://www.gorillatoolkit.org/pkg/sessions#NewCookieStore
	EncryptKey string           `json:"EncryptKey"` // Key for: http://www.gorillatoolkit.org/pkg/sessions#NewCookieStore
	CSRFKey    string           `json:"CSRFKey"`    // Key for: http://www.gorillatoolkit.org/pkg/csrf#Protect
	// contains filtered or unexported fields
}

Info holds the session level information.

func (*Info) Instance

func (i *Info) Instance(r *http.Request) (*sessions.Session, error)

Instance returns an instance of the store.

func (*Info) SetupConfig

func (i *Info) SetupConfig(db *sqlx.DB) error

SetupConfig applies the config and returns an error if it cannot be setup.

Jump to

Keyboard shortcuts

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