sessions

package module
v0.0.0-...-f084cae Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2014 License: BSD-2-Clause Imports: 4 Imported by: 0

README

sessions

simple http session

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryResult

type QueryResult struct {
	Err   error
	Value interface{}
}

type RedisQuery

type RedisQuery struct {
	Action  string
	Options []interface{}
	// contains filtered or unexported fields
}

type RedisStore

type RedisStore struct {
	*http.Cookie
	*redis.Pool

	DefaultMaxAge int
	// contains filtered or unexported fields
}

func NewRedisStore

func NewRedisStore(network, address, password string) *RedisStore

func (*RedisStore) Get

func (q *RedisStore) Get(r *http.Request, name string) (*Session, error)

func (*RedisStore) Run

func (q *RedisStore) Run()

func (*RedisStore) Set

func (q *RedisStore) Set(r *http.Request, w http.ResponseWriter, session *Session) error

func (*RedisStore) Stop

func (q *RedisStore) Stop()

type Session

type Session struct {
	*http.Cookie
	Values map[interface{}]interface{}
}

func NewSession

func NewSession(store RedisStore, name string) *Session

type Store

type Store interface {
	Get(r *http.Request, name string) (*Session, error)
	Set(r *http.Request, w http.ResponseWriter, s *Session) error
}

Jump to

Keyboard shortcuts

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