Exemple #1
0
	"conf"
	"server/model"

	"appengine"

	gaesessions "code.google.com/p/sadbox/appengine/sessions"
	"github.com/gorilla/mux"
	"github.com/gorilla/securecookie"
	"github.com/gorilla/sessions"
	"github.com/mjibson/appstats"
	"github.com/mjibson/goon"
)

var (
	dStore = gaesessions.NewDatastoreStore(model.KIND_SESSION,
		[]byte(conf.SESSION_SECRET))
	xsrfCodecs = securecookie.CodecsFromPairs([]byte(conf.XSRF_SECRET))
)

type Handler func(r *Request) error

// Build the router table at init().
//
// Example routes map:
//    map[string]app.Handler{
//      "ERROR::404": stuff.NotFound,
//      "DELETE::/_/example": example.Delete,
//      ....
//      "::/_/feedback": stuff.Feedback,
//    }
//
Exemple #2
0
	"conf"
	"server/model"

	"appengine"

	gaesessions "code.google.com/p/sadbox/appengine/sessions"
	"github.com/gorilla/mux"
	"github.com/gorilla/securecookie"
	"github.com/gorilla/sessions"
	"github.com/mjibson/appstats"
	"github.com/mjibson/goon"
)

var (
	dStore = gaesessions.NewDatastoreStore(model.KindSession,
		[]byte(conf.SessionSecret))
	xsrfCodecs = securecookie.CodecsFromPairs([]byte(conf.XSRFSecret))
)

type Handler func(r *Request) error

// Build the router table at init().
//
// Example routes map:
//    map[string]app.Handler{
//      "ERROR::404": stuff.NotFound,
//      "DELETE::/_/example": example.Delete,
//      ....
//      "::/_/feedback": stuff.Feedback,
//    }
//