store

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2017 License: ISC Imports: 5 Imported by: 0

Documentation

Overview

Package store provices an implementation of sessions.Store that also carries its name around with it.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingName is returned when attempting to create a Namer with an empty name
	ErrMissingName = fmt.Errorf("name cannot be empty")

	// ErrMissingDomain returned when attempting to create a Namer with an empty domain
	ErrMissingDomain = fmt.Errorf("domain cannot be empty")
)

Functions

This section is empty.

Types

type KeyError

type KeyError struct{}

A KeyError is returned when attmpting to create a Namer with an invalid key. Keys must be hex-encoded strings with length 128.

func (KeyError) Error

func (k KeyError) Error() string

Error implements the error interface

type Namer

type Namer interface {
	sessions.Store
	Name() string
}

Namer is a sessions.Store that also has its own name

func New

func New(name, secret, domain string) (Namer, error)

New returns a new Namer for the given name, secret key and domain. secret should be a hex-encoded string with length 128.

Jump to

Keyboard shortcuts

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