memstore

package
v0.0.0-...-2403d1f Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemStore

type MemStore struct {
	Codecs  []securecookie.Codec
	Options *sessions.Options // default configuration
	// contains filtered or unexported fields
}

MemStore stores sessions in memory

func NewMemStore

func NewMemStore(keyPairs ...[]byte) *MemStore

NewMemStore returns a new MemStore.

func (*MemStore) Get

func (s *MemStore) Get(r *http.Request, name string) (*sessions.Session, error)

Get returns a session for the given name after adding it to the registry.

See CookieStore.Get().

func (*MemStore) MaxLength

func (s *MemStore) MaxLength(l int)

MaxLength restricts the maximum length of new sessions to l. If l is 0 there is no limit to the size of a session, use with caution. The default for a new MemcacheStore is 4096.

func (*MemStore) New

func (s *MemStore) New(r *http.Request, name string) (*sessions.Session, error)

New returns a session for the given name without adding it to the registry.

See CookieStore.New().

func (*MemStore) Save

func (s *MemStore) Save(r *http.Request, w http.ResponseWriter,
	session *sessions.Session) error

Save adds a single session to the response.

Jump to

Keyboard shortcuts

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