Documentation
¶
Index ¶
Constants ¶
const DefaultNonPersistentSessionDuration = time.Duration(24) * time.Hour
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DatastoreStore ¶
type DatastoreStore struct { Codecs []securecookie.Codec Options *sessions.Options // default configuration // contains filtered or unexported fields }
DatastoreStore stores sessions in the App Engine datastore.
func NewDatastoreStore ¶
func NewDatastoreStore(kind string, nonPersistentSessionDuration time.Duration, keyPairs ...[]byte) *DatastoreStore
NewDatastoreStore returns a new DatastoreStore.
The kind argument is the kind name used to store the session data. If empty it will use "Session".
See NewCookieStore() for a description of the other parameters.
func (*DatastoreStore) Get ¶
Get returns a session for the given name after adding it to the registry.
See CookieStore.Get().
func (*DatastoreStore) New ¶
New returns a session for the given name without adding it to the registry.
See CookieStore.New().
func (*DatastoreStore) Save ¶
func (s *DatastoreStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
Save adds a single session to the response.
type MemcacheDatastoreStore ¶
type MemcacheDatastoreStore struct { Codecs []securecookie.Codec Options *sessions.Options // default configuration // contains filtered or unexported fields }
func NewMemcacheDatastoreStore ¶
func NewMemcacheDatastoreStore(kind, keyPrefix string, nonPersistentSessionDuration time.Duration, keyPairs ...[]byte) *MemcacheDatastoreStore
NewMemcacheDatastoreStore returns a new MemcacheDatastoreStore.
The kind argument is the kind name used to store the session data. If empty it will use "Session".
See NewCookieStore() for a description of the other parameters.
func (*MemcacheDatastoreStore) Get ¶
Get returns a session for the given name after adding it to the registry.
See CookieStore.Get().
func (*MemcacheDatastoreStore) New ¶
New returns a session for the given name without adding it to the registry.
See CookieStore.New().
func (*MemcacheDatastoreStore) Save ¶
func (s *MemcacheDatastoreStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
Save adds a single session to the response.
type MemcacheStore ¶
type MemcacheStore struct { Codecs []securecookie.Codec Options *sessions.Options // default configuration // contains filtered or unexported fields }
MemcacheStore stores sessions in the App Engine memcache.
func NewMemcacheStore ¶
func NewMemcacheStore(keyPrefix string, nonPersistentSessionDuration time.Duration, keyPairs ...[]byte) *MemcacheStore
NewMemcacheStore returns a new MemcacheStore.
The keyPrefix argument is the prefix used for memcache keys. If empty it will use "gorilla.appengine.sessions.".
See NewCookieStore() for a description of the other parameters.
func (*MemcacheStore) Get ¶
Get returns a session for the given name after adding it to the registry.
See CookieStore.Get().
func (*MemcacheStore) New ¶
New returns a session for the given name without adding it to the registry.
See CookieStore.New().
func (*MemcacheStore) Save ¶
func (s *MemcacheStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
Save adds a single session to the response.