mock

package
v0.15.7 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package mock provides a mock implementation of session store and loader.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	ResponseSession string
	Session         *sessions.State
	SaveError       error
	LoadError       error
	Secret          []byte
	Encrypted       bool
}

Store is a mock implementation of the SessionStore interface

func (*Store) ClearSession

func (ms *Store) ClearSession(http.ResponseWriter, *http.Request)

ClearSession clears the ResponseSession

func (Store) LoadSession

func (ms Store) LoadSession(*http.Request) (string, error)

LoadSession returns the session and a error

func (Store) SaveSession

func (ms Store) SaveSession(http.ResponseWriter, *http.Request, interface{}) error

SaveSession returns a save error.

Jump to

Keyboard shortcuts

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