cassandrastore

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

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

Go to latest
Published: Oct 17, 2014 License: MIT Imports: 9 Imported by: 0

README

cassandrastore

A session storage backend for github.com/gorilla/sessions that uses Cassandra

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CassandraStore

type CassandraStore struct {
	ClusterConfig *gocql.ClusterConfig
	Codecs        []securecookie.Codec
	Options       *sessions.Options
	TableName     string
}

CassandraStore stores sessions in a Cassandra database.

func NewCassandraStore

func NewCassandraStore(config *gocql.ClusterConfig, tableName string, keypairs ...[]byte) (*CassandraStore, error)

NewCassandraStore creates, and returns a new *CassandraStore. tableName lets you specify the name of the table which sessions should be stored in. If tableName is left as an empty string, it will default to "sessions".

The only session options set by this function are sessions.Options.Path to "/", and sessions.Options.MaxAge to 2592000 (30 days).

The connection to the database is not checked by this function.

func (*CassandraStore) Get

func (c *CassandraStore) Get(r *http.Request, name string) (*sessions.Session, error)

func (*CassandraStore) New

func (c *CassandraStore) New(r *http.Request, name string) (*sessions.Session, error)

func (*CassandraStore) Save

Jump to

Keyboard shortcuts

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