sessions

package
v0.0.0-...-0f478d8 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enable

func Enable()

Initialize the session store with authentication and encryption keys.

Keys are read from the environment variables SESSION_AUTH_KEY and SESSION_ENCRYPTION_KEY If not set, temporary keys will be used.

Using temporary keys will invalidate all sessions when the server restarts.

Types

type CookieSession

type CookieSession struct {
	// contains filtered or unexported fields
}

func (*CookieSession) AddFlashError

func (s *CookieSession) AddFlashError(msg string)

func (*CookieSession) AddFlashNotice

func (s *CookieSession) AddFlashNotice(msg string)

func (*CookieSession) Clear

func (s *CookieSession) Clear() error

func (*CookieSession) CsrfToken

func (s *CookieSession) CsrfToken() string

Returns existing CsrfToken from cookie or creates and saves a new token. Will panic if it is unable to return a token.

func (*CookieSession) FlashErrors

func (s *CookieSession) FlashErrors() []string

func (*CookieSession) FlashNotices

func (s *CookieSession) FlashNotices() []string

func (*CookieSession) Save

func (s *CookieSession) Save() error

func (*CookieSession) SetUserId

func (s *CookieSession) SetUserId(id int)

func (*CookieSession) UserId

func (s *CookieSession) UserId() int

type CookieSessionStore

type CookieSessionStore struct{}

func (CookieSessionStore) Session

Jump to

Keyboard shortcuts

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