top

Package sessions contains middleware for easy session management in Martini.

 package main

 import (
   "github.com/go-martini/martini"
   "github.com/martini-contrib/sessions"
 )

 func main() {
	  m := martini.Classic()

	  store := sessions.NewCookieStore([]byte("secret123"))
	  m.Use(sessions.Sessions("my_session", store))

	  m.Get("/", func(session sessions.Session) string {
		  session.Set("hello", "world")
	  })
 }

Imported by 2 package(s)

  1. github.com/gavinzhs/crm
  2. github.com/sugeladi/crm

Imports 5 package(s)

  1. github.com/go-martini/martini
  2. github.com/gorilla/context
  3. github.com/gorilla/securecookie
  4. github.com/gorilla/sessions
  5. github.com/boj/redistore