storage

package
v0.0.0-...-8707c32 Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(db *reform.DB, logger logrus.FieldLogger) *DB

func (*DB) Add

func (s *DB) Add(sess session.Session)

Add adds a new session to the store.

func (*DB) Close

func (s *DB) Close()

Close closes the session store, releasing any resources that were allocated.

func (*DB) Get

func (s *DB) Get(id string) session.Session

Get returns the session specified by its id. The returned session will have an updated access time (set to the current time). nil is returned if this store does not contain a session with the specified id.

func (*DB) Remove

func (s *DB) Remove(sess session.Session)

Remove removes a session from the store.

type SessionAttrs

type SessionAttrs struct {
	Activated bool `json:"Activated"`
	HasError  bool `json:"HasError"`
}

Jump to

Keyboard shortcuts

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