session

package
v0.0.0-...-bc6c5c1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvCodecs

func EnvCodecs() ([]securecookie.Codec, error)

EnvCodecs retrieves the codecs from the environment variables HASH_KEY and BLOCK_KEY

func Filter

func Filter(prototype interface{}, cookieName string, store gorilla.Store, opts ...Option) web.Filter

func GenerateKeyPairs

func GenerateKeyPairs(blockSizes ...int) [][]byte

GenerateCodec generates new keypairs suitable for gorilla sessions; blockSizes must be in pairs divisible by 32 by default GenerateCodec will generate a codec with 64, 32

func New

func New(req *http.Request, w http.ResponseWriter, store gorilla.Store, cookieName string, v interface{}) error

func Value

func Value(req *http.Request) (interface{}, bool)

func WrapHandler

func WrapHandler(prototype interface{}, cookieName string, store gorilla.Store, h http.Handler, opts ...Option) http.Handler

Types

type Option

type Option func(*manager)

func ErrHandler

func ErrHandler(fn func(w http.ResponseWriter, req *http.Request, err error)) Option

Jump to

Keyboard shortcuts

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