memory

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 4 Imported by: 3

Documentation

Overview

Package memory implements an in-memory Session Store with time-based expiration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store represents a Store that uses an in-memory map

func New

func New(duration time.Duration) *Store

New returns a new SessionStore with the given expiration duration.

func (*Store) Create

func (s *Store) Create(sess session.Session) (string, error)

Create returns a new session ID for the given session. The returned error will always be nil.

func (*Store) Read

func (s *Store) Read(id string) (session.Session, error)

Read returns the session for the given id or nil if it doesn't exist. The returned error will always be nil.

Jump to

Keyboard shortcuts

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