drivers

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: GPL-3.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 MongoStore

type MongoStore struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewMongoStore

func NewMongoStore(col *mongo.Collection, timeout time.Duration, crypt crypt.CrypterI) *MongoStore

Creates new mongo storage

func (*MongoStore) Get

func (s *MongoStore) Get(sid string) (*sessions.Session, error)

Gets session back from the store. Decrypt the values object back to fit the session object's values field

func (*MongoStore) Purge

func (s *MongoStore) Purge(sid string) error

Purges the session: TODO; lurky xd

func (*MongoStore) Set

func (s *MongoStore) Set(sess *sessions.Session) error

Saves session back to the store. Encrypts the [session.values] object.

Jump to

Keyboard shortcuts

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